Azure Logic Apps - ARM template to deploy filesystem API connection

可紊 提交于 2019-12-10 11:01:20

问题


I am trying to deploy file system API connection using ARM template. I could not find the parametersValue schema for this connection and so tried with naming the parameters as they appear on Azure portal

Edit API Connection Screen shot on Azure Portal1

{ "apiVersion": "2016-06-01", "name": "filesystem", "type": "Microsoft.Web/connections", "location": "[resourceGroup().location]", "properties": { "api": { "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/westus/managedApis/filesystem')]" }, "parameterValues": { "displayName": "FileSyetem", "rootFolder": "[parameters('rootFolder')]", "authenticationType":"Windows", "username": "[parameters('username')]", "password": "[parameters('password')]" } }

However deployment is failing due to wrong parameterValue names displayName and authenticationType

Below is error in the deployment log - Bad Request

Input parameters are invalid. See details for more information. Details:errorCode: ParameterNotDefined. Message: Parameter 'displayName' is not allowed on the connection since it was not defined as a connection parameter when the API was registered...

Does anyone knows correct json schema for filesystem connection? I could not find it on https://resources.azure.com .


回答1:


I was able to solve the issue by following instruction on blog

https://blogs.msdn.microsoft.com/logicapps/2016/02/23/deploying-in-the-logic-apps-preview-refresh/

Specially using armclient command line tool to retrieve the connection metadata https://github.com/projectkudu/ARMClient

{
    "apiVersion": "2016-06-01",
    "name": "filesystem",
    "type": "Microsoft.Web/connections",
    "location": "[resourceGroup().location]",
    "properties": {
      "api": {
        "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/centralus/managedApis/filesystem')]"
      },
      "displayName": "logicAppFile",
      "parameterValues": {
          "rootfolder": "c:\\",
          "authType": "windows",
          "username": "[parameters('username')]",
          "password": "[parameters('password')]",
          "gateway": {
            "name": "OnPremGateway",
            "id": "/subscriptions/-----/resourceGroups/-----/providers/Microsoft.Web/connectionGateways/OnPremGateway",
            "type": "Microsoft.Web/connectionGateways"
        }
      }
    },
  }



回答2:


If your using logic app custom connector then you have to define those parameters with the same



来源:https://stackoverflow.com/questions/41409806/azure-logic-apps-arm-template-to-deploy-filesystem-api-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!