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.

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

Create a new budget

Service Reference:

Examples:

Calling the createBudget operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  Budget: { /* required */
    BudgetLimit: { /* required */
      Amount: 'STRING_VALUE', /* required */
      Unit: 'STRING_VALUE' /* required */
    },
    BudgetName: 'STRING_VALUE', /* required */
    BudgetType: USAGE | COST, /* required */
    CostTypes: { /* required */
      IncludeSubscription: true || false, /* required */
      IncludeTax: true || false, /* required */
      UseBlended: true || false /* required */
    },
    TimePeriod: { /* required */
      End: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
      Start: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789 /* required */
    },
    TimeUnit: MONTHLY | QUARTERLY | ANNUALLY, /* 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>': ... */
    }
  },
  NotificationsWithSubscribers: [
    {
      Notification: { /* required */
        ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
        NotificationType: ACTUAL | FORECASTED, /* required */
        Threshold: 0.0 /* required */
      },
      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) Account Id of the customer. It should be a 12 digit number.
    • Budget — (map) AWS Budget model
      • BudgetNamerequired — (String) A string represents the budget name. No ":" character is allowed.
      • BudgetLimitrequired — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
        • Amountrequired — (String) A string to represent NumericValue.
        • Unitrequired — (String) A generic String.
      • CostFilters — (map<Array<String>>) A map represents the cost filters applied to the budget.
      • CostTypesrequired — (map) This includes the options for getting the cost of a budget.
        • IncludeTaxrequired — (Boolean) A generic boolean value.
        • IncludeSubscriptionrequired — (Boolean) A generic boolean value.
        • UseBlendedrequired — (Boolean) A generic boolean value.
      • TimeUnitrequired — (String) The time unit of the budget. e.g. weekly, monthly, etc. Possible values include:
        • "MONTHLY"
        • "QUARTERLY"
        • "ANNUALLY"
      • TimePeriodrequired — (map) A time period indicated the start date and end date of a budget.
        • Startrequired — (Date) A generic timestamp. In Java it is transformed to a Date object.
        • Endrequired — (Date) A generic timestamp. In Java it is transformed to a Date object.
      • CalculatedSpend — (map) A structure holds the actual and forecasted spend for a budget.
        • ActualSpendrequired — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
          • Amountrequired — (String) A string to represent NumericValue.
          • Unitrequired — (String) A generic String.
        • ForecastedSpend — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
          • Amountrequired — (String) A string to represent NumericValue.
          • Unitrequired — (String) A generic String.
      • BudgetTyperequired — (String) The type of a budget. Can be COST or USAGE. Possible values include:
        • "USAGE"
        • "COST"
    • NotificationsWithSubscribers — (Array<map>) A list of Notifications, each with a list of subscribers.
      • Notificationrequired — (map) Notification model. Each budget may contain multiple notifications with different settings.
        • NotificationTyperequired — (String) The type of a notification. It should be ACTUAL or FORECASTED. Possible values include:
          • "ACTUAL"
          • "FORECASTED"
        • ComparisonOperatorrequired — (String) The comparison operator of a notification. Currently we support less than, equal to and greater than. Possible values include:
          • "GREATER_THAN"
          • "LESS_THAN"
          • "EQUAL_TO"
        • Thresholdrequired — (Float) The threshold of the a notification. It should be a number between 0 and 100.
      • Subscribersrequired — (Array<map>) A list of subscribers.
        • SubscriptionTyperequired — (String) The subscription type of the subscriber. It can be SMS or EMAIL. Possible values include:
          • "SNS"
          • "EMAIL"
        • Addressrequired — (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.

Returns:

  • (AWS.Request)

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

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

Create a new Notification with subscribers for a budget

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 */
  },
  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) Account Id of the customer. It should be a 12 digit number.
    • BudgetName — (String) A string represents the budget name. No ":" character is allowed.
    • Notification — (map) Notification model. Each budget may contain multiple notifications with different settings.
      • NotificationTyperequired — (String) The type of a notification. It should be ACTUAL or FORECASTED. Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String) The comparison operator of a notification. Currently we support less than, equal to and greater than. Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float) The threshold of the a notification. It should be a number between 0 and 100.
    • Subscribers — (Array<map>) A list of subscribers.
      • SubscriptionTyperequired — (String) The subscription type of the subscriber. It can be SMS or EMAIL. Possible values include:
        • "SNS"
        • "EMAIL"
      • Addressrequired — (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.

Returns:

  • (AWS.Request)

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

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

Create a new Subscriber for a notification

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 */
  },
  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) Account Id of the customer. It should be a 12 digit number.
    • BudgetName — (String) A string represents the budget name. No ":" character is allowed.
    • Notification — (map) Notification model. Each budget may contain multiple notifications with different settings.
      • NotificationTyperequired — (String) The type of a notification. It should be ACTUAL or FORECASTED. Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String) The comparison operator of a notification. Currently we support less than, equal to and greater than. Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float) The threshold of the a notification. It should be a number between 0 and 100.
    • Subscriber — (map) Subscriber model. Each notification may contain multiple subscribers with different addresses.
      • SubscriptionTyperequired — (String) The subscription type of the subscriber. It can be SMS or EMAIL. Possible values include:
        • "SNS"
        • "EMAIL"
      • Addressrequired — (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.

Returns:

  • (AWS.Request)

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

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

Delete a budget and related notifications

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) Account Id of the customer. It should be a 12 digit number.
    • BudgetName — (String) A string represents the budget name. No ":" character is allowed.

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

Delete a notification and related subscribers

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 */
  }
};
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) Account Id of the customer. It should be a 12 digit number.
    • BudgetName — (String) A string represents the budget name. No ":" character is allowed.
    • Notification — (map) Notification model. Each budget may contain multiple notifications with different settings.
      • NotificationTyperequired — (String) The type of a notification. It should be ACTUAL or FORECASTED. Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String) The comparison operator of a notification. Currently we support less than, equal to and greater than. Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float) The threshold of the a notification. It should be a number between 0 and 100.

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

Delete a Subscriber for a 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 */
  },
  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) Account Id of the customer. It should be a 12 digit number.
    • BudgetName — (String) A string represents the budget name. No ":" character is allowed.
    • Notification — (map) Notification model. Each budget may contain multiple notifications with different settings.
      • NotificationTyperequired — (String) The type of a notification. It should be ACTUAL or FORECASTED. Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String) The comparison operator of a notification. Currently we support less than, equal to and greater than. Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float) The threshold of the a notification. It should be a number between 0 and 100.
    • Subscriber — (map) Subscriber model. Each notification may contain multiple subscribers with different addresses.
      • SubscriptionTyperequired — (String) The subscription type of the subscriber. It can be SMS or EMAIL. Possible values include:
        • "SNS"
        • "EMAIL"
      • Addressrequired — (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.

Returns:

  • (AWS.Request)

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

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

Get a single 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) Account Id of the customer. It should be a 12 digit number.
    • BudgetName — (String) A string represents the budget name. No ":" character is allowed.

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) AWS Budget model
        • BudgetNamerequired — (String) A string represents the budget name. No ":" character is allowed.
        • BudgetLimitrequired — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
          • Amountrequired — (String) A string to represent NumericValue.
          • Unitrequired — (String) A generic String.
        • CostFilters — (map<Array<String>>) A map represents the cost filters applied to the budget.
        • CostTypesrequired — (map) This includes the options for getting the cost of a budget.
          • IncludeTaxrequired — (Boolean) A generic boolean value.
          • IncludeSubscriptionrequired — (Boolean) A generic boolean value.
          • UseBlendedrequired — (Boolean) A generic boolean value.
        • TimeUnitrequired — (String) The time unit of the budget. e.g. weekly, monthly, etc. Possible values include:
          • "MONTHLY"
          • "QUARTERLY"
          • "ANNUALLY"
        • TimePeriodrequired — (map) A time period indicated the start date and end date of a budget.
          • Startrequired — (Date) A generic timestamp. In Java it is transformed to a Date object.
          • Endrequired — (Date) A generic timestamp. In Java it is transformed to a Date object.
        • CalculatedSpend — (map) A structure holds the actual and forecasted spend for a budget.
          • ActualSpendrequired — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
            • Amountrequired — (String) A string to represent NumericValue.
            • Unitrequired — (String) A generic String.
          • ForecastedSpend — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
            • Amountrequired — (String) A string to represent NumericValue.
            • Unitrequired — (String) A generic String.
        • BudgetTyperequired — (String) The type of a budget. Can be COST or USAGE. Possible values include:
          • "USAGE"
          • "COST"

Returns:

  • (AWS.Request)

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

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

Get all budgets for 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) Account Id of the customer. It should be a 12 digit number.
    • MaxResults — (Integer) An integer to represent how many entries should a pagianted response contains. Maxium is set to 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:

      • Budgets — (Array<map>) A list of budgets
        • BudgetNamerequired — (String) A string represents the budget name. No ":" character is allowed.
        • BudgetLimitrequired — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
          • Amountrequired — (String) A string to represent NumericValue.
          • Unitrequired — (String) A generic String.
        • CostFilters — (map<Array<String>>) A map represents the cost filters applied to the budget.
        • CostTypesrequired — (map) This includes the options for getting the cost of a budget.
          • IncludeTaxrequired — (Boolean) A generic boolean value.
          • IncludeSubscriptionrequired — (Boolean) A generic boolean value.
          • UseBlendedrequired — (Boolean) A generic boolean value.
        • TimeUnitrequired — (String) The time unit of the budget. e.g. weekly, monthly, etc. Possible values include:
          • "MONTHLY"
          • "QUARTERLY"
          • "ANNUALLY"
        • TimePeriodrequired — (map) A time period indicated the start date and end date of a budget.
          • Startrequired — (Date) A generic timestamp. In Java it is transformed to a Date object.
          • Endrequired — (Date) A generic timestamp. In Java it is transformed to a Date object.
        • CalculatedSpend — (map) A structure holds the actual and forecasted spend for a budget.
          • ActualSpendrequired — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
            • Amountrequired — (String) A string to represent NumericValue.
            • Unitrequired — (String) A generic String.
          • ForecastedSpend — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
            • Amountrequired — (String) A string to represent NumericValue.
            • Unitrequired — (String) A generic String.
        • BudgetTyperequired — (String) The type of a budget. Can be COST or USAGE. Possible values include:
          • "USAGE"
          • "COST"
      • NextToken — (String) A generic String.

Returns:

  • (AWS.Request)

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

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

Get notifications of 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) Account Id of the customer. It should be a 12 digit number.
    • BudgetName — (String) A string represents the budget name. No ":" character is allowed.
    • MaxResults — (Integer) An integer to represent how many entries should a pagianted response contains. Maxium is set to 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:

      • Notifications — (Array<map>) A list of notifications.
        • NotificationTyperequired — (String) The type of a notification. It should be ACTUAL or FORECASTED. Possible values include:
          • "ACTUAL"
          • "FORECASTED"
        • ComparisonOperatorrequired — (String) The comparison operator of a notification. Currently we support less than, equal to and greater than. Possible values include:
          • "GREATER_THAN"
          • "LESS_THAN"
          • "EQUAL_TO"
        • Thresholdrequired — (Float) The threshold of the a notification. It should be a number between 0 and 100.
      • NextToken — (String) A generic String.

Returns:

  • (AWS.Request)

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

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

Get subscribers of 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 */
  },
  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) Account Id of the customer. It should be a 12 digit number.
    • BudgetName — (String) A string represents the budget name. No ":" character is allowed.
    • Notification — (map) Notification model. Each budget may contain multiple notifications with different settings.
      • NotificationTyperequired — (String) The type of a notification. It should be ACTUAL or FORECASTED. Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String) The comparison operator of a notification. Currently we support less than, equal to and greater than. Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float) The threshold of the a notification. It should be a number between 0 and 100.
    • MaxResults — (Integer) An integer to represent how many entries should a pagianted response contains. Maxium is set to 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:

      • Subscribers — (Array<map>) A list of subscribers.
        • SubscriptionTyperequired — (String) The subscription type of the subscriber. It can be SMS or EMAIL. Possible values include:
          • "SNS"
          • "EMAIL"
        • Addressrequired — (String) A generic String.
      • NextToken — (String) A generic String.

Returns:

  • (AWS.Request)

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

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

Update the information of a budget already created

Service Reference:

Examples:

Calling the updateBudget operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  NewBudget: { /* required */
    BudgetLimit: { /* required */
      Amount: 'STRING_VALUE', /* required */
      Unit: 'STRING_VALUE' /* required */
    },
    BudgetName: 'STRING_VALUE', /* required */
    BudgetType: USAGE | COST, /* required */
    CostTypes: { /* required */
      IncludeSubscription: true || false, /* required */
      IncludeTax: true || false, /* required */
      UseBlended: true || false /* required */
    },
    TimePeriod: { /* required */
      End: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
      Start: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789 /* required */
    },
    TimeUnit: MONTHLY | QUARTERLY | ANNUALLY, /* 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>': ... */
    }
  }
};
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) Account Id of the customer. It should be a 12 digit number.
    • NewBudget — (map) AWS Budget model
      • BudgetNamerequired — (String) A string represents the budget name. No ":" character is allowed.
      • BudgetLimitrequired — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
        • Amountrequired — (String) A string to represent NumericValue.
        • Unitrequired — (String) A generic String.
      • CostFilters — (map<Array<String>>) A map represents the cost filters applied to the budget.
      • CostTypesrequired — (map) This includes the options for getting the cost of a budget.
        • IncludeTaxrequired — (Boolean) A generic boolean value.
        • IncludeSubscriptionrequired — (Boolean) A generic boolean value.
        • UseBlendedrequired — (Boolean) A generic boolean value.
      • TimeUnitrequired — (String) The time unit of the budget. e.g. weekly, monthly, etc. Possible values include:
        • "MONTHLY"
        • "QUARTERLY"
        • "ANNUALLY"
      • TimePeriodrequired — (map) A time period indicated the start date and end date of a budget.
        • Startrequired — (Date) A generic timestamp. In Java it is transformed to a Date object.
        • Endrequired — (Date) A generic timestamp. In Java it is transformed to a Date object.
      • CalculatedSpend — (map) A structure holds the actual and forecasted spend for a budget.
        • ActualSpendrequired — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
          • Amountrequired — (String) A string to represent NumericValue.
          • Unitrequired — (String) A generic String.
        • ForecastedSpend — (map) A structure represent either a cost spend or usage spend. Contains an amount and a unit.
          • Amountrequired — (String) A string to represent NumericValue.
          • Unitrequired — (String) A generic String.
      • BudgetTyperequired — (String) The type of a budget. Can be COST or USAGE. Possible values include:
        • "USAGE"
        • "COST"

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

Update the information about a notification already created

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 */
  },
  OldNotification: { /* required */
    ComparisonOperator: GREATER_THAN | LESS_THAN | EQUAL_TO, /* required */
    NotificationType: ACTUAL | FORECASTED, /* required */
    Threshold: 0.0 /* required */
  }
};
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) Account Id of the customer. It should be a 12 digit number.
    • BudgetName — (String) A string represents the budget name. No ":" character is allowed.
    • OldNotification — (map) Notification model. Each budget may contain multiple notifications with different settings.
      • NotificationTyperequired — (String) The type of a notification. It should be ACTUAL or FORECASTED. Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String) The comparison operator of a notification. Currently we support less than, equal to and greater than. Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float) The threshold of the a notification. It should be a number between 0 and 100.
    • NewNotification — (map) Notification model. Each budget may contain multiple notifications with different settings.
      • NotificationTyperequired — (String) The type of a notification. It should be ACTUAL or FORECASTED. Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String) The comparison operator of a notification. Currently we support less than, equal to and greater than. Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float) The threshold of the a notification. It should be a number between 0 and 100.

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

Update 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 */
  },
  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) Account Id of the customer. It should be a 12 digit number.
    • BudgetName — (String) A string represents the budget name. No ":" character is allowed.
    • Notification — (map) Notification model. Each budget may contain multiple notifications with different settings.
      • NotificationTyperequired — (String) The type of a notification. It should be ACTUAL or FORECASTED. Possible values include:
        • "ACTUAL"
        • "FORECASTED"
      • ComparisonOperatorrequired — (String) The comparison operator of a notification. Currently we support less than, equal to and greater than. Possible values include:
        • "GREATER_THAN"
        • "LESS_THAN"
        • "EQUAL_TO"
      • Thresholdrequired — (Float) The threshold of the a notification. It should be a number between 0 and 100.
    • OldSubscriber — (map) Subscriber model. Each notification may contain multiple subscribers with different addresses.
      • SubscriptionTyperequired — (String) The subscription type of the subscriber. It can be SMS or EMAIL. Possible values include:
        • "SNS"
        • "EMAIL"
      • Addressrequired — (String) A generic String.
    • NewSubscriber — (map) Subscriber model. Each notification may contain multiple subscribers with different addresses.
      • SubscriptionTyperequired — (String) The subscription type of the subscriber. It can be SMS or EMAIL. Possible values include:
        • "SNS"
        • "EMAIL"
      • Addressrequired — (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.

Returns:

  • (AWS.Request)

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