Azure Ratecard Api to get VM price

401 views Asked by At

AWS provides a pricing api to get cost details of each service. If you want to know the price of an EC2 instance, you just pass the region,instance type(eg:t2.micro) and service code of EC2 to the pricing API and it returns the pricing details. I understand that azure exposes Ratecard API to get the prices. But It returns a huge JSON with all the services. How do I filter based on service type and its attributes. For example, I want the pricing details of Azure VM of instance type Standard_B2S in Central US. Is this possible?

1

There are 1 answers

0
Sajeetharan On

No there is no separate API available for it apart from RateCard, if you need to get the details of particular VM you can use Virtual Machine Rest API. See this link.

GET

https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes?api-version={apiVersion}