Azure / Azure/azure-rest-api-specs

CostManagement Query grouping by Tag produces empty column

Open
#22,884 2 comments 0 reactions 0 assignees View on GitHub
Cost Management - Query customer-reported needs-team-attention question Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

Hello, I am attempting to include tags (both keys and values) in the grouping for the results from the Query endpoint. I have attempted to use `grouping` and the `configuration` items. Using the grouping results in the `Tag` column being present in the data, but all of the values are just `""`. I was following instructions from this thread https://github.com/Azure/azure-rest-api-specs/issues/12158#issuecomment-758238927

Request Body:

```
{
"type": "Usage",
"timeframe": "Custom",
"timePeriod": {
"from": ...,
"to": ...
},
"dataset": {
"granularity": "Daily",
"aggregation": {
"totalCostUSD": {
"name": "CostUSD",
"function": "Sum"
}
},
"grouping": [
{
"type": "Tag"
},
{
"type": "TagKey"
},
{
"type": "TagValue"
},
{
"type": "Dimension",
"name": "ResourceGroupName"
},
{
"type": "Dimension",
"name": "ChargeType"
},
{
"type": "Dimension",
"name": "ResourceId"
},
{
"type": "Dimension",
"name": "MeterCategory"
},
{
"type": "Dimension",
"name": "MeterSubcategory"
},
{
"type": "Dimension",
"name": "Meter"
},
{
"type": "Dimension",
"name": "SubscriptionId"
},
{
"type": "Dimension",
"name": "ResourceLocation"
}
]
}
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the Cost Management Query endpoint and compare the reported request with the guidance in the linked azure-rest-api-specs issue. Reproduce the grouping request and inspect the Cost Management API specification for Tag, TagKey, and TagValue behavior. Done means identifying and correcting the specification issue, or documenting that the service does not return tag values as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.