Output of az account list-locations

Keren Shviki 20 Reputation points
2023-04-13T12:50:53.6166667+00:00

Hi team, Following Azure_cis_2.0.0 - 6.6 Ensure that Network Watcher is 'Enabled' (Automated) , I'm trying to enable the Network Watcher for all the available regions for the subscription. When I'm running the command: az account list-locations I got 79 regions which some of them are Logical and some of them I can't really enable the NetworkWatcher for. For example:

{ "displayName": "Central US (Stage)", "id": "/subscriptions/5cd10faf-04e9-47fc-81b7-0657eedfc611/locations/centralusstage", "metadata": { "geographyGroup": "US", "regionCategory": "Other", "regionType": "Logical" }, "name": "centralusstage", "regionalDisplayName": "(US) Central US (Stage)" }

In actual fact there are only 37 available locations within the subscription that I can enable the NetworkWatcher for. Can you please assist? Why this command return regions that are not necessarily available for the subscription? There is another command that I can run in order to return just the relevant locations? Thanks !

Azure Network Watcher
Azure Network Watcher
An Azure service that is used to monitor, diagnose, and gain insights into network performance and health.
161 questions
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 24,231 Reputation points Microsoft Employee
    2023-04-18T23:13:29.4933333+00:00

    @Keren Shviki

    Thank you for providing the additional details above.

    Currently there is no Azure CLI or PowerShell command available to list the regions where network watcher can be enabled. This is the list of Azure regions where Network watcher can be enabled.

    You can enable Azure Network Watcher in every region available via portal instead by following the steps below.

    • Go to portal.azure.com and search for Network Watcher as shown below. User's image
    • On the Network Watcher window click Add. User's image
    • Select your subscription and it will list the available regions where you can enable Network watcher , click select all and then Add. (if the list is empty then that means you have already enabled Network Watcher for all available regions)

    User's image

    If it is possible, can you please send me the link for Azure CIS 2.0.0 documentation you are following? I will check if we can add the information above.

    Hope this helps! Please let me know if you have any additional questions. Thank you!

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Sreeju Nair 12,181 Reputation points
    2023-04-13T20:34:13.6033333+00:00

    You may filter the Azure CLI command, for e.g. to get only Physical regions, not logical, use the following command.

    az account list-locations --query [?metadata.regionType=='Physical'] -o Table

    If you want to use only Logical ones, replace Physical with Logical ones.

    az account list-locations --query [?metadata.regionType=='Logical'] -o Table

    e.g. see the output below. User's image


  2. Keren Shviki 20 Reputation points
    2023-04-19T08:12:48.85+00:00

    Thanks for the response. Here you can find Azure CIS 2.0.0 documentation https://downloads.cisecurity.org/#/

    0 comments No comments