sql-server - In Azure Logic Apps ARM template, what are the possible values for the AuthType property for a SQL Server connector using On-Premise Data Gateway?
问题描述
I have an Azure Logic App with a SQL Server connector through a On-Premise Data Gateway, the connection is made using SQL Server Authentication. It works fine from the Logic App Designer.
No details about the connection are stored in the ARM template of the SQL Server connection, so if I want to automate the deployment of the Logic App, I need to add some values to the ARM template. The documentation for this is really poor, even though I was able to write this template:
{
"type": "MICROSOFT.WEB/CONNECTIONS",
"apiVersion": "2018-07-01-preview",
"name": "[parameters('sql_2_Connection_Name')]",
"location": "[parameters('logicAppLocation')]",
"properties": {
"api": {
"id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', parameters('logicAppLocation'), '/managedApis/', 'sql')]"
},
"displayName": "[parameters('sql_2_Connection_DisplayName')]",
"parameterValues": {
"server": "[parameters('sql_2_server')]",
"database": "[parameters('sql_2_database')]",
"username": "[parameters('sql_2_username')]",
"password": "[parameters('sql_2_password')]",
"authType": "[parameters('sql_2_authtype')]",
"sqlConnectionString": "[parameters('sql_2_sqlConnectionString')]",
"gateway": {
"id": "[concat('subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('dataGatewayResourceGroup'), '/providers/Microsoft.Web/connectionGateways/', parameters('dataGatewayName'))]"
}
}
}
}
But I can't find the correct value for the authType
property corresponding to "SQL Server Authentication". The values windows
and basic
are accepted, but couldn't find the value for "SQL Server Authentication".
Can someone please tell me what's the value for the authType
property corresponding to "SQL Server Authentication"?
解决方案
Use following properties json inside your web api connection
"properties": {
"api": {
"id": "/subscriptions/<YourSubscriptionIDHere>/providers/Microsoft.Web/locations/australiaeast/managedApis/sql"
},
"parameterValueSet": {
"name": "sqlAuthentication",
"values": {
"server": {
"value": "SampleServer"
},
"database": {
"value": "WideWorldImporters"
},
"username": {
"value": "sampleuser"
},
"password": {
"value": "somepasssword"
},
"gateway": {
"value": {
"id": "/subscriptions/<subscriptionIDGoesHere>/resourceGroups/az-integration-study-rg/providers/Microsoft.Web/connectionGateways/<NameofTheGatewayHere>"
}
}
}
}
},
"location": "australiaeast"
That should do the trick
推荐阅读
- flutter - 颤动删除特定页面的标签栏
- socat - 是否可以使用 socat 打开现有的 tun 设备而不是创建新设备?
- mysql - 如何在groupby mysql之后获得最大值
- javascript - 在 Bootstrap 中单击时将卡片变灰
- javascript - 奇怪的行为: if( 取布尔值 false
- javascript - 与 node-gyp 相关的电子生成器错误
- vb.net-2010 - 在 Source Bitmap 和 BitmapData 中声明 Format32BppArgb 时,Lockbits 返回一个意外的(对我而言)Stride 值
- .net - .net Framework 3.5 版本中的 PropertyGrid 绘制异常
- android - DRM/KMS 禁用连接器和 crtc
- typescript - 键入'{ localUUID:字符串;}' 不可分配给类型 'string | 正则表达式'