[英]Save the Response from HTTP to Blob Storage using Azure Logic App
Is it possible to save the response from the HTTP request(First Step) into the Blob Storage(Second Step) while using Azure Logic App. 使用Azure逻辑应用程序时是否可以将来自HTTP请求(第一步)的响应保存到Blob存储(第二步)中。
Thank you. 谢谢。
Yes, You can achieve it by using Http
and Create blob
task. 是的,您可以使用
Http
和Create blob
任务来实现。
Code 码
{
"$connections": {
"value": {
"azureblob": {
"connectionId": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Web/connections/azureblob",
"connectionName": "azureblob",
"id": "/subscriptions/xxx/providers/Microsoft.Web/locations/xxx/managedApis/azureblob"
}
}
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Create_blob": {
"inputs": {
"body": "@triggerBody()",
"host": {
"connection": {
"name": "@parameters('$connections')['azureblob']['connectionId']"
}
},
"method": "post",
"path": "/datasets/default/files",
"queries": {
"folderPath": "/testing",
"name": "Test",
"queryParametersSingleEncoded": true
}
},
"runAfter": {},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"HTTP": {
"inputs": {
"method": "GET",
"uri": "https://reqres.in/api/users?page=2"
},
"recurrence": {
"frequency": "Minute",
"interval": 3
},
"type": "Http"
}
}
}
}
Update 1: 更新1:
Just update your blob name with the expression like utcNow('yyyyMMdd')
只需使用
utcNow('yyyyMMdd')
这样的表达式更新您的Blob名称
Presuming you have no extraordinary circumstances, yes, you for sure can save the Request content to a Blob. 假设您没有特殊情况,是的,您可以确定可以将请求内容保存到Blob。 Any Content really.
任何内容。
You will start with the Create Blob Action specifying the Trigger Body as the content. 您将从指定触发器主体作为内容的创建Blob操作开始。
Don't over think it, it's the same pattern as saving to a local file. 不要过度思考,这与保存到本地文件的方式相同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.