我创建了一个使用 Azure 数据工厂连接器的逻辑应用。
我可以从门户创建具有服务主体身份验证的 API 连接
:
但我找不到任何有关如何使用 ARM 模板创建 API 连接的文档。
但我需要使用具有相同服务主体身份验证的 ARM 模板进行创建。
最佳答案
您可以使用 ARM 模板为 Azure 数据工厂创建 API 连接,如下所示:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"connectionAPIName": {
"type": "string"
},
"clientId": {
"type": "string"
},
"clientSecret": {
"type": "securestring"
}
},
"resources": [
{
"type": "Microsoft.Web/connections",
"apiVersion": "2018-07-01-preview",
"name": "[parameters('connectionAPIName')]",
"location": "[resourceGroup().location]",
"properties": {
"displayName": "[parameters('connectionAPIName')]",
"parameterValues": {
"token:clientId": "[parameters('clientId')]",
"token:clientSecret": "[parameters('clientSecret')]",
"token:TenantId": "[subscription().tenantId]",
"token:grantType": "client_credentials"
},
"api": {
"id": "[concat('subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/azuredatafactory')]"
}
}
}
],
"outputs": {}
}
关于azure - 使用 ARM 模板通过服务主体身份验证为 Azure 数据工厂创建 API 连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57889261/