I'm trying to get the Forecast cost of my Azure Subscription. To do this, I'm using what I found in this documentation:
Forecast - Usage.
I tried to use the TRY button in the documentation of Microsoft with this JSON:
{ type: "Usage", dataset: { "granularity": "monthly", "aggregation":{ "totalCost":{ "name":"Cost", "function":"Sum" } } }, timeframe: "MonthToDate" }
and I get ERROR 400 with this response:
{ "error":{ "code":"BadRequest", "message":"Invalid query definition: Invalid dataset grouping: 'BillingPeriod'; valid values: 'ResourceGroup','ResourceGroupName','ResourceType','ResourceId','ResourceLocation','SubscriptionId','SubscriptionName','MeterCategory','MeterSubcategory','Meter','ServiceFamily','UnitOfMeasure','PartNumber','BillingAccountName','BillingProfileId','BillingProfileName','InvoiceSection','InvoiceSectionId','InvoiceSectionName','Product','ResourceGuid','ChargeType','ServiceName','ProductOrderId','ProductOrderName','PublisherType','ReservationId','ReservationName','Frequency','InvoiceId','PricingModel','CostAllocationRuleName','MarkupRuleName','BillingMonth','Provider','BenefitId','BenefitName','CustomerTenantId','CustomerTenantDomainName','ResellerMPNId','PartnerEarnedCreditApplied','CustomerName','PartnerName',''.\r\n\r\n (Request ID: 16022d38-1857-4be5-a8cd-1b488325aa9b)" } }
What is the problem?
Thanks