我使用Dot.Net SDK创建了Azure Logic App。Logic App 创建成功,但对于 Trigger 和 Action 我想使用现有的 Connector。我手动创建了连接到 Azur Portal 的连接器。我正在传递该连接器的 APIConnection 或 Id 以请求 json,但它不会连接到该连接器。我的意思是 Logic App 是在没有任何连接器的情况下创建的。
下面是我的请求 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": 1
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
}
},
"actions": {
"Send_Email": {
"inputs": {
"body": {
"Body": "New Item Created - @{triggerBody()?['Id']}",
"From": "info@logicappdemo.com",
"Subject": "LogicAppDemo - New Item Created",
"To": "hitesh.vaghasiya@softwebsolutions.com"
},
"host": {
"connection": {
"name": "@parameters('$connections')['smtp']['connectionId']"
}
},
"method": "post",
"path": "/SendEmailV2"
},
"runAfter": {},
"type": "ApiConnection"
}
}
}
这是来自 Azur 门户的屏幕截图。在这里您可以看到 Logic App 已成功创建,但没有连接器。
请建议,
谢谢