Shakthi
Shakthi

Reputation: 33

Azure Rate Card API JSON response don't have Memory and CPU metrics for Virtual Machines

I am trying to query the Azure Rate card API using the below Endpoint

https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Commerce/RateCard

I am able to see all azure resources with an hourly rate in its JSON response, but it doesn't have Memory and CPU values for Virtual Machines.

How to query the CPU, Memory along with hourly rate for Virtual Machines via REST API?

Upvotes: 2

Views: 189

Answers (1)

Jack Jia
Jack Jia

Reputation: 5549

Unfortunately, the Rate Card API is only used for getting the price for each resource. The VM's detailed properties are not included.

If you want to get the Memory and CPU values of a VM size, you can use the Resource SKU API.

But, you may need to add some additional coding. This is a probable workaround. Hope it would be helpful to you.

Upvotes: 0

Related Questions