/AWS1/IF_BDO=>GETGATEWAYRULE()¶
About GetGatewayRule¶
Retrieves detailed information about a specific gateway rule.
Method Signature¶
METHODS /AWS1/IF_BDO~GETGATEWAYRULE
IMPORTING
!IV_GATEWAYIDENTIFIER TYPE /AWS1/BDOGATEWAYIDENTIFIER OPTIONAL
!IV_RULEID TYPE /AWS1/BDOGATEWAYRULEID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdogetgatewayrulersp
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 containing the rule.
iv_ruleid TYPE /AWS1/BDOGATEWAYRULEID /AWS1/BDOGATEWAYRULEID¶
The unique identifier of the rule to retrieve.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bdogetgatewayrulersp /AWS1/CL_BDOGETGATEWAYRULERSP¶
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->getgatewayrule(
iv_gatewayidentifier = |string|
iv_ruleid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_gatewayruleid = lo_result->get_ruleid( ).
lv_gatewayarn = lo_result->get_gatewayarn( ).
lv_gatewayrulepriority = lo_result->get_priority( ).
LOOP AT lo_result->get_conditions( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lo_matchprincipals = lo_row_1->get_matchprincipals( ).
IF lo_matchprincipals IS NOT INITIAL.
LOOP AT lo_matchprincipals->get_anyof( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lo_iamprincipal = lo_row_3->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_1->get_matchpaths( ).
IF lo_matchpaths IS NOT INITIAL.
LOOP AT lo_matchpaths->get_anyof( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_matchpathpattern = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_actions( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lo_configurationbundleacti = lo_row_7->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_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_string = lo_row_9->get_name( ).
lv_integer = lo_row_9->get_weight( ).
lo_configurationbundlerefe = lo_row_9->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_9->get_description( ).
LOOP AT lo_row_9->get_metadata( ) into ls_row_10.
lv_key = ls_row_10-key.
lo_value = ls_row_10-value.
IF lo_value IS NOT INITIAL.
lv_trafficsplitmetadataval = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lo_routetotargetaction = lo_row_7->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_11.
lo_row_12 = lo_row_11.
IF lo_row_12 IS NOT INITIAL.
lv_string = lo_row_12->get_name( ).
lv_integer = lo_row_12->get_weight( ).
lv_targetname = lo_row_12->get_targetname( ).
lv_string = lo_row_12->get_description( ).
LOOP AT lo_row_12->get_metadata( ) into ls_row_10.
lv_key = ls_row_10-key.
lo_value = ls_row_10-value.
IF lo_value IS NOT INITIAL.
lv_trafficsplitmetadataval = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
lv_gatewayruledescription = lo_result->get_description( ).
lv_datetimestamp = lo_result->get_createdat( ).
lv_gatewayrulestatus = lo_result->get_status( ).
lo_systemmanagedblock = lo_result->get_system( ).
IF lo_systemmanagedblock IS NOT INITIAL.
lv_string = lo_systemmanagedblock->get_managedby( ).
ENDIF.
lv_datetimestamp = lo_result->get_updatedat( ).
ENDIF.