Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用powershell设置azure逻辑应用程序参数_Azure_Powershell_Azure Logic Apps_Azure Powershell_Powershell 4.0 - Fatal编程技术网

如何使用powershell设置azure逻辑应用程序参数

如何使用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

我正在尝试使用powershell设置逻辑应用程序的参数,这是我正在使用的代码:

$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
通常包含的内容,您可以检查问题是否存在于此。如果你还有任何问题,请告诉我!