Skip to content

/AWS1/CL_BIL=>CREATEBILLINGVIEW()

About CreateBillingView

Creates a billing view with the specified billing view attributes.

Method Signature

IMPORTING

Required arguments:

iv_name TYPE /AWS1/BILBILLINGVIEWNAME /AWS1/BILBILLINGVIEWNAME

The name of the billing view.

it_sourceviews TYPE /AWS1/CL_BILBLLVIEWSRCVIEWSL00=>TT_BILLINGVIEWSOURCEVIEWSLIST TT_BILLINGVIEWSOURCEVIEWSLIST

A list of billing views used as the data source for the custom billing view.

Optional arguments:

iv_description TYPE /AWS1/BILBILLINGVIEWDESC /AWS1/BILBILLINGVIEWDESC

The description of the billing view.

io_datafilterexpression TYPE REF TO /AWS1/CL_BILEXPRESSION /AWS1/CL_BILEXPRESSION

See Expression. Billing view only supports LINKED_ACCOUNT and Tags.

iv_clienttoken TYPE /AWS1/BILCLIENTTOKEN /AWS1/BILCLIENTTOKEN

A unique, case-sensitive identifier you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. If the original request completes successfully, any subsequent retries complete successfully without performing any further actions with an idempotent request.

it_resourcetags TYPE /AWS1/CL_BILRESOURCETAG=>TT_RESOURCETAGLIST TT_RESOURCETAGLIST

A list of key value map specifying tags associated to the billing view being created.

RETURNING

oo_output TYPE REF TO /aws1/cl_bilcreatebllngviewrsp /AWS1/CL_BILCREATEBLLNGVIEWRSP

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_bil~createbillingview(
  io_datafilterexpression = new /aws1/cl_bilexpression(
    io_dimensions = new /aws1/cl_bildimensionvalues(
      it_values = VALUE /aws1/cl_bilvalues_w=>tt_values(
        ( new /aws1/cl_bilvalues_w( |string| ) )
      )
      iv_key = |string|
    )
    io_tags = new /aws1/cl_biltagvalues(
      it_values = VALUE /aws1/cl_bilvalues_w=>tt_values(
        ( new /aws1/cl_bilvalues_w( |string| ) )
      )
      iv_key = |string|
    )
  )
  it_resourcetags = VALUE /aws1/cl_bilresourcetag=>tt_resourcetaglist(
    (
      new /aws1/cl_bilresourcetag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  it_sourceviews = VALUE /aws1/cl_bilbllviewsrcviewsl00=>tt_billingviewsourceviewslist(
    ( new /aws1/cl_bilbllviewsrcviewsl00( |string| ) )
  )
  iv_clienttoken = |string|
  iv_description = |string|
  iv_name = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_billingviewarn = lo_result->get_arn( ).
  lv_timestamp = lo_result->get_createdat( ).
ENDIF.

Invoke CreateBillingView

Invoke CreateBillingView

DATA(lo_result) = lo_client->/aws1/if_bil~createbillingview(
  io_datafilterexpression = new /aws1/cl_bilexpression(
    io_dimensions = new /aws1/cl_bildimensionvalues(
      it_values = VALUE /aws1/cl_bilvalues_w=>tt_values(
        ( new /aws1/cl_bilvalues_w( |000000000000| ) )
      )
      iv_key = |LINKED_ACCOUNT|
    )
  )
  it_sourceviews = VALUE /aws1/cl_bilbllviewsrcviewsl00=>tt_billingviewsourceviewslist(
    ( new /aws1/cl_bilbllviewsrcviewsl00( |arn:aws:billing::123456789101:billingview/primary| ) )
  )
  iv_description = |Custom Billing View Example|
  iv_name = |Example Custom Billing View|
).