-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Microsoft.CostManagement Subscription can't grouping by ResourceGroup on type Forecast #16507
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ms-premp, @ramaganesan-rg. Issue DetailsHello, When I call the api .CostManagement SubscriptionForecast with type "Query" the response return data with ResourceGroup, but not return the forecast value. If I use the same JSON body and chage the type of call to forecast, don't return more grouping by ResourceGroup and return the CostStatus with Forecast but stop return ResourceGroup: Examples working grouping by ResourceGroup, but don't return with CostStatus Forecast values, the response stop on today date. POST https://management.azure.com/subscriptions/subscriptions_ID/providers/Microsoft.CostManagement/forecast?api-version=2021-10-01 What said documentation: How I can call the API POST subscriptions/subscriptions_ID/providers/Microsoft.CostManagement/forecast with this columns? Thanks.
|
Applying the correct tag so that its gets routed to right team. Cost Management tag is deprecated. We have more granular tags for right routing. |
The sample response for the Forecast response is misleading. This API only returns the columns PreTaxCost, UsageDate, CostStatus, and Currency. I will update this accordingly. |
Instead of fixing the documentation, why don't you fix the API to return the "forecast" equal to the value I return in the "Query" type with ResourceGroup? |
Hello,
When I call the api .CostManagement SubscriptionForecast with type "Query" the response return data with ResourceGroup, but not return the forecast value. If I use the same JSON body and chage the type of call to forecast, don't return more grouping by ResourceGroup and return the CostStatus with Forecast but stop return ResourceGroup:
Examples working grouping by ResourceGroup, but don't return with CostStatus Forecast values, the response stop on today date.
-> POST https://management.azure.com/subscriptions/subscriptions_ID/providers/Microsoft.CostManagement/Query?api-version=2021-10-01
-> JSON Body:
{
"type": "ActualCost",
"dataset": {
"granularity": "Daily",
"aggregation": {
"totalCost": {
"name": "PreTaxCost",
"function": "Sum"
}
},
"grouping": [
{
"type": "Dimension",
"name": "ResourceGroup"
}
]
},
"timeframe": "Custom",
"timePeriod": {
"from": "2021-10-01T00:00:00+00:00",
"to": "2021-10-31T23:59:59+00:00"
},
"includeActualCost": true,
"includeFreshPartialCost": false
}
Attach Result:

POST https://management.azure.com/subscriptions/subscriptions_ID/providers/Microsoft.CostManagement/forecast?api-version=2021-10-01
JSON Body: Same above.
Attach Result:

What said documentation:
https://docs.microsoft.com/en-us/rest/api/cost-management/forecast/usage#subscriptionforecast
How I can call the API POST subscriptions/subscriptions_ID/providers/Microsoft.CostManagement/forecast with this columns?
"columns": [
{
"name": "PreTaxCost",
"type": "Number"
},
{
"name": "ResourceGroup",
"type": "String"
},
{
"name": "UsageDate",
"type": "Number"
},
{
"name": "CostStatus",
"type": "String"
},
{
"name": "Currency",
"type": "String"
}
],
Thanks.
The text was updated successfully, but these errors were encountered: