/AWS1/IF_OAM=>LISTLINKS()¶
About ListLinks¶
Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.
To find a list of links for one monitoring account sink, use ListAttachedLinks from within the monitoring account.
Method Signature¶
METHODS /AWS1/IF_OAM~LISTLINKS
IMPORTING
!IV_MAXRESULTS TYPE /AWS1/OAMLISTLINKSMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/OAMNEXTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_oamlistlinksoutput
RAISING
/AWS1/CX_OAMINTERNALSVCFAULT
/AWS1/CX_OAMINVALIDPARAMETEREX
/AWS1/CX_OAMRESOURCENOTFOUNDEX
/AWS1/CX_OAMCLIENTEXC
/AWS1/CX_OAMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_maxresults TYPE /AWS1/OAMLISTLINKSMAXRESULTS /AWS1/OAMLISTLINKSMAXRESULTS¶
Limits the number of returned links to the specified number.
iv_nexttoken TYPE /AWS1/OAMNEXTTOKEN /AWS1/OAMNEXTTOKEN¶
The token for the next set of items to return. You received this token from a previous call.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_oamlistlinksoutput /AWS1/CL_OAMLISTLINKSOUTPUT¶
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->listlinks(
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_items( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_arn( ).
lv_string = lo_row_1->get_id( ).
lv_string = lo_row_1->get_label( ).
LOOP AT lo_row_1->get_resourcetypes( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_row_1->get_sinkarn( ).
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.