Using Microsoft Azure's billing and usage API, I see that we can get the usage quantity of a resource for a project and the rate for the resource consumption from the rate card API. However, the rate card API, in some cases, has a list of key-value pairs.
For ex, consider the following MeterRates
:
"MeterRates": {
"0": 0.0832,
"1024": 0.0819,
"51200": 0.0806,
"512000": 0.0794,
"1024000": 0.0775,
"5120000": 0.0775
},
Here, if the usage quantity is, say, 102400; does it mean the cost of using the resource will be 102400 * 0.0784
or (102400 - 1023) * 0.0832 + (102400 - 1023 - 51200) * 0.0819
?
N.B.: I have an issue on the github repository for the billing and usage API regarding the same.