2
votes

I am looking for Azure REST API that will help me calculate the cost of creating azure resources in advance. I got Azure Billing REST API. It certainly helps in getting the price of already created azure resources on monthly basis. But, I need it for Pre-consumption cost analysis. Kindly help me how to use the same to achieve the cost estimation without creating the resources.

Input: n number of VMs output: the latest cost of the VM(with specific criteria)*n.

Thanks in advance.

1

1 Answers

0
votes

Actually, the Azure Billing API provides all that information as well with its Resource RateCard call:

https://msdn.microsoft.com/en-us/library/azure/mt219005.aspx

Just make sure you provide the appropriate OfferDurableId as prices for resources depend on which plan you fall under.

Also, when sending your request, you might want to escape the apostrophes to %27 or the call might fail for you.