Menu
AWS Billing and Cost Management
User Guide (Version 2.0)

CreateBudget

Creates a budget and, if included, notifications and subscribers.

Request Parameters

The request requires the following data in JSON format.

accountId

The accountId that is associated with the budget.

Type: String

Length constraints: Minimum length of 12, maximum length of 12.

Required: Yes

budget

The budget object that you want to create.

Type: Budget object

Required: Yes

notificationsWithSubscribers

A notification that you want to associate with a budget. A budget can have up to five notifications, and each notification can have one SNS subscriber and up to ten email subscribers. If you include notifications and subscribers in your CreateBudget call, AWS creates the notifications and subscribers for you.

Type: NotificationWithsubscribers object

Required: No

Errors

CreationLimitExceededException

You've exceeded the notification or subscriber limit.

HTTP Status Code: 400

DuplicateRecordException

The budget name already exists. Budget names must be unique within an account.

HTTP Status Code: 400

InvalidParameterException

An error on the client occurred. Typically, the cause is an invalid input value.

HTTP Status Code: 400

InternalErrorException

An error on the server occurred during the processing of your request. Try again later.

HTTP Status Code: 500

Examples

The following example request creates a budget named Example Budget.

Sample Request

Copy
{ "Operation":"com.amazonaws.awsbudgets#CreateBudget", "Service":"com.amazonaws.awsbudgets#AWSBudgets", "Input":{ "accountId":"111122223333", "budget":{ "budgetName":"Example Budget", "budgetLimit":{ "amount":"100", "unit":"USD" }, "costFilters":{ "AZ":"us-east-1" }, "costTypes":{ "includeTax":"true", "includeSubscriptions":"false", "includeBlended":"false" }, "timeUnit":"MONTHLY", "timePeriod":{ "start":"1477353600000", "end":"1477958399000" }, "budgetType":"COST" }, "notificationsWithSubscribers":{ "notification":{ "notificationType":"FORECASTED", "comparisonOperator":"GREATER_THAN", "threshold":"80" }, "subscribers":{ "subscriber":{ "subscriptionType":"EMAIL", "address":"example@example.com" }, } } } }