我需要使用 PowerShell 更新 Azure 容器应用程序的扩展规则。 MSDN 文档 上提供的示例并不是很有帮助。从 Azure 门户,这就是我需要做的,
更新容器应用程序的 PowerShell 命令应该是什么?
假设您想将并发请求数从 1 更改为 5。
具体操作方法如下:
$scaleRuleObject = New-AzContainerAppScaleRuleObject -Name "test-rule" -CustomType "http" -CustomMetadata @{"concurrentRequests"="5"}
Update-AzContainerApp -ContainerAppName demoapp -ResourceGroupName demoapp-rg -ScaleRule $scaleRuleObject