2016-12-31 63 views
1

我正在尝试使用ARM模板部署文件系统API连接。 我找不到此连接的parametersValue模式与命名的参数,以便尝试,因为他们出现在Azure门户Azure Logic Apps - 用于部署文件系统API连接的ARM模板

编辑API连接屏幕截图在Azure门户1

{ "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')]" } }

但是部署失败由于参数名称错误displayName和authenticationType

以下是部署日志中的错误 - 错误请求

输入参数无效。详情请参阅更多信息。详细信息:errorCode:ParameterNotDefined。消息:参数'displayName'不允许在连接上使用,因为它在注册API时没有被定义为连接参数...

有没有人知道文件系统连接的正确json模式?我无法在https://resources.azure.com上找到它。

+0

看来API连接不上可在https://resources.azure.com这是非常烦人的 – RuSs

回答

4

我能够通过以下指令在博客来解决这一问题

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

特别使用armclient命令行工具来获取连接的元数据 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" 
     } 
     } 
    }, 
    } 
相关问题