Class: AWS.Budgets

Inherits:
AWS.Service show all
Identifier:
budgets
API Version:
2016-10-20
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

The AWS Budgets API enables you to use AWS Budgets to plan your service usage, service costs, and instance reservations. The API reference provides descriptions, syntax, and usage examples for each of the actions and data types for AWS Budgets.

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 AWS, and how much your predicted usage will accrue in charges by the end of the month

  • How much of your budget has been used

AWS 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 AWS Budgets API provides the following endpoint:

For information about costs that are associated with the AWS Budgets API, see AWS 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();

Version:

  • 2016-10-20

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

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.

Examples:

Constructing a Budgets object

var budgets = new AWS.Budgets({apiVersion: '2016-10-20'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Budgets.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Budgets.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Budgets.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    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.

Service Reference:

Examples:

Calling the createBudget operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  Budget: { /* required */
    BudgetName: 'STRING_VALUE', /* required */
    BudgetType: USAGE | COST | RI_UTILIZATION | RI_COVERAGE, /* required */
    TimeUnit: DAILY | MONTHLY | QUARTERLY | ANNUALLY, /* required */
    BudgetLimit: {
      Amount: 'STRING_VALUE', /* required */
      Unit: 'STRING_VALUE' /* required */
    },
    CalculatedSpend: {
      ActualSpend: { /* required */
        Amount: 'STRING_VALUE', /* required */
        Unit: 'STRING_VALUE' /* required */
      },
      ForecastedSpend: {
        Amount: 'STRING_VALUE', /* required */
        Unit: 'STRING_VALUE' /* required */
      }
    },
    CostFilters: {
      '<GenericString>': [
        'STRING_VALUE',
        /* more items */
      ],
      /* '<GenericString>': ... */
    },
    CostTypes: {
      IncludeCredit: true || false,
      IncludeDiscount: true || false,
      IncludeOtherSubscription: true || false,
      IncludeRecurring: true || false,
      IncludeRefund: true || false,
      IncludeSubscription: true || false,
      IncludeSupport: true || false,
      IncludeTax: true || false,
      IncludeUpfront: true || false,
      UseAmortized: true || false,
      UseBlended: true || false
    },
    LastUpdatedTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
    TimePeriod: {
      End: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
      Start: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
    }
  },
  NotificationsWithSubscribers: [
    {
      Notification: { /* required */
        ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
        NotificationType: ACTUAL | FORECASTED, /* required */
        Threshold: 'NUMBER_VALUE', /* required */
        NotificationState: OK | ALARM,
        ThresholdType: PERCENTAGE | ABSOLUTE_VALUE
      },
      Subscribers: [ /* required */
        {
          Address: 'STRING_VALUE', /* required */
          SubscriptionType: SNS | EMAIL /* required */
        },
        /* more items */
      ]
    },
    /* more items */
  ]
};
budgets.createBudget(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget.

    • Budget — (map)

      The budget object that you want to create.

      • BudgetNamerequired — (String)

        The name of a budget. The name must be unique within accounts. The : and \ characters aren't allowed in BudgetName.

      • BudgetLimit — (map)

        The total amount of cost, usage, RI utilization, or RI coverage that you want to track with your budget.

        BudgetLimit is required for cost or usage budgets, but optional for RI utilization or coverage budgets. RI utilization or coverage budgets default to 100, which is the only valid value for RI utilization or coverage budgets.

        • Amountrequired — (String)

          The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

        • Unitrequired — (String)

          The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

      • CostFilters — (map<Array<String>>)

        The cost filters, such as service or region, that are applied to a budget.

        AWS Budgets supports the following services as a filter for RI budgets:

        • Amazon Elastic Compute Cloud - Compute

        • Amazon Redshift

        • Amazon Relational Database Service

        • Amazon ElastiCache

        • Amazon Elasticsearch Service

      • CostTypes — (map)

        The types of costs that are included in this COST budget.

        USAGE, RI_UTILIZATION, and RI_COVERAGE budgets do not have CostTypes.

        • IncludeTax — (Boolean)

          Specifies whether a budget includes taxes.

          The default value is true.

        • IncludeSubscription — (Boolean)

          Specifies whether a budget includes subscriptions.

          The default value is true.

        • UseBlended — (Boolean)

          Specifies whether a budget uses a blended rate.

          The default value is false.

        • IncludeRefund — (Boolean)

          Specifies whether a budget includes refunds.

          The default value is true.

        • IncludeCredit — (Boolean)

          Specifies whether a budget includes credits.

          The default value is true.

        • IncludeUpfront — (Boolean)

          Specifies whether a budget includes upfront RI costs.

          The default value is true.

        • IncludeRecurring — (Boolean)

          Specifies whether a budget includes recurring fees such as monthly RI fees.

          The default value is true.

        • IncludeOtherSubscription — (Boolean)

          Specifies whether a budget includes non-RI subscription costs.

          The default value is true.

        • IncludeSupport — (Boolean)

          Specifies whether a budget includes support subscription fees.

          The default value is true.

        • IncludeDiscount — (Boolean)

          Specifies whether a budget includes discounts.

          The default value is true.

        • UseAmortized — (Boolean)

          Specifies whether a budget uses the amortized rate.

          The default value is false.

      • TimeUnitrequired — (String)

        The length of time until a budget resets the actual and forecasted spend. DAILY is available only for RI_UTILIZATION and RI_COVERAGE budgets.

        Possible values include:
        • "DAILY"
        • "MONTHLY"
        • "QUARTERLY"
        • "ANNUALLY"
      • TimePeriod — (map)

        The period of time that is covered by a budget. The period has a start date and an end date. The start date must come before the end date. The end date must come before 06/15/87 00:00 UTC.

        If you create your budget and don't specify a start date, AWS defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. If you didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

        You can change either date with the UpdateBudget operation.

        After the end date, AWS deletes the budget and all associated notifications and subscribers.

        • Start — (Date)

          The start date for a budget. If you created your budget and didn't specify a start date, AWS defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

          You can change your start date with the UpdateBudget operation.

        • End — (Date)

          The end date for a budget. If you didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

          After the end date, AWS deletes the budget and all associated notifications and subscribers. You can change your end date with the UpdateBudget operation.

      • CalculatedSpend — (map)

        The actual and forecasted cost or usage that the budget tracks.

        • ActualSpendrequired — (map)

          The amount of cost, usage, or RI units that you have used.

          • Amountrequired — (String)

            The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

          • Unitrequired — (String)

            The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

        • ForecastedSpend — (map)

          The amount of cost, usage, or RI units that you are forecasted to use.

          • Amountrequired — (String)

            The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

          • Unitrequired — (String)

            The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

      • BudgetTyperequired — (String)

        Whether this budget tracks monetary costs, usage, RI utilization, or RI coverage.

        Possible values include:
        • "USAGE"
        • "COST"
        • "RI_UTILIZATION"
        • "RI_COVERAGE"
      • LastUpdatedTime — (Date)

        The last time that you updated this budget.

    • NotificationsWithSubscribers — (Array<map>)

      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 10 email subscribers. If you include notifications and subscribers in your CreateBudget call, AWS creates the notifications and subscribers for you.

      • Notificationrequired — (map)

        The notification that is associated with a budget.

        • NotificationTyperequired — (String)

          Whether the notification is for how much you have spent (ACTUAL) or for how much you're forecasted to spend (FORECASTED).

          Possible values include:
          • "ACTUAL"
          • "FORECASTED"
        • ComparisonOperatorrequired — (String)

          The comparison that is used for this notification.

          Possible values include:
          • "GREATER_THAN"
          • "LESS_THAN"
          • "EQUAL_TO"
        • Thresholdrequired — (Float)

          The threshold that is associated with a notification. Thresholds are always a percentage.

        • ThresholdType — (String)

          The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, AWS notifies you when you go over or are forecasted to go over your total cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over or are forecasted to go over a certain percentage of your forecasted spend. For example, if you have a budget for 200 dollars and you have a PERCENTAGE threshold of 80%, AWS notifies you when you go over 160 dollars.

          Possible values include:
          • "PERCENTAGE"
          • "ABSOLUTE_VALUE"
        • NotificationState — (String)

          Whether this notification is in alarm. If a budget notification is in the ALARM state, you have passed the set threshold for the budget.

          Possible values include:
          • "OK"
          • "ALARM"
      • Subscribersrequired — (Array<map>)

        A list of subscribers who are subscribed to this notification.

        • SubscriptionTyperequired — (String)

          The type of notification that AWS sends to a subscriber.

          Possible values include:
          • "SNS"
          • "EMAIL"
        • Addressrequired — (String)

          The address that AWS sends budget notifications to, either an SNS topic or an email.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createNotification(params = {}, callback) ⇒ AWS.Request

Creates a notification. You must create the budget before you create the associated notification.

Service Reference:

Examples:

Calling the createNotification operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE', /* required */
  Notification: { /* required */
    ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
    NotificationType: ACTUAL | FORECASTED, /* required */
    Threshold: 'NUMBER_VALUE', /* required */
    NotificationState: OK | ALARM,
    ThresholdType: PERCENTAGE | ABSOLUTE_VALUE
  },
  Subscribers: [ /* required */
    {
      Address: 'STRING_VALUE', /* required */
      SubscriptionType: SNS | EMAIL /* required */
    },
    /* more items */
  ]
};
budgets.createNotification(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget that you want to create a notification for.

    • BudgetName — (String)

      The name of the budget that you want AWS to notify you about. Budget names must be unique within an account.

    • Notification — (map)

      The notification that you want to create.

      • NotificationTyperequired — (String)

        Whether the notification is for how much you have spent (ACTUAL) or for how much you're forecasted to spend (FORECASTED).

        Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String)

        The comparison that is used for this notification.

        Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float)

        The threshold that is associated with a notification. Thresholds are always a percentage.

      • ThresholdType — (String)

        The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, AWS notifies you when you go over or are forecasted to go over your total cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over or are forecasted to go over a certain percentage of your forecasted spend. For example, if you have a budget for 200 dollars and you have a PERCENTAGE threshold of 80%, AWS notifies you when you go over 160 dollars.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
      • NotificationState — (String)

        Whether this notification is in alarm. If a budget notification is in the ALARM state, you have passed the set threshold for the budget.

        Possible values include:
        • "OK"
        • "ALARM"
    • Subscribers — (Array<map>)

      A list of subscribers that you want to associate with the notification. Each notification can have one SNS subscriber and up to 10 email subscribers.

      • SubscriptionTyperequired — (String)

        The type of notification that AWS sends to a subscriber.

        Possible values include:
        • "SNS"
        • "EMAIL"
      • Addressrequired — (String)

        The address that AWS sends budget notifications to, either an SNS topic or an email.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createSubscriber(params = {}, callback) ⇒ AWS.Request

Creates a subscriber. You must create the associated budget and notification before you create the subscriber.

Service Reference:

Examples:

Calling the createSubscriber operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE', /* required */
  Notification: { /* required */
    ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
    NotificationType: ACTUAL | FORECASTED, /* required */
    Threshold: 'NUMBER_VALUE', /* required */
    NotificationState: OK | ALARM,
    ThresholdType: PERCENTAGE | ABSOLUTE_VALUE
  },
  Subscriber: { /* required */
    Address: 'STRING_VALUE', /* required */
    SubscriptionType: SNS | EMAIL /* required */
  }
};
budgets.createSubscriber(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget that you want to create a subscriber for.

    • BudgetName — (String)

      The name of the budget that you want to subscribe to. Budget names must be unique within an account.

    • Notification — (map)

      The notification that you want to create a subscriber for.

      • NotificationTyperequired — (String)

        Whether the notification is for how much you have spent (ACTUAL) or for how much you're forecasted to spend (FORECASTED).

        Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String)

        The comparison that is used for this notification.

        Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float)

        The threshold that is associated with a notification. Thresholds are always a percentage.

      • ThresholdType — (String)

        The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, AWS notifies you when you go over or are forecasted to go over your total cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over or are forecasted to go over a certain percentage of your forecasted spend. For example, if you have a budget for 200 dollars and you have a PERCENTAGE threshold of 80%, AWS notifies you when you go over 160 dollars.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
      • NotificationState — (String)

        Whether this notification is in alarm. If a budget notification is in the ALARM state, you have passed the set threshold for the budget.

        Possible values include:
        • "OK"
        • "ALARM"
    • Subscriber — (map)

      The subscriber that you want to associate with a budget notification.

      • SubscriptionTyperequired — (String)

        The type of notification that AWS sends to a subscriber.

        Possible values include:
        • "SNS"
        • "EMAIL"
      • Addressrequired — (String)

        The address that AWS sends budget notifications to, either an SNS topic or an email.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Service Reference:

Examples:

Calling the deleteBudget operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE' /* required */
};
budgets.deleteBudget(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget that you want to delete.

    • BudgetName — (String)

      The name of the budget that you want to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteNotification(params = {}, callback) ⇒ AWS.Request

Deletes a notification.

Deleting a notification also deletes the subscribers that are associated with the notification.

Service Reference:

Examples:

Calling the deleteNotification operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE', /* required */
  Notification: { /* required */
    ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
    NotificationType: ACTUAL | FORECASTED, /* required */
    Threshold: 'NUMBER_VALUE', /* required */
    NotificationState: OK | ALARM,
    ThresholdType: PERCENTAGE | ABSOLUTE_VALUE
  }
};
budgets.deleteNotification(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget whose notification you want to delete.

    • BudgetName — (String)

      The name of the budget whose notification you want to delete.

    • Notification — (map)

      The notification that you want to delete.

      • NotificationTyperequired — (String)

        Whether the notification is for how much you have spent (ACTUAL) or for how much you're forecasted to spend (FORECASTED).

        Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String)

        The comparison that is used for this notification.

        Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float)

        The threshold that is associated with a notification. Thresholds are always a percentage.

      • ThresholdType — (String)

        The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, AWS notifies you when you go over or are forecasted to go over your total cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over or are forecasted to go over a certain percentage of your forecasted spend. For example, if you have a budget for 200 dollars and you have a PERCENTAGE threshold of 80%, AWS notifies you when you go over 160 dollars.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
      • NotificationState — (String)

        Whether this notification is in alarm. If a budget notification is in the ALARM state, you have passed the set threshold for the budget.

        Possible values include:
        • "OK"
        • "ALARM"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteSubscriber(params = {}, callback) ⇒ AWS.Request

Deletes a subscriber.

Deleting the last subscriber to a notification also deletes the notification.

Service Reference:

Examples:

Calling the deleteSubscriber operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE', /* required */
  Notification: { /* required */
    ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
    NotificationType: ACTUAL | FORECASTED, /* required */
    Threshold: 'NUMBER_VALUE', /* required */
    NotificationState: OK | ALARM,
    ThresholdType: PERCENTAGE | ABSOLUTE_VALUE
  },
  Subscriber: { /* required */
    Address: 'STRING_VALUE', /* required */
    SubscriptionType: SNS | EMAIL /* required */
  }
};
budgets.deleteSubscriber(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget whose subscriber you want to delete.

    • BudgetName — (String)

      The name of the budget whose subscriber you want to delete.

    • Notification — (map)

      The notification whose subscriber you want to delete.

      • NotificationTyperequired — (String)

        Whether the notification is for how much you have spent (ACTUAL) or for how much you're forecasted to spend (FORECASTED).

        Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String)

        The comparison that is used for this notification.

        Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float)

        The threshold that is associated with a notification. Thresholds are always a percentage.

      • ThresholdType — (String)

        The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, AWS notifies you when you go over or are forecasted to go over your total cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over or are forecasted to go over a certain percentage of your forecasted spend. For example, if you have a budget for 200 dollars and you have a PERCENTAGE threshold of 80%, AWS notifies you when you go over 160 dollars.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
      • NotificationState — (String)

        Whether this notification is in alarm. If a budget notification is in the ALARM state, you have passed the set threshold for the budget.

        Possible values include:
        • "OK"
        • "ALARM"
    • Subscriber — (map)

      The subscriber that you want to delete.

      • SubscriptionTyperequired — (String)

        The type of notification that AWS sends to a subscriber.

        Possible values include:
        • "SNS"
        • "EMAIL"
      • Addressrequired — (String)

        The address that AWS sends budget notifications to, either an SNS topic or an email.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeBudget(params = {}, callback) ⇒ AWS.Request

Describes a budget.

Service Reference:

Examples:

Calling the describeBudget operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE' /* required */
};
budgets.describeBudget(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget that you want a description of.

    • BudgetName — (String)

      The name of the budget that you want a description of.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Budget — (map)

        The description of the budget.

        • BudgetNamerequired — (String)

          The name of a budget. The name must be unique within accounts. The : and \ characters aren't allowed in BudgetName.

        • BudgetLimit — (map)

          The total amount of cost, usage, RI utilization, or RI coverage that you want to track with your budget.

          BudgetLimit is required for cost or usage budgets, but optional for RI utilization or coverage budgets. RI utilization or coverage budgets default to 100, which is the only valid value for RI utilization or coverage budgets.

          • Amountrequired — (String)

            The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

          • Unitrequired — (String)

            The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

        • CostFilters — (map<Array<String>>)

          The cost filters, such as service or region, that are applied to a budget.

          AWS Budgets supports the following services as a filter for RI budgets:

          • Amazon Elastic Compute Cloud - Compute

          • Amazon Redshift

          • Amazon Relational Database Service

          • Amazon ElastiCache

          • Amazon Elasticsearch Service

        • CostTypes — (map)

          The types of costs that are included in this COST budget.

          USAGE, RI_UTILIZATION, and RI_COVERAGE budgets do not have CostTypes.

          • IncludeTax — (Boolean)

            Specifies whether a budget includes taxes.

            The default value is true.

          • IncludeSubscription — (Boolean)

            Specifies whether a budget includes subscriptions.

            The default value is true.

          • UseBlended — (Boolean)

            Specifies whether a budget uses a blended rate.

            The default value is false.

          • IncludeRefund — (Boolean)

            Specifies whether a budget includes refunds.

            The default value is true.

          • IncludeCredit — (Boolean)

            Specifies whether a budget includes credits.

            The default value is true.

          • IncludeUpfront — (Boolean)

            Specifies whether a budget includes upfront RI costs.

            The default value is true.

          • IncludeRecurring — (Boolean)

            Specifies whether a budget includes recurring fees such as monthly RI fees.

            The default value is true.

          • IncludeOtherSubscription — (Boolean)

            Specifies whether a budget includes non-RI subscription costs.

            The default value is true.

          • IncludeSupport — (Boolean)

            Specifies whether a budget includes support subscription fees.

            The default value is true.

          • IncludeDiscount — (Boolean)

            Specifies whether a budget includes discounts.

            The default value is true.

          • UseAmortized — (Boolean)

            Specifies whether a budget uses the amortized rate.

            The default value is false.

        • TimeUnitrequired — (String)

          The length of time until a budget resets the actual and forecasted spend. DAILY is available only for RI_UTILIZATION and RI_COVERAGE budgets.

          Possible values include:
          • "DAILY"
          • "MONTHLY"
          • "QUARTERLY"
          • "ANNUALLY"
        • TimePeriod — (map)

          The period of time that is covered by a budget. The period has a start date and an end date. The start date must come before the end date. The end date must come before 06/15/87 00:00 UTC.

          If you create your budget and don't specify a start date, AWS defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. If you didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

          You can change either date with the UpdateBudget operation.

          After the end date, AWS deletes the budget and all associated notifications and subscribers.

          • Start — (Date)

            The start date for a budget. If you created your budget and didn't specify a start date, AWS defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

            You can change your start date with the UpdateBudget operation.

          • End — (Date)

            The end date for a budget. If you didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

            After the end date, AWS deletes the budget and all associated notifications and subscribers. You can change your end date with the UpdateBudget operation.

        • CalculatedSpend — (map)

          The actual and forecasted cost or usage that the budget tracks.

          • ActualSpendrequired — (map)

            The amount of cost, usage, or RI units that you have used.

            • Amountrequired — (String)

              The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

            • Unitrequired — (String)

              The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

          • ForecastedSpend — (map)

            The amount of cost, usage, or RI units that you are forecasted to use.

            • Amountrequired — (String)

              The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

            • Unitrequired — (String)

              The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

        • BudgetTyperequired — (String)

          Whether this budget tracks monetary costs, usage, RI utilization, or RI coverage.

          Possible values include:
          • "USAGE"
          • "COST"
          • "RI_UTILIZATION"
          • "RI_COVERAGE"
        • LastUpdatedTime — (Date)

          The last time that you updated this budget.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeBudgetPerformanceHistory(params = {}, callback) ⇒ AWS.Request

Describes the history for DAILY, MONTHLY, and QUARTERLY budgets. Budget history isn't available for ANNUAL budgets.

Examples:

Calling the describeBudgetPerformanceHistory operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TimePeriod: {
    End: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
    Start: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
  }
};
budgets.describeBudgetPerformanceHistory(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The account ID of the user. It should be a 12-digit number.

    • BudgetName — (String)

      A string that represents the budget name. The ":" and "\" characters aren't allowed.

    • TimePeriod — (map)

      Retrieves how often the budget went into an ALARM state for the specified time period.

      • Start — (Date)

        The start date for a budget. If you created your budget and didn't specify a start date, AWS defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

        You can change your start date with the UpdateBudget operation.

      • End — (Date)

        The end date for a budget. If you didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

        After the end date, AWS deletes the budget and all associated notifications and subscribers. You can change your end date with the UpdateBudget operation.

    • MaxResults — (Integer)

      An integer that represents how many entries a paginated response contains. The maximum is 100.

    • NextToken — (String)

      A generic string.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • BudgetPerformanceHistory — (map)

        The history of how often the budget has gone into an ALARM state.

        For DAILY budgets, the history saves the state of the budget for the last 60 days. For MONTHLY budgets, the history saves the state of the budget for the current month plus the last 12 months. For QUARTERLY budgets, the history saves the state of the budget for the last four quarters.

        • BudgetName — (String)

          A string that represents the budget name. The ":" and "\" characters aren't allowed.

        • BudgetType — (String)

          The type of a budget. It must be one of the following types:

          COST, USAGE, RI_UTILIZATION, or RI_COVERAGE.

          Possible values include:
          • "USAGE"
          • "COST"
          • "RI_UTILIZATION"
          • "RI_COVERAGE"
        • CostFilters — (map<Array<String>>)

          The history of the cost filters for a budget during the specified time period.

        • CostTypes — (map)

          The history of the cost types for a budget during the specified time period.

          • IncludeTax — (Boolean)

            Specifies whether a budget includes taxes.

            The default value is true.

          • IncludeSubscription — (Boolean)

            Specifies whether a budget includes subscriptions.

            The default value is true.

          • UseBlended — (Boolean)

            Specifies whether a budget uses a blended rate.

            The default value is false.

          • IncludeRefund — (Boolean)

            Specifies whether a budget includes refunds.

            The default value is true.

          • IncludeCredit — (Boolean)

            Specifies whether a budget includes credits.

            The default value is true.

          • IncludeUpfront — (Boolean)

            Specifies whether a budget includes upfront RI costs.

            The default value is true.

          • IncludeRecurring — (Boolean)

            Specifies whether a budget includes recurring fees such as monthly RI fees.

            The default value is true.

          • IncludeOtherSubscription — (Boolean)

            Specifies whether a budget includes non-RI subscription costs.

            The default value is true.

          • IncludeSupport — (Boolean)

            Specifies whether a budget includes support subscription fees.

            The default value is true.

          • IncludeDiscount — (Boolean)

            Specifies whether a budget includes discounts.

            The default value is true.

          • UseAmortized — (Boolean)

            Specifies whether a budget uses the amortized rate.

            The default value is false.

        • TimeUnit — (String)

          The time unit of the budget, such as MONTHLY or QUARTERLY.

          Possible values include:
          • "DAILY"
          • "MONTHLY"
          • "QUARTERLY"
          • "ANNUALLY"
        • BudgetedAndActualAmountsList — (Array<map>)

          A list of amounts of cost or usage that you created budgets for, compared to your actual costs or usage.

          • BudgetedAmount — (map)

            The amount of cost or usage that you created the budget for.

            • Amountrequired — (String)

              The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

            • Unitrequired — (String)

              The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

          • ActualAmount — (map)

            Your actual costs or usage for a budget period.

            • Amountrequired — (String)

              The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

            • Unitrequired — (String)

              The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

          • TimePeriod — (map)

            The time period covered by this budget comparison.

            • Start — (Date)

              The start date for a budget. If you created your budget and didn't specify a start date, AWS defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

              You can change your start date with the UpdateBudget operation.

            • End — (Date)

              The end date for a budget. If you didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

              After the end date, AWS deletes the budget and all associated notifications and subscribers. You can change your end date with the UpdateBudget operation.

      • NextToken — (String)

        A generic string.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeBudgets(params = {}, callback) ⇒ AWS.Request

Lists the budgets that are associated with an account.

Service Reference:

Examples:

Calling the describeBudgets operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
budgets.describeBudgets(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budgets that you want descriptions of.

    • MaxResults — (Integer)

      An optional integer that represents how many entries a paginated response contains. The maximum is 100.

    • NextToken — (String)

      The pagination token that you include in your request to indicate the next set of results that you want to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Budgets — (Array<map>)

        A list of budgets.

        • BudgetNamerequired — (String)

          The name of a budget. The name must be unique within accounts. The : and \ characters aren't allowed in BudgetName.

        • BudgetLimit — (map)

          The total amount of cost, usage, RI utilization, or RI coverage that you want to track with your budget.

          BudgetLimit is required for cost or usage budgets, but optional for RI utilization or coverage budgets. RI utilization or coverage budgets default to 100, which is the only valid value for RI utilization or coverage budgets.

          • Amountrequired — (String)

            The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

          • Unitrequired — (String)

            The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

        • CostFilters — (map<Array<String>>)

          The cost filters, such as service or region, that are applied to a budget.

          AWS Budgets supports the following services as a filter for RI budgets:

          • Amazon Elastic Compute Cloud - Compute

          • Amazon Redshift

          • Amazon Relational Database Service

          • Amazon ElastiCache

          • Amazon Elasticsearch Service

        • CostTypes — (map)

          The types of costs that are included in this COST budget.

          USAGE, RI_UTILIZATION, and RI_COVERAGE budgets do not have CostTypes.

          • IncludeTax — (Boolean)

            Specifies whether a budget includes taxes.

            The default value is true.

          • IncludeSubscription — (Boolean)

            Specifies whether a budget includes subscriptions.

            The default value is true.

          • UseBlended — (Boolean)

            Specifies whether a budget uses a blended rate.

            The default value is false.

          • IncludeRefund — (Boolean)

            Specifies whether a budget includes refunds.

            The default value is true.

          • IncludeCredit — (Boolean)

            Specifies whether a budget includes credits.

            The default value is true.

          • IncludeUpfront — (Boolean)

            Specifies whether a budget includes upfront RI costs.

            The default value is true.

          • IncludeRecurring — (Boolean)

            Specifies whether a budget includes recurring fees such as monthly RI fees.

            The default value is true.

          • IncludeOtherSubscription — (Boolean)

            Specifies whether a budget includes non-RI subscription costs.

            The default value is true.

          • IncludeSupport — (Boolean)

            Specifies whether a budget includes support subscription fees.

            The default value is true.

          • IncludeDiscount — (Boolean)

            Specifies whether a budget includes discounts.

            The default value is true.

          • UseAmortized — (Boolean)

            Specifies whether a budget uses the amortized rate.

            The default value is false.

        • TimeUnitrequired — (String)

          The length of time until a budget resets the actual and forecasted spend. DAILY is available only for RI_UTILIZATION and RI_COVERAGE budgets.

          Possible values include:
          • "DAILY"
          • "MONTHLY"
          • "QUARTERLY"
          • "ANNUALLY"
        • TimePeriod — (map)

          The period of time that is covered by a budget. The period has a start date and an end date. The start date must come before the end date. The end date must come before 06/15/87 00:00 UTC.

          If you create your budget and don't specify a start date, AWS defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. If you didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

          You can change either date with the UpdateBudget operation.

          After the end date, AWS deletes the budget and all associated notifications and subscribers.

          • Start — (Date)

            The start date for a budget. If you created your budget and didn't specify a start date, AWS defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

            You can change your start date with the UpdateBudget operation.

          • End — (Date)

            The end date for a budget. If you didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

            After the end date, AWS deletes the budget and all associated notifications and subscribers. You can change your end date with the UpdateBudget operation.

        • CalculatedSpend — (map)

          The actual and forecasted cost or usage that the budget tracks.

          • ActualSpendrequired — (map)

            The amount of cost, usage, or RI units that you have used.

            • Amountrequired — (String)

              The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

            • Unitrequired — (String)

              The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

          • ForecastedSpend — (map)

            The amount of cost, usage, or RI units that you are forecasted to use.

            • Amountrequired — (String)

              The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

            • Unitrequired — (String)

              The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

        • BudgetTyperequired — (String)

          Whether this budget tracks monetary costs, usage, RI utilization, or RI coverage.

          Possible values include:
          • "USAGE"
          • "COST"
          • "RI_UTILIZATION"
          • "RI_COVERAGE"
        • LastUpdatedTime — (Date)

          The last time that you updated this budget.

      • NextToken — (String)

        The pagination token in the service response that indicates the next set of results that you can retrieve.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeNotificationsForBudget(params = {}, callback) ⇒ AWS.Request

Lists the notifications that are associated with a budget.

Service Reference:

Examples:

Calling the describeNotificationsForBudget operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
budgets.describeNotificationsForBudget(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget whose notifications you want descriptions of.

    • BudgetName — (String)

      The name of the budget whose notifications you want descriptions of.

    • MaxResults — (Integer)

      An optional integer that represents how many entries a paginated response contains. The maximum is 100.

    • NextToken — (String)

      The pagination token that you include in your request to indicate the next set of results that you want to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Notifications — (Array<map>)

        A list of notifications that are associated with a budget.

        • NotificationTyperequired — (String)

          Whether the notification is for how much you have spent (ACTUAL) or for how much you're forecasted to spend (FORECASTED).

          Possible values include:
          • "ACTUAL"
          • "FORECASTED"
        • ComparisonOperatorrequired — (String)

          The comparison that is used for this notification.

          Possible values include:
          • "GREATER_THAN"
          • "LESS_THAN"
          • "EQUAL_TO"
        • Thresholdrequired — (Float)

          The threshold that is associated with a notification. Thresholds are always a percentage.

        • ThresholdType — (String)

          The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, AWS notifies you when you go over or are forecasted to go over your total cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over or are forecasted to go over a certain percentage of your forecasted spend. For example, if you have a budget for 200 dollars and you have a PERCENTAGE threshold of 80%, AWS notifies you when you go over 160 dollars.

          Possible values include:
          • "PERCENTAGE"
          • "ABSOLUTE_VALUE"
        • NotificationState — (String)

          Whether this notification is in alarm. If a budget notification is in the ALARM state, you have passed the set threshold for the budget.

          Possible values include:
          • "OK"
          • "ALARM"
      • NextToken — (String)

        The pagination token in the service response that indicates the next set of results that you can retrieve.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSubscribersForNotification(params = {}, callback) ⇒ AWS.Request

Lists the subscribers that are associated with a notification.

Examples:

Calling the describeSubscribersForNotification operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE', /* required */
  Notification: { /* required */
    ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
    NotificationType: ACTUAL | FORECASTED, /* required */
    Threshold: 'NUMBER_VALUE', /* required */
    NotificationState: OK | ALARM,
    ThresholdType: PERCENTAGE | ABSOLUTE_VALUE
  },
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
budgets.describeSubscribersForNotification(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget whose subscribers you want descriptions of.

    • BudgetName — (String)

      The name of the budget whose subscribers you want descriptions of.

    • Notification — (map)

      The notification whose subscribers you want to list.

      • NotificationTyperequired — (String)

        Whether the notification is for how much you have spent (ACTUAL) or for how much you're forecasted to spend (FORECASTED).

        Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String)

        The comparison that is used for this notification.

        Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float)

        The threshold that is associated with a notification. Thresholds are always a percentage.

      • ThresholdType — (String)

        The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, AWS notifies you when you go over or are forecasted to go over your total cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over or are forecasted to go over a certain percentage of your forecasted spend. For example, if you have a budget for 200 dollars and you have a PERCENTAGE threshold of 80%, AWS notifies you when you go over 160 dollars.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
      • NotificationState — (String)

        Whether this notification is in alarm. If a budget notification is in the ALARM state, you have passed the set threshold for the budget.

        Possible values include:
        • "OK"
        • "ALARM"
    • MaxResults — (Integer)

      An optional integer that represents how many entries a paginated response contains. The maximum is 100.

    • NextToken — (String)

      The pagination token that you include in your request to indicate the next set of results that you want to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Subscribers — (Array<map>)

        A list of subscribers that are associated with a notification.

        • SubscriptionTyperequired — (String)

          The type of notification that AWS sends to a subscriber.

          Possible values include:
          • "SNS"
          • "EMAIL"
        • Addressrequired — (String)

          The address that AWS sends budget notifications to, either an SNS topic or an email.

      • NextToken — (String)

        The pagination token in the service response that indicates the next set of results that you can retrieve.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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 AWS has new usage data to use for forecasting.

Service Reference:

Examples:

Calling the updateBudget operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  NewBudget: { /* required */
    BudgetName: 'STRING_VALUE', /* required */
    BudgetType: USAGE | COST | RI_UTILIZATION | RI_COVERAGE, /* required */
    TimeUnit: DAILY | MONTHLY | QUARTERLY | ANNUALLY, /* required */
    BudgetLimit: {
      Amount: 'STRING_VALUE', /* required */
      Unit: 'STRING_VALUE' /* required */
    },
    CalculatedSpend: {
      ActualSpend: { /* required */
        Amount: 'STRING_VALUE', /* required */
        Unit: 'STRING_VALUE' /* required */
      },
      ForecastedSpend: {
        Amount: 'STRING_VALUE', /* required */
        Unit: 'STRING_VALUE' /* required */
      }
    },
    CostFilters: {
      '<GenericString>': [
        'STRING_VALUE',
        /* more items */
      ],
      /* '<GenericString>': ... */
    },
    CostTypes: {
      IncludeCredit: true || false,
      IncludeDiscount: true || false,
      IncludeOtherSubscription: true || false,
      IncludeRecurring: true || false,
      IncludeRefund: true || false,
      IncludeSubscription: true || false,
      IncludeSupport: true || false,
      IncludeTax: true || false,
      IncludeUpfront: true || false,
      UseAmortized: true || false,
      UseBlended: true || false
    },
    LastUpdatedTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
    TimePeriod: {
      End: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
      Start: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
    }
  }
};
budgets.updateBudget(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget that you want to update.

    • NewBudget — (map)

      The budget that you want to update your budget to.

      • BudgetNamerequired — (String)

        The name of a budget. The name must be unique within accounts. The : and \ characters aren't allowed in BudgetName.

      • BudgetLimit — (map)

        The total amount of cost, usage, RI utilization, or RI coverage that you want to track with your budget.

        BudgetLimit is required for cost or usage budgets, but optional for RI utilization or coverage budgets. RI utilization or coverage budgets default to 100, which is the only valid value for RI utilization or coverage budgets.

        • Amountrequired — (String)

          The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

        • Unitrequired — (String)

          The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

      • CostFilters — (map<Array<String>>)

        The cost filters, such as service or region, that are applied to a budget.

        AWS Budgets supports the following services as a filter for RI budgets:

        • Amazon Elastic Compute Cloud - Compute

        • Amazon Redshift

        • Amazon Relational Database Service

        • Amazon ElastiCache

        • Amazon Elasticsearch Service

      • CostTypes — (map)

        The types of costs that are included in this COST budget.

        USAGE, RI_UTILIZATION, and RI_COVERAGE budgets do not have CostTypes.

        • IncludeTax — (Boolean)

          Specifies whether a budget includes taxes.

          The default value is true.

        • IncludeSubscription — (Boolean)

          Specifies whether a budget includes subscriptions.

          The default value is true.

        • UseBlended — (Boolean)

          Specifies whether a budget uses a blended rate.

          The default value is false.

        • IncludeRefund — (Boolean)

          Specifies whether a budget includes refunds.

          The default value is true.

        • IncludeCredit — (Boolean)

          Specifies whether a budget includes credits.

          The default value is true.

        • IncludeUpfront — (Boolean)

          Specifies whether a budget includes upfront RI costs.

          The default value is true.

        • IncludeRecurring — (Boolean)

          Specifies whether a budget includes recurring fees such as monthly RI fees.

          The default value is true.

        • IncludeOtherSubscription — (Boolean)

          Specifies whether a budget includes non-RI subscription costs.

          The default value is true.

        • IncludeSupport — (Boolean)

          Specifies whether a budget includes support subscription fees.

          The default value is true.

        • IncludeDiscount — (Boolean)

          Specifies whether a budget includes discounts.

          The default value is true.

        • UseAmortized — (Boolean)

          Specifies whether a budget uses the amortized rate.

          The default value is false.

      • TimeUnitrequired — (String)

        The length of time until a budget resets the actual and forecasted spend. DAILY is available only for RI_UTILIZATION and RI_COVERAGE budgets.

        Possible values include:
        • "DAILY"
        • "MONTHLY"
        • "QUARTERLY"
        • "ANNUALLY"
      • TimePeriod — (map)

        The period of time that is covered by a budget. The period has a start date and an end date. The start date must come before the end date. The end date must come before 06/15/87 00:00 UTC.

        If you create your budget and don't specify a start date, AWS defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. If you didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

        You can change either date with the UpdateBudget operation.

        After the end date, AWS deletes the budget and all associated notifications and subscribers.

        • Start — (Date)

          The start date for a budget. If you created your budget and didn't specify a start date, AWS defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

          You can change your start date with the UpdateBudget operation.

        • End — (Date)

          The end date for a budget. If you didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management console and the API.

          After the end date, AWS deletes the budget and all associated notifications and subscribers. You can change your end date with the UpdateBudget operation.

      • CalculatedSpend — (map)

        The actual and forecasted cost or usage that the budget tracks.

        • ActualSpendrequired — (map)

          The amount of cost, usage, or RI units that you have used.

          • Amountrequired — (String)

            The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

          • Unitrequired — (String)

            The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

        • ForecastedSpend — (map)

          The amount of cost, usage, or RI units that you are forecasted to use.

          • Amountrequired — (String)

            The cost or usage amount that is associated with a budget forecast, actual spend, or budget threshold.

          • Unitrequired — (String)

            The unit of measurement that is used for the budget forecast, actual spend, or budget threshold, such as dollars or GB.

      • BudgetTyperequired — (String)

        Whether this budget tracks monetary costs, usage, RI utilization, or RI coverage.

        Possible values include:
        • "USAGE"
        • "COST"
        • "RI_UTILIZATION"
        • "RI_COVERAGE"
      • LastUpdatedTime — (Date)

        The last time that you updated this budget.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateNotification(params = {}, callback) ⇒ AWS.Request

Updates a notification.

Service Reference:

Examples:

Calling the updateNotification operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE', /* required */
  NewNotification: { /* required */
    ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
    NotificationType: ACTUAL | FORECASTED, /* required */
    Threshold: 'NUMBER_VALUE', /* required */
    NotificationState: OK | ALARM,
    ThresholdType: PERCENTAGE | ABSOLUTE_VALUE
  },
  OldNotification: { /* required */
    ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
    NotificationType: ACTUAL | FORECASTED, /* required */
    Threshold: 'NUMBER_VALUE', /* required */
    NotificationState: OK | ALARM,
    ThresholdType: PERCENTAGE | ABSOLUTE_VALUE
  }
};
budgets.updateNotification(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget whose notification you want to update.

    • BudgetName — (String)

      The name of the budget whose notification you want to update.

    • OldNotification — (map)

      The previous notification that is associated with a budget.

      • NotificationTyperequired — (String)

        Whether the notification is for how much you have spent (ACTUAL) or for how much you're forecasted to spend (FORECASTED).

        Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String)

        The comparison that is used for this notification.

        Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float)

        The threshold that is associated with a notification. Thresholds are always a percentage.

      • ThresholdType — (String)

        The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, AWS notifies you when you go over or are forecasted to go over your total cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over or are forecasted to go over a certain percentage of your forecasted spend. For example, if you have a budget for 200 dollars and you have a PERCENTAGE threshold of 80%, AWS notifies you when you go over 160 dollars.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
      • NotificationState — (String)

        Whether this notification is in alarm. If a budget notification is in the ALARM state, you have passed the set threshold for the budget.

        Possible values include:
        • "OK"
        • "ALARM"
    • NewNotification — (map)

      The updated notification to be associated with a budget.

      • NotificationTyperequired — (String)

        Whether the notification is for how much you have spent (ACTUAL) or for how much you're forecasted to spend (FORECASTED).

        Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String)

        The comparison that is used for this notification.

        Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float)

        The threshold that is associated with a notification. Thresholds are always a percentage.

      • ThresholdType — (String)

        The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, AWS notifies you when you go over or are forecasted to go over your total cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over or are forecasted to go over a certain percentage of your forecasted spend. For example, if you have a budget for 200 dollars and you have a PERCENTAGE threshold of 80%, AWS notifies you when you go over 160 dollars.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
      • NotificationState — (String)

        Whether this notification is in alarm. If a budget notification is in the ALARM state, you have passed the set threshold for the budget.

        Possible values include:
        • "OK"
        • "ALARM"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateSubscriber(params = {}, callback) ⇒ AWS.Request

Updates a subscriber.

Service Reference:

Examples:

Calling the updateSubscriber operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE', /* required */
  NewSubscriber: { /* required */
    Address: 'STRING_VALUE', /* required */
    SubscriptionType: SNS | EMAIL /* required */
  },
  Notification: { /* required */
    ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
    NotificationType: ACTUAL | FORECASTED, /* required */
    Threshold: 'NUMBER_VALUE', /* required */
    NotificationState: OK | ALARM,
    ThresholdType: PERCENTAGE | ABSOLUTE_VALUE
  },
  OldSubscriber: { /* required */
    Address: 'STRING_VALUE', /* required */
    SubscriptionType: SNS | EMAIL /* required */
  }
};
budgets.updateSubscriber(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The accountId that is associated with the budget whose subscriber you want to update.

    • BudgetName — (String)

      The name of the budget whose subscriber you want to update.

    • Notification — (map)

      The notification whose subscriber you want to update.

      • NotificationTyperequired — (String)

        Whether the notification is for how much you have spent (ACTUAL) or for how much you're forecasted to spend (FORECASTED).

        Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String)

        The comparison that is used for this notification.

        Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float)

        The threshold that is associated with a notification. Thresholds are always a percentage.

      • ThresholdType — (String)

        The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, AWS notifies you when you go over or are forecasted to go over your total cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over or are forecasted to go over a certain percentage of your forecasted spend. For example, if you have a budget for 200 dollars and you have a PERCENTAGE threshold of 80%, AWS notifies you when you go over 160 dollars.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
      • NotificationState — (String)

        Whether this notification is in alarm. If a budget notification is in the ALARM state, you have passed the set threshold for the budget.

        Possible values include:
        • "OK"
        • "ALARM"
    • OldSubscriber — (map)

      The previous subscriber that is associated with a budget notification.

      • SubscriptionTyperequired — (String)

        The type of notification that AWS sends to a subscriber.

        Possible values include:
        • "SNS"
        • "EMAIL"
      • Addressrequired — (String)

        The address that AWS sends budget notifications to, either an SNS topic or an email.

    • NewSubscriber — (map)

      The updated subscriber that is associated with a budget notification.

      • SubscriptionTyperequired — (String)

        The type of notification that AWS sends to a subscriber.

        Possible values include:
        • "SNS"
        • "EMAIL"
      • Addressrequired — (String)

        The address that AWS sends budget notifications to, either an SNS topic or an email.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.