[英]Azure CLI Show Resource Group Locations
So i'm trying to let the Azure CLI show all the possible location i can use for making a resource group所以我试图让 Azure CLI 显示我可以用来制作资源组的所有可能位置
I am searching for a command similar to az account list-locations
the reason i am not using the account list-location line is because for an example one of the locations is Australiacentral2 which does not exist for making a resource group but does exist for account locations我正在搜索类似于az account list-locations
的命令,我不使用 account list-location 行的原因是因为例如其中一个位置是 Australiacentral2,它不存在用于创建资源组但确实存在用于帐户地点
First I need to point out, the Azure CLI command az account list-locations
does in fact list all the available areas for your subscription. 首先,我需要指出,Azure CLI命令az account list-locations
确实列出了订阅的所有可用区域。 However, some of these regions such as Australia Central 2 or the India regions require you go apply to deploy there. 但是,其中一些区域(如澳大利亚中部2或印度区域)需要您申请在那里部署。
And it seems there is no other command can do better than it as the portal. 似乎没有其他命令比门户更好。 Seems like a gap between the Portal Experience and the CLI experience. 门户体验和CLI体验之间似乎有些差距。
You can bring up this issue directly to the Azure CLI team using this link . 您可以使用此链接直接向Azure CLI团队提出此问题。
You can also use: 您还可以使用:
az provider list
which includes available locations for different resource types for your subscription. 其中包括您订阅的不同资源类型的可用位置。
Best regards, Johan Stenberg 最好的问候,约翰·斯坦伯格
My answer here is just for the history:我在这里的回答只是为了历史:
az provider list --query "[?namespace=='Microsoft.Resources'].[resourceTypes[?resourceType=='resourceGroups'].locations[]][][]"
The output: output:
[
"Central US",
"East Asia",
"Southeast Asia",
"East US",
"East US 2",
"West US",
"West US 2",
"North Central US",
"South Central US",
"West Central US",
"North Europe",
"West Europe",
"Japan East",
"Japan West",
"Brazil South",
"Australia Southeast",
"Australia East",
"West India",
"South India",
"Central India",
"Canada Central",
"Canada East",
"UK South",
"UK West",
"Korea Central",
"Korea South",
"France Central",
"South Africa North",
"UAE North",
"Australia Central",
"Switzerland North",
"Germany West Central",
"Norway East",
"West US 3",
"Sweden Central"
]
To pass these regions to the az group create
command just remove spaces and lowercase.要将这些区域传递给az group create
命令,只需删除空格和小写字母。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.