Azure / Azure/azure-rest-api-specs
Discrepancy in results for Storage Provider Usage API
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
Seeing some discrepancies in results when comparing Storage Resource Provider's Usages APIs:
[Usages - List](https://docs.microsoft.com/en-us/rest/api/storagerp/usages/list)
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Storage/usages?api-version=2018-03-01-preview
[Usages - List by Location](https://docs.microsoft.com/en-us/rest/api/storagerp/usages/listbylocation)
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages?api-version=2018-03-01-preview
Running the first query in multiple subscriptions returns a value that is lower than when specifying a location via the second query. Sample results:
Usage - List
```json
{
"value": [
{
"unit": "Count",
"currentValue": 119,
"limit": 250,
"name": {
"value": "StorageAccounts",
"localizedValue": "Storage Accounts"
}
}
]
}
```
Usage - List By Location (eastus2)
```json
{
"value": [
{
"unit": "Count",
"currentValue": 250,
"limit": 250,
"name": {
"value": "StorageAccounts",
"localizedValue": "Storage Accounts"
}
}
]
}
```
This is happening in more than one subscription, and as you can see, the total usage listed is much less than the list by location one. The list by location is accurate, whereas the List all results are not.
Contributor guide
Assessment
This issue has not been assessed yet.