是否有任何 az cli 命令可以了解 Azure 特定区域中可用区域的数量(1?2?3?)? 我正在尝试专门获取 EventGrid 和事件中心的这些详细信息..
每个区域的可用区数量:
要列出位置和可用区域,请使用以下 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([])"