如何使用powershell设置azure逻辑应用程序参数
我正在尝试使用powershell设置逻辑应用程序的参数,这是我正在使用的代码:如何使用powershell设置azure逻辑应用程序参数,azure,powershell,azure-logic-apps,azure-powershell,powershell-4.0,Azure,Powershell,Azure Logic Apps,Azure Powershell,Powershell 4.0,我正在尝试使用powershell设置逻辑应用程序的参数,这是我正在使用的代码: $parameters = '{ "$connections": { "syncSourceDatabaseConnection": { "connectionId": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsof
$parameters = '{
"$connections": {
"syncSourceDatabaseConnection": {
"connectionId": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Web/connections/xxxx",
"connectionName": "xxx",
"id": "/subscriptions/xxx/providers/Microsoft.Web/locations/southeastasia/managedApis/sql"
},
"syncTargetDatabaseConnection": {
"connectionId": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Web/connections/xxx",
"connectionName": "xxx",
"id": "/subscriptions/xxx/providers/Microsoft.Web/locations/southeastasia/managedApis/sql"
}
}
}'
Set-AzLogicApp -ResourceGroupName "xxx" -ResourceName "xxx" -Parameters $parameters -Force
代码执行正常,但未设置连接,如何修复此问题?您可以使用以下命令:
Set-AzLogicApp -ResourceGroupName "<resourcegroup>" -ResourceName "<name>" -ParameterFilePath "C:\Users\xxx\xxx\test.json" -Force
设置AzLogicApp-ResourceGroupName”“-ResourceName”“-ParameterFilePath”C:\Users\xxx\xxx\test.json“-Force
如果您使用此命令,则需要在本地创建json文件。hello@FrankGong感谢您的回答,但它不起作用,而且,我希望使用-Parameters not-parameterFilePath。我看到
$connections
通常包含的内容,您可以检查问题是否存在于此。如果你还有任何问题,请告诉我!