是否有任何 az cli 命令可以了解 Azure 特定区域中可用区域的数量(1?2?3?)? 我正在尝试专门获取 EventGrid 和事件中心的这些详细信息..
最佳答案
Count of Availability Zones in Each region:
要列出位置和可用区域,请使用以下 CLI 命令。
az account list-locations -o table
要列出 eastUS
区域中的位置和可用区域,请使用以下 CLI 命令。
az account list-locations -o table --query "[?name=='eastus']"
要计算可用区域的数量,请使用 length([])
函数如图所示。
az account list-locations -o table --query "length([])"
要检索任何特定资源的可用区域及其计数,请使用以下 CLI 命令:(例如:EventHub)
az eventhubs eventhub list --resource-group <resourcegroup> --namespace-name <Namespace> --query "[?contains('Location', 'WestUS')]" -o table
az resource list --resource-group <resourcegroup> --name <resourceName> --resource-type Microsoft.EventGrid/domains --query "length([])"
关于azure - Azure 中每个区域中 EventGrid 、事件中心的可用区计数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76971546/