使用ARM模板使用服务主体身份验证为Azure Data Factory创建API连接 [英] Create API Connection for Azure Data Factory with service principal authentication using ARM Template
本文介绍了使用ARM模板使用服务主体身份验证为Azure Data Factory创建API连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建了一个使用azure数据工厂连接器的逻辑应用程序.
I've created a logic app that uses azure data factory connectors.
我可以通过门户网站的服务主体身份验证来创建 API连接
:
I can create the API Connection
with service principal authentication from the portal:
但是我找不到任何有关如何使用ARM模板创建API连接的文档.
But I can't find any documentation on how to create an API connection using ARM template.
但是我需要使用具有相同服务主体身份验证的ARM模板进行创建.
But I need to create using ARM template with the same service principal authentication.
推荐答案
您可以使用以下ARM模板为Azure数据工厂创建API连接:
You can create an API connection for Azure Data factory using ARM template like that:
{
"$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": {}
}
这篇关于使用ARM模板使用服务主体身份验证为Azure Data Factory创建API连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文