/AWS1/IF_RAM=>GETRESOURCESHAREASSOCIATIONS()¶
About GetResourceShareAssociations¶
Retrieves the lists of resources and principals that associated for resource shares that you own.
Method Signature¶
METHODS /AWS1/IF_RAM~GETRESOURCESHAREASSOCIATIONS
IMPORTING
!IV_ASSOCIATIONTYPE TYPE /AWS1/RAMRESRCSHAREASSOCIATI00 OPTIONAL
!IT_RESOURCESHAREARNS TYPE /AWS1/CL_RAMRESRCSHAREARNLST_W=>TT_RESOURCESHAREARNLIST OPTIONAL
!IV_RESOURCEARN TYPE /AWS1/RAMSTRING OPTIONAL
!IV_PRINCIPAL 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_ramgetresrcshareass01
RAISING
/AWS1/CX_RAMINVALIDNEXTTOKENEX
/AWS1/CX_RAMINVALIDPARAMETEREX
/AWS1/CX_RAMMALFORMEDARNEX
/AWS1/CX_RAMOPNOTPERMITTEDEX
/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¶
Required arguments:¶
iv_associationtype TYPE /AWS1/RAMRESRCSHAREASSOCIATI00 /AWS1/RAMRESRCSHAREASSOCIATI00¶
Specifies whether you want to retrieve the associations that involve a specified resource or principal.
PRINCIPAL– list the principals whose associations you want to see.
RESOURCE– list the resources whose associations you want to see.
Optional arguments:¶
it_resourcesharearns TYPE /AWS1/CL_RAMRESRCSHAREARNLST_W=>TT_RESOURCESHAREARNLIST TT_RESOURCESHAREARNLIST¶
Specifies a list of Amazon Resource Names (ARNs) of the resource share whose associations you want to retrieve.
iv_resourcearn TYPE /AWS1/RAMSTRING /AWS1/RAMSTRING¶
Specifies the Amazon Resource Name (ARN) of a resource whose resource shares you want to retrieve.
You cannot specify this parameter if the association type is
PRINCIPAL.
iv_principal TYPE /AWS1/RAMSTRING /AWS1/RAMSTRING¶
Specifies the ID of the principal whose resource shares you want to retrieve. This can be an Amazon Web Services account ID, an organization ID, an organizational unit ID, or the Amazon Resource Name (ARN) of an individual IAM role or user.
You cannot specify this parameter if the association type is
RESOURCE.
iv_associationstatus TYPE /AWS1/RAMRESRCSHAREASSOCIATI01 /AWS1/RAMRESRCSHAREASSOCIATI01¶
Specifies that you want to retrieve only associations that have this status.
iv_nexttoken TYPE /AWS1/RAMSTRING /AWS1/RAMSTRING¶
Specifies that you want to receive the next page of results. Valid only if you received a
NextTokenresponse in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call'sNextTokenresponse to request the next page of results.
iv_maxresults TYPE /AWS1/RAMMAXRESULTS /AWS1/RAMMAXRESULTS¶
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the
NextTokenresponse element is returned with a value (not null). Include the specified value as theNextTokenrequest parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should checkNextTokenafter every operation to ensure that you receive all of the results.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ramgetresrcshareass01 /AWS1/CL_RAMGETRESRCSHAREASS01¶
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->getresourceshareassociations(
it_resourcesharearns = VALUE /aws1/cl_ramresrcsharearnlst_w=>tt_resourcesharearnlist(
( new /aws1/cl_ramresrcsharearnlst_w( |string| ) )
)
iv_associationstatus = |string|
iv_associationtype = |string|
iv_maxresults = 123
iv_nexttoken = |string|
iv_principal = |string|
iv_resourcearn = |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_resrcshareassociations( ) 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_resourcesharename( ).
lv_string = lo_row_1->get_associatedentity( ).
lv_resourceshareassociatio = lo_row_1->get_associationtype( ).
lv_resourceshareassociatio_1 = lo_row_1->get_status( ).
lv_string = lo_row_1->get_statusmessage( ).
lv_datetime = lo_row_1->get_creationtime( ).
lv_datetime = lo_row_1->get_lastupdatedtime( ).
lv_boolean = lo_row_1->get_external( ).
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.