Create a budget

Create a new budget

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Request body for creating a budget.

alerts
array of objects

List of up to three thresholds defined as a percentage of the amount.

alerts
double

Budget period amount
required: true(if usePrevSpend is false)

seasonalAmounts
array of doubles

List of seasonal amounts for recurring budgets with different amounts per period.

seasonalAmounts
collaborators
array of objects

List of permitted users to view/edit the report.

collaborators
string
enum
required

Currency code for monetary values.

string
enum

Data source used to evaluate the budget.
When omitted on create, the API resolves the data source to billing-datahub if the customer has DataHub metrics configured, otherwise billing.
On update, omission preserves the saved data source.

Show Details
billingStandard Cloud Analytics billing data only.
billing-datahubBilling data plus DataHub custom dimensions and metrics (requires a DataHub subscription).
Allowed:
string

Budget description

int64

Fixed budget end date
required: true(if budget type is fixed)

double
Defaults to 0

Periodical growth percentage in recurring budget

string
enum
Defaults to cost

Budget metric

Allowed:
string
required
length ≥ 1

Budget Name.

string
enum
Allowed:
recipients
array of strings

List of emails to notify when reaching alert threshold.

recipients
recipientsSlackChannels
array of objects

List of Slack channels to notify when reaching alert threshold.

recipientsSlackChannels
scopes
array of objects
required
length ≥ 1

The filters selected define the scope of the budget. At least one filter is required.

scopes*

To include or exclude certain values.
When using allocation rules as a filter, both the type and the ID must be "allocation_rule", and the values array contains the allocation rule IDs.
When using allocations as a filter, the type must be "allocation" and the ID is the actual allocation group ID.

string
required

Dimension key to filter on. Must pair with type and match a dimension returned by GET /analytics/v1/dimensions (for example, service_description with type: fixed). For allocation_rule, use allocation_rule. For allocation, use the allocation group ID. See DimensionsTypes for how each type uses id.

string
enum
required

Dimension filter type. Always pair type with id on scope filters. Discover valid id + type pairs for your account with GET /analytics/v1/dimensions. allocation_rule replaces attribution; allocation replaces attribution_group.

Show Details
fixedStandard built-in billing dimensions (Service, Provider, Project/Account ID, SKU, Region, etc.).
labelCustomer-defined resource labels; id is the label key, values are label values.
tagAWS cost allocation tags; id is the tag key.
project_labelGoogle Cloud project-level labels; id is the label key.
system_labelDoiT- or provider-generated system labels; id is the system label key.
optionalConsole grouping for label/tag keys; use label, tag, project_label, or system_label in API scopes.
datetimeTime dimensions (Year, Month, Day) for date-based filtering or grouping.
allocation_ruleAllocation rule filter; id must be allocation_rule, values are rule IDs.
allocationAllocation group filter; id is the allocation group ID.
gkeGoogle Kubernetes Engine cost-allocation dimensions.
gke_labelGKE workload labels; id is the label key.
attributionDeprecated. Use allocation_rule.
attribution_groupDeprecated. Use allocation.
attribution_tier_1Tier 1 values of an Attribute attribution; id is the attribution set ID with `-` replaced by `_`. Reports only, with dataSource attribution.
attribution_tier_2Tier 2 values of an Attribute attribution; id is the attribution set ID with `-` replaced by `_`. Reports only, with dataSource attribution.
attribution_tier_3Tier 3 values of an Attribute attribution; id is the attribution set ID with `-` replaced by `_`. Reports only, with dataSource attribution.
values
array of strings

List of values to include or exclude. Must match exact strings from your billing or DataHub data for the dimension (for example, Amazon Simple Storage Service for AWS S3 on service_description). For allocation_rule, use allocation rule IDs.

values
string
enum

Controls how the dimension’s values are matched when the alert query runs. If mode is omitted, behavior defaults to is.

Show Details
isExact match on one or more values.
starts_withValue starts with the given string(s).
ends_withValue ends with the given string(s).
containsValue contains the given string(s).
regexpValue matches the regular expression in `values` (exactly one pattern).
Allowed:
boolean

Set to true to exclude the set values. If inverse is omitted, behavior defaults to false.

boolean
Defaults to false

If true, string matching is case-insensitive. Effective only for starts_with, ends_with, and contains modes; ignored otherwise.

boolean
Defaults to false

Include rows where the dimension is null. If includeNull is omitted, behavior defaults to false.

int64
required

Budget start Date

string

Recurring budget interval can be one of: ["day", "week", "month", "quarter", "year"]

string
required

budget type can be one of: ["fixed", "recurring"]

boolean
Defaults to false

Use the last period's spend as the target amount for recurring budgets

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json