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.

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 collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

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.

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
    },
    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: 0.0, /* required */
        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. Unique within accounts. : and \ characters are not allowed in the BudgetName.

      • BudgetLimit — (map)

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

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

        • Amountrequired — (String)

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

        • Unitrequired — (String)

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

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

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

      • CostTypes — (map)

        The types of costs included in this budget.

        • 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 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.

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

        The period of time covered by a budget. Has a start date and an end date. The start date must come before the end date. There are no restrictions on the end date.

        If you created your budget and didn't specify a start date, AWS defaults to the start of your chosen time period (i.e. DAILY, MONTHLY, QUARTERLY, ANNUALLY). For example, if you created your budget on January 24th 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 (i.e. DAILY, MONTHLY, QUARTERLY, ANNUALLY). For example, if you created your budget on January 24th 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 being tracked by a budget.

        • ActualSpendrequired — (map)

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

          • Amountrequired — (String)

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

          • Unitrequired — (String)

            The unit of measurement 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 associated with a budget forecast, actual spend, or budget threshold.

          • Unitrequired — (String)

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

      • BudgetTyperequired — (String)

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

        Possible values include:
        • "USAGE"
        • "COST"
        • "RI_UTILIZATION"
        • "RI_COVERAGE"
    • 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 ten email subscribers. If you include notifications and subscribers in your CreateBudget call, AWS creates the notifications and subscribers for you.

      • Notificationrequired — (map)

        The notification associated with a budget.

        • NotificationTyperequired — (String)

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

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

          The comparison used for this notification.

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

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

        • ThresholdType — (String)

          The type of threshold for a notification. For ACTUAL thresholds, AWS notifies you when you go over the threshold, and for FORECASTED thresholds AWS notifies you when you are forecasted to go over the threshold.

          Possible values include:
          • "PERCENTAGE"
          • "ABSOLUTE_VALUE"
      • 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: 0.0, /* required */
    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 notified 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 are forecasted to spend (FORECASTED).

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

        The comparison used for this notification.

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

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

      • ThresholdType — (String)

        The type of threshold for a notification. For ACTUAL thresholds, AWS notifies you when you go over the threshold, and for FORECASTED thresholds AWS notifies you when you are forecasted to go over the threshold.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
    • 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 ten 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: 0.0, /* required */
    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 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 are forecasted to spend (FORECASTED).

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

        The comparison used for this notification.

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

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

      • ThresholdType — (String)

        The type of threshold for a notification. For ACTUAL thresholds, AWS notifies you when you go over the threshold, and for FORECASTED thresholds AWS notifies you when you are forecasted to go over the threshold.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
    • 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 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 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: 0.0, /* required */
    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 are forecasted to spend (FORECASTED).

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

        The comparison used for this notification.

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

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

      • ThresholdType — (String)

        The type of threshold for a notification. For ACTUAL thresholds, AWS notifies you when you go over the threshold, and for FORECASTED thresholds AWS notifies you when you are forecasted to go over the threshold.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"

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: 0.0, /* required */
    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 are forecasted to spend (FORECASTED).

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

        The comparison used for this notification.

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

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

      • ThresholdType — (String)

        The type of threshold for a notification. For ACTUAL thresholds, AWS notifies you when you go over the threshold, and for FORECASTED thresholds AWS notifies you when you are forecasted to go over the threshold.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
    • 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. Unique within accounts. : and \ characters are not allowed in the BudgetName.

        • BudgetLimit — (map)

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

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

          • Amountrequired — (String)

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

          • Unitrequired — (String)

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

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

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

        • CostTypes — (map)

          The types of costs included in this budget.

          • 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 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.

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

          The period of time covered by a budget. Has a start date and an end date. The start date must come before the end date. There are no restrictions on the end date.

          If you created your budget and didn't specify a start date, AWS defaults to the start of your chosen time period (i.e. DAILY, MONTHLY, QUARTERLY, ANNUALLY). For example, if you created your budget on January 24th 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 (i.e. DAILY, MONTHLY, QUARTERLY, ANNUALLY). For example, if you created your budget on January 24th 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 being tracked by a budget.

          • ActualSpendrequired — (map)

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

            • Amountrequired — (String)

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

            • Unitrequired — (String)

              The unit of measurement 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 associated with a budget forecast, actual spend, or budget threshold.

            • Unitrequired — (String)

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

        • BudgetTyperequired — (String)

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

          Possible values include:
          • "USAGE"
          • "COST"
          • "RI_UTILIZATION"
          • "RI_COVERAGE"

Returns:

  • (AWS.Request)

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

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

Lists the budgets associated with an account.

Service Reference:

Examples:

Calling the describeBudgets operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  MaxResults: 0,
  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)

      Optional integer. Specifies the maximum number of results to return in response.

    • NextToken — (String)

      The pagination token that indicates the next set of results 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. Unique within accounts. : and \ characters are not allowed in the BudgetName.

        • BudgetLimit — (map)

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

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

          • Amountrequired — (String)

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

          • Unitrequired — (String)

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

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

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

        • CostTypes — (map)

          The types of costs included in this budget.

          • 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 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.

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

          The period of time covered by a budget. Has a start date and an end date. The start date must come before the end date. There are no restrictions on the end date.

          If you created your budget and didn't specify a start date, AWS defaults to the start of your chosen time period (i.e. DAILY, MONTHLY, QUARTERLY, ANNUALLY). For example, if you created your budget on January 24th 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 (i.e. DAILY, MONTHLY, QUARTERLY, ANNUALLY). For example, if you created your budget on January 24th 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 being tracked by a budget.

          • ActualSpendrequired — (map)

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

            • Amountrequired — (String)

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

            • Unitrequired — (String)

              The unit of measurement 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 associated with a budget forecast, actual spend, or budget threshold.

            • Unitrequired — (String)

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

        • BudgetTyperequired — (String)

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

          Possible values include:
          • "USAGE"
          • "COST"
          • "RI_UTILIZATION"
          • "RI_COVERAGE"
      • NextToken — (String)

        The pagination token 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 associated with a budget.

Service Reference:

Examples:

Calling the describeNotificationsForBudget operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  BudgetName: 'STRING_VALUE', /* required */
  MaxResults: 0,
  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)

      Optional integer. Specifies the maximum number of results to return in response.

    • NextToken — (String)

      The pagination token that indicates the next set of results 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 associated with a budget.

        • NotificationTyperequired — (String)

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

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

          The comparison used for this notification.

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

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

        • ThresholdType — (String)

          The type of threshold for a notification. For ACTUAL thresholds, AWS notifies you when you go over the threshold, and for FORECASTED thresholds AWS notifies you when you are forecasted to go over the threshold.

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

        The pagination token 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 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: 0.0, /* required */
    ThresholdType: PERCENTAGE | ABSOLUTE_VALUE
  },
  MaxResults: 0,
  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 are forecasted to spend (FORECASTED).

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

        The comparison used for this notification.

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

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

      • ThresholdType — (String)

        The type of threshold for a notification. For ACTUAL thresholds, AWS notifies you when you go over the threshold, and for FORECASTED thresholds AWS notifies you when you are forecasted to go over the threshold.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
    • MaxResults — (Integer)

      Optional integer. Specifies the maximum number of results to return in response.

    • NextToken — (String)

      The pagination token that indicates the next set of results 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 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 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 a budget is modified, 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
    },
    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. Unique within accounts. : and \ characters are not allowed in the BudgetName.

      • BudgetLimit — (map)

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

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

        • Amountrequired — (String)

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

        • Unitrequired — (String)

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

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

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

      • CostTypes — (map)

        The types of costs included in this budget.

        • 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 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.

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

        The period of time covered by a budget. Has a start date and an end date. The start date must come before the end date. There are no restrictions on the end date.

        If you created your budget and didn't specify a start date, AWS defaults to the start of your chosen time period (i.e. DAILY, MONTHLY, QUARTERLY, ANNUALLY). For example, if you created your budget on January 24th 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 (i.e. DAILY, MONTHLY, QUARTERLY, ANNUALLY). For example, if you created your budget on January 24th 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 being tracked by a budget.

        • ActualSpendrequired — (map)

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

          • Amountrequired — (String)

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

          • Unitrequired — (String)

            The unit of measurement 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 associated with a budget forecast, actual spend, or budget threshold.

          • Unitrequired — (String)

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

      • BudgetTyperequired — (String)

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

        Possible values include:
        • "USAGE"
        • "COST"
        • "RI_UTILIZATION"
        • "RI_COVERAGE"

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: 0.0, /* required */
    ThresholdType: PERCENTAGE | ABSOLUTE_VALUE
  },
  OldNotification: { /* required */
    ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
    NotificationType: ACTUAL | FORECASTED, /* required */
    Threshold: 0.0, /* required */
    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 associated with a budget.

      • NotificationTyperequired — (String)

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

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

        The comparison used for this notification.

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

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

      • ThresholdType — (String)

        The type of threshold for a notification. For ACTUAL thresholds, AWS notifies you when you go over the threshold, and for FORECASTED thresholds AWS notifies you when you are forecasted to go over the threshold.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
    • 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 are forecasted to spend (FORECASTED).

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

        The comparison used for this notification.

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

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

      • ThresholdType — (String)

        The type of threshold for a notification. For ACTUAL thresholds, AWS notifies you when you go over the threshold, and for FORECASTED thresholds AWS notifies you when you are forecasted to go over the threshold.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"

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: 0.0, /* required */
    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 are forecasted to spend (FORECASTED).

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

        The comparison used for this notification.

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

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

      • ThresholdType — (String)

        The type of threshold for a notification. For ACTUAL thresholds, AWS notifies you when you go over the threshold, and for FORECASTED thresholds AWS notifies you when you are forecasted to go over the threshold.

        Possible values include:
        • "PERCENTAGE"
        • "ABSOLUTE_VALUE"
    • OldSubscriber — (map)

      The previous subscriber 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 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.