Skip to content

/AWS1/CL_BGT=>CREATEBUDGETACTION()

About CreateBudgetAction

Creates a budget action.

Method Signature

IMPORTING

Required arguments:

iv_accountid TYPE /AWS1/BGTACCOUNTID /AWS1/BGTACCOUNTID

AccountId

iv_budgetname TYPE /AWS1/BGTBUDGETNAME /AWS1/BGTBUDGETNAME

BudgetName

iv_notificationtype TYPE /AWS1/BGTNOTIFICATIONTYPE /AWS1/BGTNOTIFICATIONTYPE

NotificationType

iv_actiontype TYPE /AWS1/BGTACTIONTYPE /AWS1/BGTACTIONTYPE

The type of action. This defines the type of tasks that can be carried out by this action. This field also determines the format for definition.

io_actionthreshold TYPE REF TO /AWS1/CL_BGTACTIONTHRESHOLD /AWS1/CL_BGTACTIONTHRESHOLD

ActionThreshold

io_definition TYPE REF TO /AWS1/CL_BGTDEFINITION /AWS1/CL_BGTDEFINITION

Definition

iv_executionrolearn TYPE /AWS1/BGTROLEARN /AWS1/BGTROLEARN

The role passed for action execution and reversion. Roles and actions must be in the same account.

iv_approvalmodel TYPE /AWS1/BGTAPPROVALMODEL /AWS1/BGTAPPROVALMODEL

This specifies if the action needs manual or automatic approval.

it_subscribers TYPE /AWS1/CL_BGTSUBSCRIBER=>TT_SUBSCRIBERS TT_SUBSCRIBERS

Subscribers

Optional arguments:

it_resourcetags TYPE /AWS1/CL_BGTRESOURCETAG=>TT_RESOURCETAGLIST TT_RESOURCETAGLIST

An optional list of tags to associate with the specified budget action. Each tag consists of a key and a value, and each key must be unique for the resource.

RETURNING

oo_output TYPE REF TO /aws1/cl_bgtcreatebudgetactrsp /AWS1/CL_BGTCREATEBUDGETACTRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_bgt~createbudgetaction(
  io_actionthreshold = new /aws1/cl_bgtactionthreshold(
    iv_actionthresholdtype = |string|
    iv_actionthresholdvalue = '0.1'
  )
  io_definition = new /aws1/cl_bgtdefinition(
    io_iamactiondefinition = new /aws1/cl_bgtiamactiondefn(
      it_groups = VALUE /aws1/cl_bgtgroups_w=>tt_groups(
        ( new /aws1/cl_bgtgroups_w( |string| ) )
      )
      it_roles = VALUE /aws1/cl_bgtroles_w=>tt_roles(
        ( new /aws1/cl_bgtroles_w( |string| ) )
      )
      it_users = VALUE /aws1/cl_bgtusers_w=>tt_users(
        ( new /aws1/cl_bgtusers_w( |string| ) )
      )
      iv_policyarn = |string|
    )
    io_scpactiondefinition = new /aws1/cl_bgtscpactiondefn(
      it_targetids = VALUE /aws1/cl_bgttargetids_w=>tt_targetids(
        ( new /aws1/cl_bgttargetids_w( |string| ) )
      )
      iv_policyid = |string|
    )
    io_ssmactiondefinition = new /aws1/cl_bgtssmactiondefn(
      it_instanceids = VALUE /aws1/cl_bgtinstanceids_w=>tt_instanceids(
        ( new /aws1/cl_bgtinstanceids_w( |string| ) )
      )
      iv_actionsubtype = |string|
      iv_region = |string|
    )
  )
  it_resourcetags = VALUE /aws1/cl_bgtresourcetag=>tt_resourcetaglist(
    (
      new /aws1/cl_bgtresourcetag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  it_subscribers = VALUE /aws1/cl_bgtsubscriber=>tt_subscribers(
    (
      new /aws1/cl_bgtsubscriber(
        iv_address = |string|
        iv_subscriptiontype = |string|
      )
    )
  )
  iv_accountid = |string|
  iv_actiontype = |string|
  iv_approvalmodel = |string|
  iv_budgetname = |string|
  iv_executionrolearn = |string|
  iv_notificationtype = |string|
).

This is an example of reading all possible response values

lv_accountid = lo_result->get_accountid( ).
lv_budgetname = lo_result->get_budgetname( ).
lv_actionid = lo_result->get_actionid( ).