Skip to content

/AWS1/CL_RGR=>GETGROUPQUERY()

About GetGroupQuery

Retrieves the resource query associated with the specified resource group. For more information about resource queries, see Create a tag-based group in Resource Groups.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:GetGroupQuery

Method Signature

IMPORTING

Optional arguments:

iv_groupname TYPE /AWS1/RGRGROUPNAME /AWS1/RGRGROUPNAME

Don't use this parameter. Use Group instead.

iv_group TYPE /AWS1/RGRGROUPSTRING /AWS1/RGRGROUPSTRING

The name or the Amazon resource name (ARN) of the resource group to query.

RETURNING

oo_output TYPE REF TO /aws1/cl_rgrgetgroupqueryout /AWS1/CL_RGRGETGROUPQUERYOUT

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_rgr~getgroupquery(
  iv_group = |string|
  iv_groupname = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_groupquery = lo_result->get_groupquery( ).
  IF lo_groupquery IS NOT INITIAL.
    lv_groupname = lo_groupquery->get_groupname( ).
    lo_resourcequery = lo_groupquery->get_resourcequery( ).
    IF lo_resourcequery IS NOT INITIAL.
      lv_querytype = lo_resourcequery->get_type( ).
      lv_query = lo_resourcequery->get_query( ).
    ENDIF.
  ENDIF.
ENDIF.