Azure Logic应用-用于部署文件系统API连接的ARM模板 [英] Azure Logic Apps - ARM template to deploy filesystem API connection
问题描述
我正在尝试使用ARM模板部署文件系统API连接. 我找不到此连接的parametersValue架构,因此尝试命名出现在Azure门户上的参数
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
在Azure门户上编辑API连接屏幕截图 1
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')]"
}
}
{
"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
However deployment is failing due to wrong parameterValue names displayName and authenticationType
以下是部署日志中的错误-错误的请求
Below is error in the deployment log - Bad Request
输入参数无效.请参阅详细信息以获取更多信息.详细信息:errorCode:ParameterNotDefined.消息:连接中不允许使用参数"displayName",因为在注册API时未将其定义为连接参数...
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...
有人知道文件系统连接的正确json模式吗?我在 https://resources.azure.com 上找不到.
Does anyone knows correct json schema for filesystem connection? I could not find it on https://resources.azure.com .
推荐答案
我能够按照博客上的说明解决问题
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/
专门使用armclient命令行工具来检索连接元数据 https://github.com/projectkudu/ARMClient
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"
}
}
},
}
这篇关于Azure Logic应用-用于部署文件系统API连接的ARM模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!