Skip to content

/AWS1/CL_RAM=>LISTRESOURCETYPES()

About ListResourceTypes

Lists the resource types that can be shared by RAM.

Method Signature

IMPORTING

Optional arguments:

iv_nexttoken TYPE /AWS1/RAMSTRING /AWS1/RAMSTRING

Specifies that you want to receive the next page of results. Valid only if you received a NextToken response 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's NextToken response 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 NextToken response element is returned with a value (not null). Include the specified value as the NextToken request 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 check NextToken after 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_ramlistresrctypesrsp /AWS1/CL_RAMLISTRESRCTYPESRSP

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->/aws1/if_ram~listresourcetypes(
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_resourceregionscope = |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_resourcetypes( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_string = lo_row_1->get_resourcetype( ).
      lv_string = lo_row_1->get_servicename( ).
      lv_resourceregionscope = lo_row_1->get_resourceregionscope( ).
    ENDIF.
  ENDLOOP.
  lv_string = lo_result->get_nexttoken( ).
ENDIF.