Azure 中每个区域中 EventGrid 、事件中心的可用区计数

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

是否有任何 az cli 命令可以了解 Azure 特定区域中可用区域的数量(1?2?3?)? 我正在尝试专门获取 EventGrid 和事件中心的这些详细信息..

azure azure-resource-manager azure-eventhub azure-eventgrid availability-zone
1个回答
0
投票

每个区域的可用区数量:

要列出位置和可用区域,请使用以下 CLI 命令。

az account list-locations -o table

enter image description here

要列出

eastUS
区域中的位置和可用区域,请使用以下 CLI 命令。

az account list-locations -o table --query "[?name=='eastus']"

enter image description here

要计算可用区的数量,请使用

length([])
函数,如图所示。

az account list-locations -o table --query "length([])"

enter image description here

要检索任何特定资源的可用区域及其计数,请使用以下 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([])"
© www.soinside.com 2019 - 2024. All rights reserved.