简体   繁体   English

使用Azure Logic App将响应从HTTP保存到Blob存储

[英]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. 是的,您可以使用HttpCreate 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.

相关问题 如何使用 Azure 逻辑应用程序将 Json 文件从 Azure Blob 存储解析到 Azure Sql - How do I parse Json file from azure blob storage to Azure Sql using Azure logic app 如何使用逻辑应用程序从 azure 事件中心事件到 azure blob 存储? - How to events from azure event hub to azure blob storage using logic app? 如何从逻辑应用程序添加到 Azure Blob 存储 - How to add to Azure Blob Storage from Logic App 逻辑应用程序Azure从Blob检索数据并将其保存到Kusto - Logic app Azure retrieve data from Blob and save to Kusto 使用块 blob 将应用服务日志保存到 Azure Blob 存储 - Save App service log into Azure Blob Storage, using Block blobs 使用 Azure 逻辑应用从多个文件夹中获取 Blob 内容 - Get blob contents from multiple folders using Azure Logic App Azure 逻辑应用程序 - 如何将文件从字节数组上传到 Azure Blob 存储 - Azure Logic App - How to upload file to Azure Blob Storage from byte array 通过Azure Logic App访问Azure Blob存储中目录中的文件 - access a file from a directory in azure blob storage through Azure Logic App 从 Azure 逻辑应用中的 http 响应中提取文件 - Extract file from http response in Azure logic app Azure Logic 应用程序:如何在从 Blob 存储中获取内容后发送带有一个或多个附件的电子邮件? - Azure Logic app : How to Send an Email with one or more attachments after getting the content from Blob storage?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM