/AWS1/IF_RAM=>LISTRESOURCES()¶
About ListResources¶
Lists the resources that you added to a resource share or the resources that are shared with you.
Method Signature¶
METHODS /AWS1/IF_RAM~LISTRESOURCES
IMPORTING
!IV_RESOURCEOWNER TYPE /AWS1/RAMRESOURCEOWNER OPTIONAL
!IV_PRINCIPAL TYPE /AWS1/RAMSTRING OPTIONAL
!IV_RESOURCETYPE TYPE /AWS1/RAMSTRING OPTIONAL
!IT_RESOURCEARNS TYPE /AWS1/CL_RAMRESOURCEARNLIST_W=>TT_RESOURCEARNLIST OPTIONAL
!IT_RESOURCESHAREARNS TYPE /AWS1/CL_RAMRESRCSHAREARNLST_W=>TT_RESOURCESHAREARNLIST OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/RAMSTRING OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/RAMMAXRESULTS OPTIONAL
!IV_RESOURCEREGIONSCOPE TYPE /AWS1/RAMRESRCREGIONSCOPEFILT OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ramlistresourcesrsp
RAISING
/AWS1/CX_RAMINVALIDNEXTTOKENEX
/AWS1/CX_RAMINVALIDPARAMETEREX
/AWS1/CX_RAMINVRESOURCETYPEEX
/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¶
Required arguments:¶
iv_resourceowner TYPE /AWS1/RAMRESOURCEOWNER /AWS1/RAMRESOURCEOWNER¶
Specifies that you want to list only the resource shares that match the following:
SELF– resources that your account shares with other accounts
OTHER-ACCOUNTS– resources that other accounts share with your account
Optional arguments:¶
iv_principal TYPE /AWS1/RAMSTRING /AWS1/RAMSTRING¶
Specifies that you want to list only the resource shares that are associated with the specified principal.
iv_resourcetype TYPE /AWS1/RAMSTRING /AWS1/RAMSTRING¶
Specifies that you want to list only the resource shares that include resources of the specified resource type.
For valid values, query the ListResourceTypes operation.
it_resourcearns TYPE /AWS1/CL_RAMRESOURCEARNLIST_W=>TT_RESOURCEARNLIST TT_RESOURCEARNLIST¶
Specifies that you want to list only the resource shares that include resources with the specified Amazon Resource Names (ARNs).
it_resourcesharearns TYPE /AWS1/CL_RAMRESRCSHAREARNLST_W=>TT_RESOURCESHAREARNLIST TT_RESOURCESHAREARNLIST¶
Specifies that you want to list only resources in the resource shares identified by the specified Amazon Resource Names (ARNs).
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.
iv_resourceregionscope TYPE /AWS1/RAMRESRCREGIONSCOPEFILT /AWS1/RAMRESRCREGIONSCOPEFILT¶
Specifies that you want the results to include only resources that have the specified scope.
ALL– the results include both global and regional resources or resource types.
GLOBAL– the results include only global resources or resource types.
REGIONAL– the results include only regional resources or resource types.The default value is
ALL.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ramlistresourcesrsp /AWS1/CL_RAMLISTRESOURCESRSP¶
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->listresources(
it_resourcearns = VALUE /aws1/cl_ramresourcearnlist_w=>tt_resourcearnlist(
( new /aws1/cl_ramresourcearnlist_w( |string| ) )
)
it_resourcesharearns = VALUE /aws1/cl_ramresrcsharearnlst_w=>tt_resourcesharearnlist(
( new /aws1/cl_ramresrcsharearnlst_w( |string| ) )
)
iv_maxresults = 123
iv_nexttoken = |string|
iv_principal = |string|
iv_resourceowner = |string|
iv_resourceregionscope = |string|
iv_resourcetype = |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_resources( ) 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_type( ).
lv_string = lo_row_1->get_resourcesharearn( ).
lv_string = lo_row_1->get_resourcegrouparn( ).
lv_resourcestatus = 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_resourceregionscope = lo_row_1->get_resourceregionscope( ).
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.