@datafire/amazonaws_budgets

5.0.0 • Public • Published

@datafire/amazonaws_budgets

Client library for AWS Budgets

Installation and Usage

npm install --save @datafire/amazonaws_budgets
let amazonaws_budgets = require('@datafire/amazonaws_budgets').create({
  accessKeyId: "",
  secretAccessKey: "",
  region: ""
});

amazonaws_budgets.CreateBudget({
  "AccountId": "",
  "Budget": {
    "BudgetName": "",
    "TimeUnit": "",
    "BudgetType": ""
  }
}).then(data => {
  console.log(data);
});

Description

Budgets enable you to plan your service usage, service costs, and your RI utilization. You can also track how close your plan is to your budgeted amount or to the free tier limits. Budgets provide you with a quick way to see your usage-to-date and current estimated charges from AWS and to see how much your predicted usage accrues in charges by the end of the month. Budgets also compare current estimates and charges to the amount that you indicated you want to use or spend and lets you see how much of your budget has been used. AWS updates your budget status several times a day. Budgets track your unblended costs, subscriptions, and refunds. You can create the following types of budgets:

  • Cost budgets allow you to say how much you want to spend on a service.

  • Usage budgets allow you to say how many hours you want to use for one or more services.

  • RI utilization budgets allow you to define a utilization threshold and receive alerts when RIs are tracking below that threshold.

You can create up to 20,000 budgets per AWS master account. Your first two budgets are free of charge. Each additional budget costs $0.02 per day. You can set up optional notifications that warn you if you exceed, or are forecasted to exceed, your budgeted amount. You can have notifications sent to an Amazon SNS topic, to an email address, or to both. For more information, see Creating an Amazon SNS Topic for Budget Notifications. AWS Free Tier usage alerts via AWS Budgets are provided for you, and do not count toward your budget limits.

Service Endpoint

The AWS Budgets API provides the following endpoint:

Actions

CreateBudget

amazonaws_budgets.CreateBudget({
  "AccountId": "",
  "Budget": {
    "BudgetName": "",
    "TimeUnit": "",
    "BudgetType": ""
  }
}, context)

Input

Output

CreateNotification

amazonaws_budgets.CreateNotification({
  "AccountId": "",
  "BudgetName": "",
  "Notification": {
    "NotificationType": "",
    "ComparisonOperator": "",
    "Threshold": 0
  },
  "Subscribers": []
}, context)

Input

Output

CreateSubscriber

amazonaws_budgets.CreateSubscriber({
  "AccountId": "",
  "BudgetName": "",
  "Notification": {
    "NotificationType": "",
    "ComparisonOperator": "",
    "Threshold": 0
  },
  "Subscriber": {
    "SubscriptionType": "",
    "Address": ""
  }
}, context)

Input

Output

DeleteBudget

amazonaws_budgets.DeleteBudget({
  "AccountId": "",
  "BudgetName": ""
}, context)

Input

Output

DeleteNotification

amazonaws_budgets.DeleteNotification({
  "AccountId": "",
  "BudgetName": "",
  "Notification": {
    "NotificationType": "",
    "ComparisonOperator": "",
    "Threshold": 0
  }
}, context)

Input

Output

DeleteSubscriber

amazonaws_budgets.DeleteSubscriber({
  "AccountId": "",
  "BudgetName": "",
  "Notification": {
    "NotificationType": "",
    "ComparisonOperator": "",
    "Threshold": 0
  },
  "Subscriber": {
    "SubscriptionType": "",
    "Address": ""
  }
}, context)

Input

Output

DescribeBudget

amazonaws_budgets.DescribeBudget({
  "AccountId": "",
  "BudgetName": ""
}, context)

Input

Output

DescribeBudgets

amazonaws_budgets.DescribeBudgets({
  "AccountId": ""
}, context)

Input

Output

DescribeNotificationsForBudget

amazonaws_budgets.DescribeNotificationsForBudget({
  "AccountId": "",
  "BudgetName": ""
}, context)

Input

Output

DescribeSubscribersForNotification

amazonaws_budgets.DescribeSubscribersForNotification({
  "AccountId": "",
  "BudgetName": "",
  "Notification": {
    "NotificationType": "",
    "ComparisonOperator": "",
    "Threshold": 0
  }
}, context)

Input

Output

UpdateBudget

amazonaws_budgets.UpdateBudget({
  "AccountId": "",
  "NewBudget": {
    "BudgetName": "",
    "TimeUnit": "",
    "BudgetType": ""
  }
}, context)

Input

Output

UpdateNotification

amazonaws_budgets.UpdateNotification({
  "AccountId": "",
  "BudgetName": "",
  "OldNotification": {
    "NotificationType": "",
    "ComparisonOperator": "",
    "Threshold": 0
  },
  "NewNotification": {
    "NotificationType": "",
    "ComparisonOperator": "",
    "Threshold": 0
  }
}, context)

Input

Output

UpdateSubscriber

amazonaws_budgets.UpdateSubscriber({
  "AccountId": "",
  "BudgetName": "",
  "Notification": {
    "NotificationType": "",
    "ComparisonOperator": "",
    "Threshold": 0
  },
  "OldSubscriber": {
    "SubscriptionType": "",
    "Address": ""
  },
  "NewSubscriber": {
    "SubscriptionType": "",
    "Address": ""
  }
}, context)

Input

Output

Definitions

AccountId

  • AccountId string: The account ID of the customer. It should be a 12 digit number.

Budget

  • Budget object:

    Represents the output of the CreateBudget operation. The content consists of the detailed metadata and data file information, and the current status of the budget.

    The ARN pattern for a budget is: arn:aws:budgetservice::AccountId:budget/budgetName

BudgetName

  • BudgetName string: A string represents the budget name. No ":" and "" character is allowed.

BudgetType

  • BudgetType string (values: USAGE, COST, RI_UTILIZATION): The type of a budget. It should be COST, USAGE, or RI_UTILIZATION.

Budgets

  • Budgets array: A list of budgets

CalculatedSpend

  • CalculatedSpend object:

    The spend objects associated with this budget. The actualSpend tracks how much you've used, cost, usage, or RI units, and the forecastedSpend tracks how much you are predicted to spend if your current usage remains steady.

    For example, if it is the 20th of the month and you have spent 50 dollars on Amazon EC2, your actualSpend is 50 USD, and your forecastedSpend is 75 USD.

    • ActualSpend required Spend
    • ForecastedSpend Spend

ComparisonOperator

  • ComparisonOperator string (values: GREATER_THAN, LESS_THAN, EQUAL_TO): The comparison operator of a notification. Currently we support less than, equal to and greater than.

CostFilters

CostTypes

CreateBudgetRequest

CreateBudgetResponse

  • CreateBudgetResponse object: Response of CreateBudget

CreateNotificationRequest

CreateNotificationResponse

  • CreateNotificationResponse object: Response of CreateNotification

CreateSubscriberRequest

CreateSubscriberResponse

  • CreateSubscriberResponse object: Response of CreateSubscriber

CreationLimitExceededException

  • CreationLimitExceededException object: You've exceeded the notification or subscriber limit.

DeleteBudgetRequest

  • DeleteBudgetRequest object: Request of DeleteBudget

DeleteBudgetResponse

  • DeleteBudgetResponse object: Response of DeleteBudget

DeleteNotificationRequest

  • DeleteNotificationRequest object: Request of DeleteNotification

DeleteNotificationResponse

  • DeleteNotificationResponse object: Response of DeleteNotification

DeleteSubscriberRequest

DeleteSubscriberResponse

  • DeleteSubscriberResponse object: Response of DeleteSubscriber

DescribeBudgetRequest

  • DescribeBudgetRequest object: Request of DescribeBudget

DescribeBudgetResponse

  • DescribeBudgetResponse object: Response of DescribeBudget

DescribeBudgetsRequest

DescribeBudgetsResponse

  • DescribeBudgetsResponse object: Response of DescribeBudgets

DescribeNotificationsForBudgetRequest

DescribeNotificationsForBudgetResponse

  • DescribeNotificationsForBudgetResponse object: Response of GetNotificationsForBudget

DescribeSubscribersForNotificationRequest

DescribeSubscribersForNotificationResponse

  • DescribeSubscribersForNotificationResponse object: Response of DescribeSubscribersForNotification

DimensionValues

DuplicateRecordException

  • DuplicateRecordException object: The budget name already exists. Budget names must be unique within an account.

ExpiredNextTokenException

  • ExpiredNextTokenException object: The pagination token expired.

GenericString

  • GenericString string: A generic String.

GenericTimestamp

  • GenericTimestamp string: A generic timestamp. In Java it is transformed to a Date object.

InternalErrorException

  • InternalErrorException object: An error on the server occurred during the processing of your request. Try again later.

InvalidNextTokenException

  • InvalidNextTokenException object: The pagination token is invalid.

InvalidParameterException

  • InvalidParameterException object: An error on the client occurred. Typically, the cause is an invalid input value.

MaxResults

  • MaxResults integer: An integer to represent how many entries a paginated response contains. Maximum is set to 100.

NotFoundException

  • NotFoundException object: We can’t locate the resource that you specified.

Notification

  • Notification object:

    A notification associated with a budget. A budget can have up to five notifications.

    Each notification must have at least one subscriber. A notification can have one SNS subscriber and up to ten email subscribers, for a total of 11 subscribers.

    For example, if you have a budget for 200 dollars and you want to be notified when you go over 160 dollars, create a notification with the following parameters:

    • A notificationType of ACTUAL

    • A comparisonOperator of GREATER_THAN

    • A notification threshold of 80

NotificationThreshold

  • NotificationThreshold number: The threshold of a notification. It should be a number between 0 and 1,000,000,000.

NotificationType

  • NotificationType string (values: ACTUAL, FORECASTED): The type of a notification. It should be ACTUAL or FORECASTED.

NotificationWithSubscribers

  • NotificationWithSubscribers object: A notification with subscribers. A notification can have one SNS subscriber and up to ten email subscribers, for a total of 11 subscribers.

NotificationWithSubscribersList

Notifications

  • Notifications array: A list of notifications.

NullableBoolean

  • NullableBoolean boolean

NumericValue

  • NumericValue string: A string to represent NumericValue.

Spend

  • Spend object:

    The amount of cost or usage being measured for a budget.

    For example, a Spend for 3 GB of S3 usage would have the following parameters:

    • An Amount of 3

    • A unit of GB

Subscriber

  • Subscriber object:

    The subscriber to a budget notification. The subscriber consists of a subscription type and either an Amazon Simple Notification Service topic or an email address.

    For example, an email subscriber would have the following parameters:

SubscriberAddress

  • SubscriberAddress string: String containing email or sns topic for the subscriber address.

Subscribers

  • Subscribers array: A list of subscribers.

SubscriptionType

  • SubscriptionType string (values: SNS, EMAIL): The subscription type of the subscriber. It can be SMS or EMAIL.

ThresholdType

  • ThresholdType string (values: PERCENTAGE, ABSOLUTE_VALUE): The type of threshold for a notification. It can be PERCENTAGE or ABSOLUTE_VALUE.

TimePeriod

  • TimePeriod object: 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.

TimeUnit

  • TimeUnit string (values: DAILY, MONTHLY, QUARTERLY, ANNUALLY): The time unit of the budget. e.g. MONTHLY, QUARTERLY, etc.

UnitValue

  • UnitValue string: A string to represent budget spend unit. It should be not null and not empty.

UpdateBudgetRequest

  • UpdateBudgetRequest object: Request of UpdateBudget

UpdateBudgetResponse

  • UpdateBudgetResponse object: Response of UpdateBudget

UpdateNotificationRequest

UpdateNotificationResponse

  • UpdateNotificationResponse object: Response of UpdateNotification

UpdateSubscriberRequest

UpdateSubscriberResponse

  • UpdateSubscriberResponse object: Response of UpdateSubscriber

errorMessage

  • errorMessage string: The error message the exception carries.

Readme

Keywords

none

Package Sidebar

Install

npm i @datafire/amazonaws_budgets

Weekly Downloads

0

Version

5.0.0

License

MIT

Unpacked Size

91.9 kB

Total Files

4

Last publish

Collaborators

  • datafire