/AWS1/IF_CEX=>LISTCOSTCATEGORYRESASSOCS()¶
About ListCostCategoryResourceAssociations¶
Returns resource associations of all cost categories defined in the account. You have the option to use CostCategoryArn to get the association for a specific cost category. ListCostCategoryResourceAssociations supports pagination. The request can have a MaxResults range up to 100.
Method Signature¶
METHODS /AWS1/IF_CEX~LISTCOSTCATEGORYRESASSOCS
IMPORTING
!IV_COSTCATEGORYARN TYPE /AWS1/CEXARN OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/CEXNEXTPAGETOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/CEXCOSTCATMAXRESULTS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cexlstcostcatresasc01
RAISING
/AWS1/CX_CEXLIMITEXCEEDEDEX
/AWS1/CX_CEXRESOURCENOTFOUNDEX
/AWS1/CX_CEXCLIENTEXC
/AWS1/CX_CEXSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_costcategoryarn TYPE /AWS1/CEXARN /AWS1/CEXARN¶
The unique identifier for your cost category.
iv_nexttoken TYPE /AWS1/CEXNEXTPAGETOKEN /AWS1/CEXNEXTPAGETOKEN¶
The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
iv_maxresults TYPE /AWS1/CEXCOSTCATMAXRESULTS /AWS1/CEXCOSTCATMAXRESULTS¶
The number of entries a paginated response contains.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cexlstcostcatresasc01 /AWS1/CL_CEXLSTCOSTCATRESASC01¶
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->listcostcategoryresassocs(
iv_costcategoryarn = |string|
iv_maxresults = 123
iv_nexttoken = |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_costcategoryresassocs( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_genericarn = lo_row_1->get_resourcearn( ).
lv_costcategoryname = lo_row_1->get_costcategoryname( ).
lv_arn = lo_row_1->get_costcategoryarn( ).
ENDIF.
ENDLOOP.
lv_nextpagetoken = lo_result->get_nexttoken( ).
ENDIF.