Skip to content

/AWS1/IF_RAM=>LISTSOURCEASSOCIATIONS()

About ListSourceAssociations

Lists source associations for resource shares. Source associations control which sources can be used with service principals in resource shares. This operation provides visibility into source associations for resource share owners.

You can filter the results by resource share Amazon Resource Name (ARN), source ID, source type, or association status. We recommend using pagination to ensure that the operation returns quickly and successfully.

Method Signature

METHODS /AWS1/IF_RAM~LISTSOURCEASSOCIATIONS
  IMPORTING
    !IT_RESOURCESHAREARNS TYPE /AWS1/CL_RAMRESRCSHAREARNLST_W=>TT_RESOURCESHAREARNLIST OPTIONAL
    !IV_SOURCEID TYPE /AWS1/RAMSTRING OPTIONAL
    !IV_SOURCETYPE TYPE /AWS1/RAMSTRING OPTIONAL
    !IV_ASSOCIATIONSTATUS TYPE /AWS1/RAMRESRCSHAREASSOCIATI01 OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/RAMSTRING OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/RAMMAXRESULTS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ramlistsrcassocsrsp
  RAISING
    /AWS1/CX_RAMINVALIDNEXTTOKENEX
    /AWS1/CX_RAMINVALIDPARAMETEREX
    /AWS1/CX_RAMMALFORMEDARNEX
    /AWS1/CX_RAMSERVERINTERNALEX
    /AWS1/CX_RAMSERVICEUNAVAILEX
    /AWS1/CX_RAMUNKNOWNRESOURCEEX
    /AWS1/CX_RAMCLIENTEXC
    /AWS1/CX_RAMSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

it_resourcesharearns TYPE /AWS1/CL_RAMRESRCSHAREARNLST_W=>TT_RESOURCESHAREARNLIST TT_RESOURCESHAREARNLIST

The Amazon Resource Names (ARNs) of the resource shares for which you want to retrieve source associations.

iv_sourceid TYPE /AWS1/RAMSTRING /AWS1/RAMSTRING

The identifier of the source for which you want to retrieve associations. This can be an account ID, Amazon Resource Name (ARN), organization ID, or organization path.

iv_sourcetype TYPE /AWS1/RAMSTRING /AWS1/RAMSTRING

The type of source for which you want to retrieve associations.

iv_associationstatus TYPE /AWS1/RAMRESRCSHAREASSOCIATI01 /AWS1/RAMRESRCSHAREASSOCIATI01

The status of the source associations that you want to retrieve.

iv_nexttoken TYPE /AWS1/RAMSTRING /AWS1/RAMSTRING

The pagination token that indicates the next set of results to retrieve.

iv_maxresults TYPE /AWS1/RAMMAXRESULTS /AWS1/RAMMAXRESULTS

The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.

RETURNING

oo_output TYPE REF TO /aws1/cl_ramlistsrcassocsrsp /AWS1/CL_RAMLISTSRCASSOCSRSP

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->listsourceassociations(
  it_resourcesharearns = VALUE /aws1/cl_ramresrcsharearnlst_w=>tt_resourcesharearnlist(
    ( new /aws1/cl_ramresrcsharearnlst_w( |string| ) )
  )
  iv_associationstatus = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_sourceid = |string|
  iv_sourcetype = |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_sourceassociations( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_string = lo_row_1->get_resourcesharearn( ).
      lv_string = lo_row_1->get_sourceid( ).
      lv_string = lo_row_1->get_sourcetype( ).
      lv_string = lo_row_1->get_status( ).
      lv_datetime = lo_row_1->get_lastupdatedtime( ).
      lv_datetime = lo_row_1->get_creationtime( ).
      lv_string = lo_row_1->get_statusmessage( ).
    ENDIF.
  ENDLOOP.
  lv_string = lo_result->get_nexttoken( ).
ENDIF.