Skip to content

/AWS1/IF_BDO=>LISTGATEWAYRULES()

About ListGatewayRules

Lists all rules for a gateway.

Method Signature

METHODS /AWS1/IF_BDO~LISTGATEWAYRULES
  IMPORTING
    !IV_GATEWAYIDENTIFIER TYPE /AWS1/BDOGATEWAYIDENTIFIER OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/BDOGATEWAYRULEMAXRESULTS OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/BDOGATEWAYRULENEXTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdolistgwrulesrsp
  RAISING
    /AWS1/CX_BDOACCESSDENIEDEX
    /AWS1/CX_BDOINTERNALSERVEREX
    /AWS1/CX_BDORESOURCENOTFOUNDEX
    /AWS1/CX_BDOTHROTTLINGEX
    /AWS1/CX_BDOVALIDATIONEX
    /AWS1/CX_BDOCLIENTEXC
    /AWS1/CX_BDOSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_gatewayidentifier TYPE /AWS1/BDOGATEWAYIDENTIFIER /AWS1/BDOGATEWAYIDENTIFIER

The identifier of the gateway to list rules for.

Optional arguments:

iv_maxresults TYPE /AWS1/BDOGATEWAYRULEMAXRESULTS /AWS1/BDOGATEWAYRULEMAXRESULTS

The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

iv_nexttoken TYPE /AWS1/BDOGATEWAYRULENEXTTOKEN /AWS1/BDOGATEWAYRULENEXTTOKEN

The pagination token from a previous request.

RETURNING

oo_output TYPE REF TO /aws1/cl_bdolistgwrulesrsp /AWS1/CL_BDOLISTGWRULESRSP

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->listgatewayrules(
  iv_gatewayidentifier = |string|
  iv_maxresults = 123
  iv_nexttoken = |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_gatewayrules( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_gatewayruleid = lo_row_1->get_ruleid( ).
      lv_gatewayarn = lo_row_1->get_gatewayarn( ).
      lv_gatewayrulepriority = lo_row_1->get_priority( ).
      LOOP AT lo_row_1->get_conditions( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lo_matchprincipals = lo_row_3->get_matchprincipals( ).
          IF lo_matchprincipals IS NOT INITIAL.
            LOOP AT lo_matchprincipals->get_anyof( ) into lo_row_4.
              lo_row_5 = lo_row_4.
              IF lo_row_5 IS NOT INITIAL.
                lo_iamprincipal = lo_row_5->get_iamprincipal( ).
                IF lo_iamprincipal IS NOT INITIAL.
                  lv_iamprincipalarn = lo_iamprincipal->get_arn( ).
                  lv_principalmatchoperator = lo_iamprincipal->get_operator( ).
                ENDIF.
              ENDIF.
            ENDLOOP.
          ENDIF.
          lo_matchpaths = lo_row_3->get_matchpaths( ).
          IF lo_matchpaths IS NOT INITIAL.
            LOOP AT lo_matchpaths->get_anyof( ) into lo_row_6.
              lo_row_7 = lo_row_6.
              IF lo_row_7 IS NOT INITIAL.
                lv_matchpathpattern = lo_row_7->get_value( ).
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDIF.
      ENDLOOP.
      LOOP AT lo_row_1->get_actions( ) into lo_row_8.
        lo_row_9 = lo_row_8.
        IF lo_row_9 IS NOT INITIAL.
          lo_configurationbundleacti = lo_row_9->get_configurationbundle( ).
          IF lo_configurationbundleacti IS NOT INITIAL.
            lo_staticoverride = lo_configurationbundleacti->get_staticoverride( ).
            IF lo_staticoverride IS NOT INITIAL.
              lv_gatewayconfigurationbun = lo_staticoverride->get_bundlearn( ).
              lv_string = lo_staticoverride->get_bundleversion( ).
            ENDIF.
            lo_weightedoverride = lo_configurationbundleacti->get_weightedoverride( ).
            IF lo_weightedoverride IS NOT INITIAL.
              LOOP AT lo_weightedoverride->get_trafficsplit( ) into lo_row_10.
                lo_row_11 = lo_row_10.
                IF lo_row_11 IS NOT INITIAL.
                  lv_string = lo_row_11->get_name( ).
                  lv_integer = lo_row_11->get_weight( ).
                  lo_configurationbundlerefe = lo_row_11->get_configurationbundle( ).
                  IF lo_configurationbundlerefe IS NOT INITIAL.
                    lv_gatewayconfigurationbun = lo_configurationbundlerefe->get_bundlearn( ).
                    lv_string = lo_configurationbundlerefe->get_bundleversion( ).
                  ENDIF.
                  lv_string = lo_row_11->get_description( ).
                  LOOP AT lo_row_11->get_metadata( ) into ls_row_12.
                    lv_key = ls_row_12-key.
                    lo_value = ls_row_12-value.
                    IF lo_value IS NOT INITIAL.
                      lv_trafficsplitmetadataval = lo_value->get_value( ).
                    ENDIF.
                  ENDLOOP.
                ENDIF.
              ENDLOOP.
            ENDIF.
          ENDIF.
          lo_routetotargetaction = lo_row_9->get_routetotarget( ).
          IF lo_routetotargetaction IS NOT INITIAL.
            lo_staticroute = lo_routetotargetaction->get_staticroute( ).
            IF lo_staticroute IS NOT INITIAL.
              lv_targetname = lo_staticroute->get_targetname( ).
            ENDIF.
            lo_weightedroute = lo_routetotargetaction->get_weightedroute( ).
            IF lo_weightedroute IS NOT INITIAL.
              LOOP AT lo_weightedroute->get_trafficsplit( ) into lo_row_13.
                lo_row_14 = lo_row_13.
                IF lo_row_14 IS NOT INITIAL.
                  lv_string = lo_row_14->get_name( ).
                  lv_integer = lo_row_14->get_weight( ).
                  lv_targetname = lo_row_14->get_targetname( ).
                  lv_string = lo_row_14->get_description( ).
                  LOOP AT lo_row_14->get_metadata( ) into ls_row_12.
                    lv_key = ls_row_12-key.
                    lo_value = ls_row_12-value.
                    IF lo_value IS NOT INITIAL.
                      lv_trafficsplitmetadataval = lo_value->get_value( ).
                    ENDIF.
                  ENDLOOP.
                ENDIF.
              ENDLOOP.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
      lv_gatewayruledescription = lo_row_1->get_description( ).
      lv_datetimestamp = lo_row_1->get_createdat( ).
      lv_gatewayrulestatus = lo_row_1->get_status( ).
      lo_systemmanagedblock = lo_row_1->get_system( ).
      IF lo_systemmanagedblock IS NOT INITIAL.
        lv_string = lo_systemmanagedblock->get_managedby( ).
      ENDIF.
      lv_datetimestamp = lo_row_1->get_updatedat( ).
    ENDIF.
  ENDLOOP.
  lv_gatewayrulenexttoken = lo_result->get_nexttoken( ).
ENDIF.