Dan Csharpster
Dan Csharpster

Reputation: 2732

how to call azure to get resource for classic (ASM) storage account

We have some ARM as well as some legacy Azure ASM resources and I have a need to query azure endpoints for info on both the ARM and the classic storage resources. I can query the ARM just fine, but when I try to query the classic via the same url, I get no data.

ARM attempt url:

https://management.azure.com/subscriptions/abcdef-123456/resourceGroups/MyEastResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts
/myazureresourcename?api-version=2015-08-19

Attempted classic (ASM) url:

https://management.azure.com/subscriptions/abcdef-123456/resourceGroups/MyEastResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/myazureresourcename?api-version=2015-08-19

Upvotes: 0

Views: 206

Answers (1)

VenkateshDodda
VenkateshDodda

Reputation: 5506

api-version=2015-08-19

Looks like the API Version, you are using is not valid when we have tried to get the properties of the storage account using postman & request got failed with the below error.

enter image description here

We have tested this in our local environment it is working fine, Below statements are based on the analysis.

In our local environment, Using postman & Azure Management Rest API's. We are able to get the properties of the classic storage account.

Below are the list of api versions supported by the classic storage account's:

  • 2016-11-01
  • 2016-04-01
  • 2015-12-01
  • 2015-06-01
  • 2014-06-01
  • 2014-04-01-beta
  • 2014-04-01
  • 2014-01-01

Here is the sample output for reference :

enter image description here

Upvotes: 1

Related Questions