Home > Software design >  Is there a call to Azure API to list resource details in regions that I use in my subscription?
Is there a call to Azure API to list resource details in regions that I use in my subscription?

Time:09-29

I certain Azure regions I use , not all. I can use the following call

az account list-locations

But that gives all supported regions. Is there a call i can make to give back resources for a particular region including resource details and cost ?

CodePudding user response:

You can use az resource list which accepts a location parameter.

az resource list --location westus

This will give you high level details about the resources in the region specified via location parameter and will not give you the cost.

For getting full details about the resources, you will need to use resource specific CLI commands e.g. az storage account show to get detailed information about a storage account.

Also for costs, you will need to use cost management related CLI commands.

  • Related