The data object for a budget validation request, containing the resource type, ID, and budget attributes to validate.
attributes
object
The attributes of a budget including all its monthly entries.
created_at
int64
The timestamp when the budget was created.
created_by
string
The ID of the user that created the budget.
end_month
int64
The month when the budget ends, in YYYYMM format.
entries
[object]
The list of monthly budget entries.
amount
double
The budgeted amount for this entry.
costs
object
Cost data for this entry. Present only when actual=true or forecast=true is requested.
actual
double
The actual cost for this entry. Present only when actual=true is requested.
amount
double
The budgeted amount for this entry.
custom_forecast
double
The custom forecast override for this entry. null when forecast=true is requested but no custom forecast has been set for this entry's month. A numeric value, including 0, indicates an explicit custom forecast override. Omitted when forecast=false or the feature is not available for the organization.
forecast
double
The final forecast for this entry, with any custom forecast override applied. Present only when forecast=true is requested.
ootb_forecast
double
The out-of-the-box ML forecast for this entry, before custom overrides. Present only when forecast=true is requested.
month
int64
The month this budget entry applies to, in YYYYMM format.
tag_filters
[object]
The list of tag filters that scope this budget entry to specific resources.
tag_key
string
The tag key to filter on.
tag_value
string
The tag value to filter on.
metrics_query
string
The cost query used to track spending against the budget.
name
string
The name of the budget.
org_id
int64
The ID of the organization the budget belongs to.
start_month
int64
The month when the budget starts, in YYYYMM format.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Validate budget returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.CloudCostManagementApi(configuration);constparams: v2.CloudCostManagementApiValidateBudgetRequest={body:{data:{attributes:{createdAt: 1738258683590,createdBy:"00000000-0a0a-0a0a-aaa0-00000000000a",endMonth: 202502,entries:[{amount: 500,month: 202501,tagFilters:[{tagKey:"service",tagValue:"ec2",},],},{amount: 500,month: 202502,tagFilters:[{tagKey:"service",tagValue:"ec2",},],},],metricsQuery:"aws.cost.amortized{service:ec2} by {service}",name:"my budget",orgId: 123,startMonth: 202501,totalAmount: 1000,updatedAt: 1738258683590,updatedBy:"00000000-0a0a-0a0a-aaa0-00000000000a",},id:"1",type:"budget",},},};apiInstance.validateBudget(params).then((data: v2.BudgetValidationResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));