Skip to content

API for AWS Budgets

ABAP Package /AWS1/API_BGT_IMPL
ABAP SDK "TLA" BGT
ABAP Interface /AWS1/IF_BGT

The "TLA" is a Three Letter Abbreviation that appears in ABAP class names, data dictionary objects and other ABAP objects throughout the AWS SDK for SAP ABAP. The TLA for AWS Budgets is BGT. This TLA helps squeeze ABAP objects into the 30-character length limit of the ABAP data dictionary.

Installation

To install the AWS SDK for SAP ABAP, import the Core transport, along with the transport for the Budgets module and other API modules you are interested in. A few modules are included in the Core transport itself. For more information, see the Developer Guide guide.

About The Service

Use the Amazon Web Services Budgets API to plan your service usage, service costs, and instance reservations. This API reference provides descriptions, syntax, and usage examples for each of the actions and data types for the Amazon Web Services Budgets feature.

Budgets provide you with a way to see the following information:

  • How close your plan is to your budgeted amount or to the free tier limits

  • Your usage-to-date, including how much you've used of your Reserved Instances (RIs)

  • Your current estimated charges from Amazon Web Services, and how much your predicted usage will accrue in charges by the end of the month

  • How much of your budget has been used

Amazon Web Services updates your budget status several times a day. Budgets track your unblended costs, subscriptions, refunds, and RIs. You can create the following types of budgets:

  • Cost budgets - Plan how much you want to spend on a service.

  • Usage budgets - Plan how much you want to use one or more services.

  • RI utilization budgets - Define a utilization threshold, and receive alerts when your RI usage falls below that threshold. This lets you see if your RIs are unused or under-utilized.

  • RI coverage budgets - Define a coverage threshold, and receive alerts when the number of your instance hours that are covered by RIs fall below that threshold. This lets you see how much of your instance usage is covered by a reservation.

Service Endpoint

The Amazon Web Services Budgets API provides the following endpoint:

  • https://budgets.amazonaws.com

For information about costs that are associated with the Amazon Web Services Budgets API, see Amazon Web Services Cost Management Pricing.

Using the SDK

In your code, create a client using the SDK module for AWS Budgets, which is created with factory method /AWS1/CL_BGT_FACTORY=>create(). In this example we will assume you have configured an SDK profile in transaction /AWS1/IMG called ZFINANCE.

DATA(go_session)   = /aws1/cl_rt_session_aws=>create( 'ZFINANCE' ).
DATA(go_bgt)       = /aws1/cl_bgt_factory=>create( go_session ).

Your variable go_bgt is an instance of /AWS1/IF_BGT, and all of the operations in the AWS Budgets service are accessed by calling methods in /AWS1/IF_BGT.

API Operations

For an overview of ABAP method calls corresponding to API operations in AWS Budgets, see the Operation List.

Factory Method

/AWS1/CL_BGT_FACTORY=>create( )

Creates an object of type /AWS1/IF_BGT.

IMPORTING

Optional arguments:

IV_PROTOCOL TYPE /AWS1/RT_PROTOCOL /AWS1/RT_PROTOCOL

IO_SESSION TYPE REF TO /AWS1/CL_RT_SESSION_BASE /AWS1/CL_RT_SESSION_BASE

IV_REGION TYPE /AWS1/RT_REGION_ID /AWS1/RT_REGION_ID

IV_CUSTOM_ENDPOINT TYPE /AWS1/RT_ENDPOINT /AWS1/RT_ENDPOINT

RETURNING

OO_CLIENT TYPE REF TO /AWS1/IF_BGT /AWS1/IF_BGT

/AWS1/IF_BGT represents the ABAP client for the Budgets service, representing each operation as a method call. For more information see the API Page page.

Configuring Programmatically

DATA(lo_config) = DATA(go_bgt)->get_config( ).

lo_config is a variable of type /AWS1/CL_BGT_CONFIG. See the documentation for /AWS1/CL_BGT_CONFIG for details on the settings that can be configured.

Paginators

Paginators for AWS Budgets can be created via get_paginator() which returns a paginator object of type /AWS1/IF_BGT_PAGINATOR. The operation method that is being paginated is called using the paginator object, which accepts any necessary parameters to provide to the underlying API operation. This returns an iterator object which can be used to iterate over paginated results using has_next() and get_next() methods.

Details about the paginator methods available for service AWS Budgets can be found in interface /AWS1/IF_BGT_PAGINATOR.