I have the same issue as is described in this question on StackOverflow (only answered with a less preferred workaround). I am performing a query of Usage to the Cost Management API, version 2021-10-01. Through the configuration property in the request body I am supposed to be able to select columns. But whichever column I enter, out of all the possible values, all I get in return is "UsageDate" and "Currency". How do I get any other column?
Example request body:
{
"Type": "Usage",
"Timeframe": "MonthToDate",
"TimePeriod": null,
"Dataset": {
"Granularity": "Daily",
"Configuration": {
"Columns": [
"DepartmentName",
"AccountName",
"AccountOwnerId",
"SubscriptionGuid",
"SubscriptionName",
"ResourceGroup",
"ResourceLocation",
"UsageDateTime",
"ProductName",
"MeterCategory",
"MeterSubcategory",
"MeterId",
"MeterName",
"MeterRegion",
"UnitOfMeasure",
"UsageQuantity",
"ResourceRate",
"PreTaxCost",
"CostCenter",
"ConsumedService",
"ResourceType",
"InstanceId",
"Tags",
"OfferId",
"AdditionalInfo",
"ServiceInfo1",
"ServiceInfo2"
]
},
"Aggregation": null,
"Grouping": null,
"Filter": null
}
}
Response body:
{
"id": "subscriptions/XXXXXXXXXXXXXX/providers/Microsoft.CostManagement/query/XXXXXXXXXXXXX",
"name": "XXXXXXXXXX",
"type": "Microsoft.CostManagement/query",
"location": null,
"sku": null,
"eTag": null,
"properties": {
"nextLink": null,
"columns": [
{
"name": "UsageDate",
"type": "Number"
},
{
"name": "Currency",
"type": "String"
}
],
"rows": [
[
20221101,
"EUR"
],
[
20221102,
"EUR"
]
]
}
}