DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   

List Azure physical locations, display names and regional names in the current subscription

By Ashok Nalam on 18 Aug 2020 | Category: Microsoft Azure | Tagged: azure azure cli azure shell 
In order to see the list of supported Azure regions for your current subscription you can use “az account list-locations” command from https://shell.azure.com. The command shows displayName, geographyGroup, pairedRegion, physicalLocation, name, regionalDisplayName and subscriptionId.
  Discuss Add Comment   |  
Add rating Rate this resource   

Introduction

In order to see the list of supported Azure regions for you current subscription you can use “az account list-locations” command from https://shell.azure.com or Azure CLI. The output of command will show complete list of regions in JSON format like below

{
    "displayName": "North Central US",
    "id": "/subscriptions/b6aa3c6b-a99b-48dc-9051-1d499e8641/locations/northcentralus",
    "metadata": {
      "geographyGroup": "US",
      "latitude": "41.8819",
      "longitude": "-87.6278",
      "pairedRegion": [
        {
          "id": "/subscriptions/b6aa3c6b-a99b-48dc-9051-122d499e8641/locations/southcentralus",
          "name": "southcentralus",
          "subscriptionId": null
        }
      ],
      "physicalLocation": "Illinois",
      "regionCategory": "Recommended",
      "regionType": "Physical"
    },
    "name": "northcentralus",
    "regionalDisplayName": "(US) North Central US",
    "subscriptionId": null
  }

Format the Output Result

In order to get the output in table format we can use below command

az account list-locations -o table

Azure Locations List - Formatted Output

Fig: Azure Locations List - Formatted Output

Find specific columns:

Use the below query to find specific columns. See http://jmespath.org/ for more information and examples. To get more column names(like displayName, name or regionalDisplayName) use “az account list-locations" command.

az account list-locations --query "[].{DisplayName:displayName, Name:name,region:regionalDisplayName}" -o table 

Sort data by Name

We can sort the table data using below command. Below command shows sorting by Name.
az account list-locations --query "sort_by([].{DisplayName:displayName, Name:name}, &Name)" --output table
  Discuss Add Comment    
Add rating Rate this resource   
About the Contributor
Member Since : 10 Dec 2012
Member Points (Level) : 9226  (Professional)
Location : INDIA
Home Page : http://dotnetmirror.com
About : I am admin of this site.
Rate this resource
 
Add your Comment
Name Email WebSite
Captcha Refresh


Comments (1)
 
1. By 1SB5dIhpvXtlvDCdNbrF on 01 Jun 2023

SLCm0xoTmlELggodLGIpjo4IsxxL4AjkokbcYTEK9axiuY8fLhZvtsWeTgk0MfA5AQvKlV3VltgpotmPYTvRJRsutGxfapzWjpRGBQPZ6B9nTBezpHCtw6ycB1UIRgzqhzrPiAddhHlsmbAHJSg9mY3GyUYRG9dyzyZdK9edu2DdzFSO60MiQdyBf

 
cheap jordans|wholesale air max|wholesale jordans|wholesale jewelry|wholesale jerseys