小编Hit*_*iya的帖子

使用 DotNet SDK 创建 LogicApp 和 API 连接 ARM 模板

我使用Dot.Net SDK创建了Azure 逻辑应用程序。逻辑应用程序创建成功,但对于触发器和操作,我想使用现有的 Connector。我已手动创建 Azur Portal 的连接器。我正在传递该连接器的 APIConnection 或 Id 来请求 json,但它不会连接到该连接器。我的意思是逻辑应用程序是在没有任何连接器的情况下创建的。

下面是我的请求 Json。


{
    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
    "contentVersion": "1.0.0.0",
    "outputs": {},
    "parameters": {
        "$connections": {
            "defaultValue": {
                "smtp": {
                    "connectionId": "/subscriptions/680cf604-e2e7-4a14-9724-a26c35c573ff/resourceGroups/logicapp_flow_rnd/providers/Microsoft.Web/connections/smtp",
                    "connectionName": "smtp",
                    "id": "/subscriptions/680cf604-e2e7-4a14-9724-a26c35c573ff/providers/Microsoft.Web/locations/westindia/managedApis/smtp"
                },
                "sql": {
                    "connectionId": "/subscriptions/680cf604-e2e7-4a14-9724-a26c35c573ff/resourceGroups/logicapp_flow_rnd/providers/Microsoft.Web/connections/sql",
                    "connectionName": "sql",
                    "id": "/subscriptions/680cf604-e2e7-4a14-9724-a26c35c573ff/providers/Microsoft.Web/locations/westindia/managedApis/sql"
                }
            },
            "type": "Object"
        }
    },
    "triggers": {
        "When_an_item_is_created": {
            "inputs": {
                "host": {
                    "connection": {
                        "name": "@parameters('$connections')['sql']['connectionId']"
                    }
                },
                "method": "get",
                "path": "/datasets/default/tables/@{encodeURIComponent(encodeURIComponent('LogicAppTable1'))}/onnewitems"
            },
            "recurrence": {
                "frequency": "Minute",
                "interval": …
Run Code Online (Sandbox Code Playgroud)

azure azure-sdk-.net azure-logic-apps azure-sdk dotnet-sdk

5
推荐指数
1
解决办法
7368
查看次数