简体   繁体   中英

Azure Ratecard Api to get VM price

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?

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}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM