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

发布时间 2023-08-21 11:24:19作者: 520_1351

一般在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 ]$