0

我想使用 ARM 部署 Logic APP。此逻辑应用程序具有“SQL 执行 SP”操作。我在 azure 博客上发现了一些快速入门模板。但它们都不包含“SQL Execute SP”操作的操作。

4

2 回答 2

0

这是 ARM 模板,其中包含来自另一个stackoverflow 问题的 SQL 操作。

感谢哈利分享这个

resources:
[
  {
    "type": "Microsoft.Web/connections",
    "apiVersion": "2015-08-01-preview",
    "location": "[resourceGroup().location]",
    "name": "sqlconnector",
    "properties": {
      "api": {
        "id": "[concat('subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/sql')]"
      },
      "displayName": "sqlconnector",
      "parameterValues": {
        "sqlConnectionString": "<sql db connection string>"
      }
    }
  },
  {
    "type": "Microsoft.Logic/workflows",
    "apiVersion": "2015-08-01-preview",
    "name": "[parameters('logicAppName')]",
    "location": "[resourceGroup().location]",
    "tags": {
      "displayName": "LogicApp"
    },
    "properties": {
      "sku": {
        "name": "[parameters('workflowSkuName')]",
        "plan": {
          "id": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('svcPlanName'))]"
        }
      },
      "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2015-08-01-preview/workflowdefinition.json#",
        "contentVersion": "1.0.0.0",
        "parameters": {
          "$connections": {
            "defaultValue": { },
            "type": "Object"
          }
        },
        "triggers": {
          "recurrence": {
            "type": "recurrence",
            "recurrence": {
              "frequency": "Hour",
              "interval": 1
            }
          }
        },
        "actions": {
          "Execute_stored_procedure": {
            "conditions": [ ],
            "inputs": {
              "body": null,
              "host": {
                "api": {
                  "runtimeUrl": "[concat('https://logic-apis-', resourceGroup().location, '.azure-apim.net/apim/sql')]"
                },
                "connection": {
                  "name": "@parameters('$connections')['sql']['connectionId']"
                }
              },
              "method": "post",
              "path": "/datasets/default/procedures/@{encodeURIComponent(encodeURIComponent(string('[dbo].[<Stored Proc Name>]')))}"
            },
            "type": "apiconnection"
          }
        },
        "outputs": { }
      },
      "parameters": {
        "$connections": {
          "value": {
            "sql": {
              "connectionId": "[resourceId('Microsoft.Web/connections', 'sqlconnector')]",
              "connectionName": "sqlconnector",
              "id": "[reference(concat('Microsoft.Web/connections/', 'sqlconnector'), '2015-08-01-preview').api.id]"
            }
          }
        }
      }
    }
  }
]
于 2016-05-19T03:53:13.877 回答
0

逻辑应用的 ARM 部署允许你定义应用服务计划和逻辑应用容器,但不允许你部署整个逻辑应用。现在,您可以从 Azure Web 门户 ( https://portal.azure.com/ ) 设计/部署或仅从 Visual Studio 构建/部署

于 2016-05-16T04:00:30.667 回答