/AWS1/IF_BIL=>LISTBILLINGVIEWS()¶
About ListBillingViews¶
Lists the billing views available for a given time period.
Every Amazon Web Services account has a unique PRIMARY billing view that represents the billing data available by default. Accounts that use Billing Conductor also have BILLING_GROUP billing views representing pro forma costs associated with each created billing group.
Method Signature¶
METHODS /AWS1/IF_BIL~LISTBILLINGVIEWS
IMPORTING
!IO_ACTIVETIMERANGE TYPE REF TO /AWS1/CL_BILACTIVETIMERANGE OPTIONAL
!IT_ARNS TYPE /AWS1/CL_BILBLLNGVIEWARNLIST_W=>TT_BILLINGVIEWARNLIST OPTIONAL
!IT_BILLINGVIEWTYPES TYPE /AWS1/CL_BILBLLNGVIEWTYPELST_W=>TT_BILLINGVIEWTYPELIST OPTIONAL
!IV_OWNERACCOUNTID TYPE /AWS1/BILACCOUNTID OPTIONAL
!IV_SOURCEACCOUNTID TYPE /AWS1/BILACCOUNTID OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/BILBLLNGVIEWSMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/BILPAGETOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_billistbllngviewsrsp
RAISING
/AWS1/CX_BILACCESSDENIEDEX
/AWS1/CX_BILINTERNALSERVEREX
/AWS1/CX_BILTHROTTLINGEX
/AWS1/CX_BILVALIDATIONEX
/AWS1/CX_BILCLIENTEXC
/AWS1/CX_BILSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
io_activetimerange TYPE REF TO /AWS1/CL_BILACTIVETIMERANGE /AWS1/CL_BILACTIVETIMERANGE¶
The time range for the billing views listed.
PRIMARYbilling view is always listed.BILLING_GROUPbilling views are listed for time ranges when the associated billing group resource in Billing Conductor is active. The time range must be within one calendar month.
it_arns TYPE /AWS1/CL_BILBLLNGVIEWARNLIST_W=>TT_BILLINGVIEWARNLIST TT_BILLINGVIEWARNLIST¶
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.
it_billingviewtypes TYPE /AWS1/CL_BILBLLNGVIEWTYPELST_W=>TT_BILLINGVIEWTYPELIST TT_BILLINGVIEWTYPELIST¶
The type of billing view.
iv_owneraccountid TYPE /AWS1/BILACCOUNTID /AWS1/BILACCOUNTID¶
The list of owners of the billing view.
iv_sourceaccountid TYPE /AWS1/BILACCOUNTID /AWS1/BILACCOUNTID¶
Filters the results to include only billing views that use the specified account as a source.
iv_maxresults TYPE /AWS1/BILBLLNGVIEWSMAXRESULTS /AWS1/BILBLLNGVIEWSMAXRESULTS¶
The maximum number of billing views to retrieve. Default is 100.
iv_nexttoken TYPE /AWS1/BILPAGETOKEN /AWS1/BILPAGETOKEN¶
The pagination token that is used on subsequent calls to list billing views.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_billistbllngviewsrsp /AWS1/CL_BILLISTBLLNGVIEWSRSP¶
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->listbillingviews(
io_activetimerange = new /aws1/cl_bilactivetimerange(
iv_activeafterinclusive = '20150101000000.0000000'
iv_activebeforeinclusive = '20150101000000.0000000'
)
it_arns = VALUE /aws1/cl_bilbllngviewarnlist_w=>tt_billingviewarnlist(
( new /aws1/cl_bilbllngviewarnlist_w( |string| ) )
)
it_billingviewtypes = VALUE /aws1/cl_bilbllngviewtypelst_w=>tt_billingviewtypelist(
( new /aws1/cl_bilbllngviewtypelst_w( |string| ) )
)
iv_maxresults = 123
iv_nexttoken = |string|
iv_owneraccountid = |string|
iv_sourceaccountid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_billingviews( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_billingviewarn = lo_row_1->get_arn( ).
lv_billingviewname = lo_row_1->get_name( ).
lv_billingviewdescription = lo_row_1->get_description( ).
lv_accountid = lo_row_1->get_owneraccountid( ).
lv_accountid = lo_row_1->get_sourceaccountid( ).
lv_billingviewtype = lo_row_1->get_billingviewtype( ).
lo_billingviewhealthstatus = lo_row_1->get_healthstatus( ).
IF lo_billingviewhealthstatus IS NOT INITIAL.
lv_billingviewstatus = lo_billingviewhealthstatus->get_statuscode( ).
LOOP AT lo_billingviewhealthstatus->get_statusreasons( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_billingviewstatusreason = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
lv_pagetoken = lo_result->get_nexttoken( ).
ENDIF.
Invoke ListBillingViews¶
Invoke ListBillingViews
DATA(lo_result) = lo_client->listbillingviews(
io_activetimerange = new /aws1/cl_bilactivetimerange(
iv_activeafterinclusive = '20240701000000.0000000'
iv_activebeforeinclusive = '20240731235959.9990000'
)
).
Error example for ListBillingViews¶
Error example for ListBillingViews
DATA(lo_result) = lo_client->listbillingviews(
io_activetimerange = new /aws1/cl_bilactivetimerange(
iv_activeafterinclusive = '20240701000001.0000000'
iv_activebeforeinclusive = '20240701000000.0000000'
)
).