博客园  :: 首页  :: 管理

关于Azure-列出当前订阅支持的所有-Location-区域位置

Posted on 2023-08-21 11:15  520_1351  阅读(126)  评论(0编辑  收藏  举报

一般在cli或者terraform等命令行代码中,经常会需要指定Location位置

那么如何才能知道所有的Location-区域位置呢,其实可以使用azure cli 命令查询出来

可以使用:az account list-locations 进行查询,但是输出内容较多

于是可以使用一些选项及参数,简洁的列出较为重要的两个字段就可以了,如下:

li [ ~/qq-5201351 ]$ az account list-locations --query "[].{DisplayName:displayName,Name:name}" --output table
DisplayName               Name
------------------------  -------------------
East US                   eastus
East US 2                 eastus2
South Central US          southcentralus
West US 2                 westus2
West US 3                 westus3
Australia East            australiaeast
Southeast Asia            southeastasia
North Europe              northeurope
Sweden Central            swedencentral
UK South                  uksouth
West Europe               westeurope
Central US                centralus
South Africa North        southafricanorth
Central India             centralindia
East Asia                 eastasia
Japan East                japaneast
Korea Central             koreacentral
Canada Central            canadacentral
France Central            francecentral
Germany West Central      germanywestcentral
Norway East               norwayeast
Poland Central            polandcentral
Switzerland North         switzerlandnorth
UAE North                 uaenorth
Brazil South              brazilsouth
Central US EUAP           centraluseuap
Qatar Central             qatarcentral
Central US (Stage)        centralusstage
East US (Stage)           eastusstage
East US 2 (Stage)         eastus2stage
North Central US (Stage)  northcentralusstage
South Central US (Stage)  southcentralusstage
West US (Stage)           westusstage
West US 2 (Stage)         westus2stage
Asia                      asia
Asia Pacific              asiapacific
Australia                 australia
Brazil                    brazil
Canada                    canada
Europe                    europe
France                    france
Germany                   germany
Global                    global
India                     india
Japan                     japan
Korea                     korea
Norway                    norway
Singapore                 singapore
South Africa              southafrica
Switzerland               switzerland
United Arab Emirates      uae
United Kingdom            uk
United States             unitedstates
United States EUAP        unitedstateseuap
East Asia (Stage)         eastasiastage
Southeast Asia (Stage)    southeastasiastage
Brazil US                 brazilus
East US STG               eastusstg
North Central US          northcentralus
West US                   westus
Jio India West            jioindiawest
East US 2 EUAP            eastus2euap
South Central US STG      southcentralusstg
West Central US           westcentralus
South Africa West         southafricawest
Australia Central         australiacentral
Australia Central 2       australiacentral2
Australia Southeast       australiasoutheast
Japan West                japanwest
Jio India Central         jioindiacentral
Korea South               koreasouth
South India               southindia
West India                westindia
Canada East               canadaeast
France South              francesouth
Germany North             germanynorth
Norway West               norwaywest
Switzerland West          switzerlandwest
UK West                   ukwest
UAE Central               uaecentral
Brazil Southeast          brazilsoutheast
li [ ~/qq-5201351 ]$

上面就是当前订阅所支持的所有Location位置了,当然支持的位置是会有更新的,建议以最新的执行结果为准~

以Azure CLI为例 ,笔者测试创建虚拟机时,是可以使用--location选项指定 DisplayName 和 Name (如Japan East | japaneast)都是可以的

 

 

 

尊重别人的劳动成果 转载请务必注明出处:https://www.cnblogs.com/5201351/p/17645523.html