使用 PowerShell 更新 Azure 容器应用程序扩展规则

问题描述 投票:0回答:1

我需要使用 PowerShell 更新 Azure 容器应用程序的扩展规则。 MSDN 文档 上提供的示例并不是很有帮助。从 Azure 门户,这就是我需要做的, enter image description here

更新容器应用程序的 PowerShell 命令应该是什么?

azure powershell azure-container-apps
1个回答
0
投票

假设您想将并发请求数从 1 更改为 5。

具体操作方法如下:

$scaleRuleObject = New-AzContainerAppScaleRuleObject -Name "test-rule" -CustomType "http" -CustomMetadata @{"concurrentRequests"="5"}
Update-AzContainerApp -ContainerAppName demoapp -ResourceGroupName demoapp-rg -ScaleRule $scaleRuleObject
© www.soinside.com 2019 - 2024. All rights reserved.