简体   繁体   中英

How do I interpret the includedQuantity in Azure's rate card API?

I am trying to calculate the cost incurred on my Azure Pay-As-You-Go subscription using the usage and rate-card API's. For this I came across this parameter includedQuantity in the rate-card API's which, according to the documentation , refers to "The resource quantity that is included in the offer at no cost. Consumption beyond this quantity will be charged."

Consider an example, where the usageQuantity is 700 and the rate-card is as follows:

0 : 20
101 : 15
501 : 10

and the includedQuantity is 200.

My assumption was, the calculation would be as one of the following:

  1. Quantity = (700 - 200) = 500 Hence, cost = 100 * 20 + 400 * 15 = 8000

  2. New rate card:

0 : 0 101 : 0 201 : 15 501 : 10

So, cost = 300 * 15 + 200 * 10 = 6500

I have seen this question , but it does not clarify the includedQuantity properly.

Great question! So I checked with Azure Billing team on this and what they told me is that they will first take off the included units (200 in your example) and then apply graduated pricing on the remaining units.

Based on this, your cost would be 4500 :

Total units consumed: 700 Included units: 200 Tiered pricing: {0-100 = 0; 101-200 = 0; 201-500=15; 501-No Upper Limit=10}

4500 = 0 x 100 + 0 x 100 + 15 x 300

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