Set Default Azure Region - Exam DP-203: Data Engineering on Microsoft Azure

Check Available Regions for Azure Subscription

Question

You need to set your default Azure region.

You know that the region can be set using the following command: z config set defaults.location=<REGION> Here, you need to replace the <REGION> with the name of the region that is available for your subscription and you want to set.

Which of the following command would you run in Cloud Shell to check the regions that are available from your Azure subscription?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Correct Answer: B

az account list-locations command in Cloud Shell lists the available regions from your Azure subscription.

‘Azure CLI

az account list-locations \
--query "[].{Name: name, DisplayName: displayName}" \
--output table

Option A is incorrect.

The right command is az account list-locations, not az account locations-list.

Option B is correct.

the right command to be used to know the available regions is az account list-locations.

Option C is incorrect.

There is no command like az account regions-list in Azure.

Option D is incorrect.

az account list-regions is not the right command to find the regions.

Option E is incorrect.

az storage account create is used to create a new storage account.

To know more about building a data pipeline, please visit the below-given link:

The command z config set defaults.location=<REGION> is used to set the default Azure region for an Azure subscription. However, before setting the default region, you need to know which regions are available for your subscription. To do this, you can use the az account list-locations command.

Therefore, the correct answer is option B, which is "az account list-locations".

Option A, "az account locations-list", is not a valid command and will result in an error message.

Option C, "az account regions-list", and option D, "az account list-regions", are both invalid commands and will also result in an error message.

Option E, "az storage account create", is a valid command, but it is not used for listing available Azure regions.

In summary, the correct command to run in Cloud Shell to check the regions that are available from your Azure subscription is "az account list-locations".