Azure / Azure/azure-rest-api-specs
Get consumption data API - The consumed quantity didn't match with the v1 usage report
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 424
Description
Following with the document: https://msdn.microsoft.com/en-us/library/azure/mt219001
SubscriptionType: PAYG
Billingcycle: 12th to 11th every month
=Issue Description=
From the v1 usage report, there are two parts: the up-side is the total consumed quantity by sub-category this month, and the down-side is the daily consumed quantity. That means by sum of the daily consumed quantity will be equals to the total consumed quantity.
However, we found the the response of daily consumed from API is not totally match with the v1 usage daily report, then the monthly consumed will also not match.
=Sample Request=
https://management.azure.com/subscriptions/{subscription-Id}/providers/Microsoft.Commerce/UsageAggregates?api-version=2015-06-01-preview&reportedStartTime=2018-05-12T00%3a00%3a00%2b00%3a00&reportedEndTime=2018-06-12T00%3a00%3a00%2b00%3a00&aggregationGranularity=Daily&showDetails=false
=Partial Response=
{
"name": "Daily_BRSDT_20180512_0000",
"type": "Microsoft.Commerce/UsageAggregate",
"properties": {
"usageStartTime": "2018-05-11T00:00:00+00:00",
"usageEndTime": "2018-05-12T00:00:00+00:00",
"meterName": "IP Address Hours",
"meterCategory": "Networking",
"meterSubCategory": "Reserved IP",
"unit": "Hours",
"meterId": "26ce34b7-67b3-480d-9d1b-54a7fb80f67a",
"infoFields": {},
"quantity": **6.5999999999999994**
}
},
{
"name": "Daily_BRSDT_20180512_0000",
"type": "Microsoft.Commerce/UsageAggregate",
"properties": {
"usageStartTime": "2018-05-11T00:00:00+00:00",
"usageEndTime": "2018-05-12T00:00:00+00:00",
"meterName": "IP Address Hours",
"meterCategory": "Networking",
"meterSubCategory": "Reserved IP",
"unit": "Hours",
"meterId": "26ce34b7-67b3-480d-9d1b-54a7fb80f67a",
"infoFields": {},
"quantity": **5.79999999999999947**
}
},
The above response from API show the consumed quantity on 2018-05-11 of Reserved IP was 6.59999 + 5.79999 = **12.399**
=V1 Usage Report=
The consumed quantity show on usage report on 2018-05-11 is **21.2**
https://vmtestdiag0703.blob.core.windows.net/reservedip/reservedip.PNG
=Question=
Is there any old API version can be used to get the same consumed quantity with v1 usage report ? Or any workaround to make the total consumed quantity same with the v1 usage report? Thanks.
Contributor guide
Research direction
Start with the Microsoft.Commerce/UsageAggregates endpoint and the supplied Daily request and response, then compare its quantity values with the linked v1 usage report for the stated billing period. Done means establishing whether the discrepancy is an API-version or reporting difference and documenting a confirmed workaround or required specification change; no repository file or test is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100