AWS.Budgets — AWS SDK for JavaScript (original) (raw)
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
Class: AWS.Budgets
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
Use the Amazon Web Services Budgets API to plan your service usage, service costs, and instance reservations. This API reference provides descriptions, syntax, and usage examples for each of the actions and data types for the Amazon Web Services Budgets feature.
Budgets provide you with a way to see the following information:
- How close your plan is to your budgeted amount or to the free tier limits
- Your usage-to-date, including how much you've used of your Reserved Instances (RIs)
- Your current estimated charges from Amazon Web Services, and how much your predicted usage will accrue in charges by the end of the month
- How much of your budget has been used
Amazon Web Services updates your budget status several times a day. Budgets track your unblended costs, subscriptions, refunds, and RIs. You can create the following types of budgets:
- Cost budgets - Plan how much you want to spend on a service.
- Usage budgets - Plan how much you want to use one or more services.
- RI utilization budgets - Define a utilization threshold, and receive alerts when your RI usage falls below that threshold. This lets you see if your RIs are unused or under-utilized.
- RI coverage budgets - Define a coverage threshold, and receive alerts when the number of your instance hours that are covered by RIs fall below that threshold. This lets you see how much of your instance usage is covered by a reservation.
Service Endpoint
The Amazon Web Services Budgets API provides the following endpoint:
For information about costs that are associated with the Amazon Web Services Budgets API, see Amazon Web Services Cost Management Pricing.
Sending a Request Using Budgets
var budgets = new AWS.Budgets();
budgets.createBudget(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the Budgets object uses this specific API, you can construct the object by passing the apiVersion
option to the constructor:
var budgets = new AWS.Budgets({apiVersion: '2016-10-20'});
You can also set the API version globally in AWS.config.apiVersions
using the budgets service identifier:
AWS.config.apiVersions = {
budgets: '2016-10-20',
// other service API versions
};
var budgets = new AWS.Budgets();
Constructor Summarycollapse
- new AWS.Budgets(options = {}) ⇒ Object constructor
Constructs a service object.
Property Summarycollapse
- endpoint ⇒ AWS.Endpoint readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summarycollapse
- createBudget(params = {}, callback) ⇒ AWS.Request
Creates a budget and, if included, notifications and subscribers. - createBudgetAction(params = {}, callback) ⇒ AWS.Request
- createNotification(params = {}, callback) ⇒ AWS.Request
- createSubscriber(params = {}, callback) ⇒ AWS.Request
- deleteBudget(params = {}, callback) ⇒ AWS.Request
- deleteBudgetAction(params = {}, callback) ⇒ AWS.Request
- deleteNotification(params = {}, callback) ⇒ AWS.Request
Deletes a notification.
Deleting a notification also deletes the subscribers that are associated with the notification.
. - deleteSubscriber(params = {}, callback) ⇒ AWS.Request
Deletes a subscriber.
Deleting the last subscriber to a notification also deletes the notification.
. - describeBudget(params = {}, callback) ⇒ AWS.Request
Describes a budget.
The Request Syntax section shows theBudgetLimit
syntax. - describeBudgetAction(params = {}, callback) ⇒ AWS.Request
Describes a budget action detail. - describeBudgetActionHistories(params = {}, callback) ⇒ AWS.Request
Describes a budget action history detail. - describeBudgetActionsForAccount(params = {}, callback) ⇒ AWS.Request
Describes all of the budget actions for an account. - describeBudgetActionsForBudget(params = {}, callback) ⇒ AWS.Request
Describes all of the budget actions for a budget. - describeBudgetNotificationsForAccount(params = {}, callback) ⇒ AWS.Request
Lists the budget names and notifications that are associated with an account. - describeBudgetPerformanceHistory(params = {}, callback) ⇒ AWS.Request
Describes the history forDAILY
,MONTHLY
, andQUARTERLY
budgets. - describeBudgets(params = {}, callback) ⇒ AWS.Request
Lists the budgets that are associated with an account.
The Request Syntax section shows theBudgetLimit
syntax. - describeNotificationsForBudget(params = {}, callback) ⇒ AWS.Request
Lists the notifications that are associated with a budget.
. - describeSubscribersForNotification(params = {}, callback) ⇒ AWS.Request
Lists the subscribers that are associated with a notification.
. - executeBudgetAction(params = {}, callback) ⇒ AWS.Request
Executes a budget action. - listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists tags associated with a budget or budget action resource.
. - tagResource(params = {}, callback) ⇒ AWS.Request
Creates tags for a budget or budget action resource.
. - untagResource(params = {}, callback) ⇒ AWS.Request
Deletes tags associated with a budget or budget action resource.
. - updateBudget(params = {}, callback) ⇒ AWS.Request
- updateBudgetAction(params = {}, callback) ⇒ AWS.Request
- updateNotification(params = {}, callback) ⇒ AWS.Request
Updates a notification.
. - updateSubscriber(params = {}, callback) ⇒ AWS.Request
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.Budgets(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
endpoint ⇒ AWS.Endpoint
Returns an Endpoint object representing the endpoint URL for service requests.
Method Details
createBudget(params = {}, callback) ⇒ AWS.Request
Creates a budget and, if included, notifications and subscribers.
Only one of BudgetLimit
or PlannedBudgetLimits
can be present in the syntax at one time. Use the syntax that matches your case. The Request Syntax section shows the BudgetLimit
syntax. For PlannedBudgetLimits
, see the Examples section.
createBudgetAction(params = {}, callback) ⇒ AWS.Request
createNotification(params = {}, callback) ⇒ AWS.Request
Creates a notification. You must create the budget before you create the associated notification.
createSubscriber(params = {}, callback) ⇒ AWS.Request
Creates a subscriber. You must create the associated budget and notification before you create the subscriber.
deleteBudget(params = {}, callback) ⇒ AWS.Request
Deletes a budget. You can delete your budget at any time.
Deleting a budget also deletes the notifications and subscribers that are associated with that budget.
deleteBudgetAction(params = {}, callback) ⇒ AWS.Request
deleteNotification(params = {}, callback) ⇒ AWS.Request
Deletes a notification.
Deleting a notification also deletes the subscribers that are associated with the notification.
deleteSubscriber(params = {}, callback) ⇒ AWS.Request
Deletes a subscriber.
Deleting the last subscriber to a notification also deletes the notification.
describeBudget(params = {}, callback) ⇒ AWS.Request
Describes a budget.
The Request Syntax section shows the BudgetLimit
syntax. For PlannedBudgetLimits
, see the Examples section.
describeBudgetAction(params = {}, callback) ⇒ AWS.Request
Describes a budget action detail.
describeBudgetActionHistories(params = {}, callback) ⇒ AWS.Request
Describes a budget action history detail.
describeBudgetActionsForAccount(params = {}, callback) ⇒ AWS.Request
Describes all of the budget actions for an account.
describeBudgetActionsForBudget(params = {}, callback) ⇒ AWS.Request
Describes all of the budget actions for a budget.
describeBudgetNotificationsForAccount(params = {}, callback) ⇒ AWS.Request
Lists the budget names and notifications that are associated with an account.
describeBudgetPerformanceHistory(params = {}, callback) ⇒ AWS.Request
Describes the history for DAILY
, MONTHLY
, and QUARTERLY
budgets. Budget history isn't available for ANNUAL
budgets.
describeBudgets(params = {}, callback) ⇒ AWS.Request
Lists the budgets that are associated with an account.
The Request Syntax section shows the BudgetLimit
syntax. For PlannedBudgetLimits
, see the Examples section.
describeNotificationsForBudget(params = {}, callback) ⇒ AWS.Request
Lists the notifications that are associated with a budget.
describeSubscribersForNotification(params = {}, callback) ⇒ AWS.Request
Lists the subscribers that are associated with a notification.
executeBudgetAction(params = {}, callback) ⇒ AWS.Request
Executes a budget action.
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists tags associated with a budget or budget action resource.
tagResource(params = {}, callback) ⇒ AWS.Request
Creates tags for a budget or budget action resource.
untagResource(params = {}, callback) ⇒ AWS.Request
Deletes tags associated with a budget or budget action resource.
updateBudget(params = {}, callback) ⇒ AWS.Request
Updates a budget. You can change every part of a budget except for the budgetName
and the calculatedSpend
. When you modify a budget, the calculatedSpend
drops to zero until Amazon Web Services has new usage data to use for forecasting.
Only one of BudgetLimit
or PlannedBudgetLimits
can be present in the syntax at one time. Use the syntax that matches your case. The Request Syntax section shows the BudgetLimit
syntax. For PlannedBudgetLimits
, see the Examples section.