部署逻辑应用程序时如何使用参数进行Salesforce API连接? [英] How to use parameters for salesforce API connection while deployment of Logic app?
问题描述
我已经开发了一个Logic应用程序,并希望使用参数文件进行部署.
I have developed a Logic app and want to deploy it using parameter file.
当我们在逻辑应用程序中使用
,因此我们可以将其作为服务总线连接字符串的服务总线连接器
时,我们具有服务总线连接字符串参数代码>.
When we use service bus connector
into logic app we have service bus connection string
so we can make it as a parameter for service bus connection string
.
但是在使用 salesforce连接器
时,它将要求登录
进入 designer面板
,并为 salesforce
.
But while using salesforce connector
it will ask for login
into designer panel
and generate a API connection for salesforce
.
但是在部署过程中,我找不到用于salesforce连接器的任何连接字符串或登录凭据url
.
But while deployment i do not find any connection string or login credential url for salesforce connector
.
我想知道它在部署过程中将如何用于其他资源组?
I wonder how it will work for other resource groups while deployment?
推荐答案
您的Logic App可以引用现有的Salesforce连接器吗?Salesforce连接器需要进行身份验证;但是,一旦通过身份验证,我相信您可以通过使用Logic App中的以下内容在ARM模板中引用它:
Can your Logic App reference the existing salesforce connector? Salesforce connectors need to be authenticated; however, once authenticated I believe you can reference it in your ARM template by using something like the following in the Logic App:
"$connections": {
"value": {
"salesforce": {
"id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', 'CONNECTION REGION', '/managedApis/', 'salesforce')]",
"connectionId": "[resourceId('Microsoft.Web/connections', parameters('salesforce_Connection_Name'))]",
"connectionName": "[parameters('salesforce_Connection_Name')]"
}
您可以使用以下方式在同一模板中部署连接:
You can deploy the connection in the same template with something like this:
{
"type": "MICROSOFT.WEB/CONNECTIONS",
"apiVersion": "2016-06-01",
"name": "[parameters('salesforce_Connection_Name')]",
"location": "centralus",
"properties": {
"api": {
"id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', 'INSERT REGION', '/managedApis/', 'salesforce')]"
},
"displayName": "[parameters('salesforce_Connection_DisplayName')]",
"nonSecretParameterValues": {
"token:LoginUri": "[parameters('salesforce_token:LoginUri')]",
"salesforceApiVersion": "[parameters('salesforce_salesforceApiVersion')]"
}
}
}
您必须将LoginURI作为参数传递,如果您具有多个Salesforce和Azure环境,则可以重复使用具有不同参数的同一模板,这是一件好事.
You'd have to pass in the LoginURI as a parameter which if you have multiple Salesforce and Azure environments would be a good thing to reuse the same template with different parameters.
这篇关于部署逻辑应用程序时如何使用参数进行Salesforce API连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!