/AWS1/IF_VL=>UPDATERULE()¶
About UpdateRule¶
Updates a specified rule for the listener. You can't modify a default listener rule. To modify a default listener rule, use UpdateListener.
Method Signature¶
METHODS /AWS1/IF_VL~UPDATERULE
IMPORTING
!IV_SERVICEIDENTIFIER TYPE /AWS1/VL_SERVICEIDENTIFIER OPTIONAL
!IV_LISTENERIDENTIFIER TYPE /AWS1/VL_LISTENERIDENTIFIER OPTIONAL
!IV_RULEIDENTIFIER TYPE /AWS1/VL_RULEIDENTIFIER OPTIONAL
!IO_MATCH TYPE REF TO /AWS1/CL_VL_RULEMATCH OPTIONAL
!IV_PRIORITY TYPE /AWS1/VL_RULEPRIORITY OPTIONAL
!IO_ACTION TYPE REF TO /AWS1/CL_VL_RULEACTION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_vl_updateruleresponse
RAISING
/AWS1/CX_VL_ACCESSDENIEDEX
/AWS1/CX_VL_CONFLICTEXCEPTION
/AWS1/CX_VL_INTERNALSERVEREX
/AWS1/CX_VL_RESOURCENOTFOUNDEX
/AWS1/CX_VL_SERVICEQUOTAEXCDEX
/AWS1/CX_VL_THROTTLINGEX
/AWS1/CX_VL_VALIDATIONEX
/AWS1/CX_VL_CLIENTEXC
/AWS1/CX_VL_SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_serviceidentifier TYPE /AWS1/VL_SERVICEIDENTIFIER /AWS1/VL_SERVICEIDENTIFIER¶
The ID or ARN of the service.
iv_listeneridentifier TYPE /AWS1/VL_LISTENERIDENTIFIER /AWS1/VL_LISTENERIDENTIFIER¶
The ID or ARN of the listener.
iv_ruleidentifier TYPE /AWS1/VL_RULEIDENTIFIER /AWS1/VL_RULEIDENTIFIER¶
The ID or ARN of the rule.
Optional arguments:¶
io_match TYPE REF TO /AWS1/CL_VL_RULEMATCH /AWS1/CL_VL_RULEMATCH¶
The rule match.
iv_priority TYPE /AWS1/VL_RULEPRIORITY /AWS1/VL_RULEPRIORITY¶
The rule priority. A listener can't have multiple rules with the same priority.
io_action TYPE REF TO /AWS1/CL_VL_RULEACTION /AWS1/CL_VL_RULEACTION¶
Information about the action for the specified listener rule.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_vl_updateruleresponse /AWS1/CL_VL_UPDATERULERESPONSE¶
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->updaterule(
io_action = new /aws1/cl_vl_ruleaction(
io_fixedresponse = new /aws1/cl_vl_fixedrspaction( 123 )
io_forward = new /aws1/cl_vl_forwardaction(
it_targetgroups = VALUE /aws1/cl_vl_wttargetgroup=>tt_weightedtargetgrouplist(
(
new /aws1/cl_vl_wttargetgroup(
iv_targetgroupidentifier = |string|
iv_weight = 123
)
)
)
)
)
io_match = new /aws1/cl_vl_rulematch(
io_httpmatch = new /aws1/cl_vl_httpmatch(
io_pathmatch = new /aws1/cl_vl_pathmatch(
io_match = new /aws1/cl_vl_pathmatchtype(
iv_exact = |string|
iv_prefix = |string|
)
iv_casesensitive = ABAP_TRUE
)
it_headermatches = VALUE /aws1/cl_vl_headermatch=>tt_headermatchlist(
(
new /aws1/cl_vl_headermatch(
io_match = new /aws1/cl_vl_headermatchtype(
iv_contains = |string|
iv_exact = |string|
iv_prefix = |string|
)
iv_casesensitive = ABAP_TRUE
iv_name = |string|
)
)
)
iv_method = |string|
)
)
iv_listeneridentifier = |string|
iv_priority = 123
iv_ruleidentifier = |string|
iv_serviceidentifier = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_rulearn = lo_result->get_arn( ).
lv_ruleid = lo_result->get_id( ).
lv_rulename = lo_result->get_name( ).
lv_boolean = lo_result->get_isdefault( ).
lo_rulematch = lo_result->get_match( ).
IF lo_rulematch IS NOT INITIAL.
lo_httpmatch = lo_rulematch->get_httpmatch( ).
IF lo_httpmatch IS NOT INITIAL.
lv_httpmethod = lo_httpmatch->get_method( ).
lo_pathmatch = lo_httpmatch->get_pathmatch( ).
IF lo_pathmatch IS NOT INITIAL.
lo_pathmatchtype = lo_pathmatch->get_match( ).
IF lo_pathmatchtype IS NOT INITIAL.
lv_pathmatchexact = lo_pathmatchtype->get_exact( ).
lv_pathmatchprefix = lo_pathmatchtype->get_prefix( ).
ENDIF.
lv_boolean = lo_pathmatch->get_casesensitive( ).
ENDIF.
LOOP AT lo_httpmatch->get_headermatches( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_headermatchname = lo_row_1->get_name( ).
lo_headermatchtype = lo_row_1->get_match( ).
IF lo_headermatchtype IS NOT INITIAL.
lv_headermatchexact = lo_headermatchtype->get_exact( ).
lv_headermatchprefix = lo_headermatchtype->get_prefix( ).
lv_headermatchcontains = lo_headermatchtype->get_contains( ).
ENDIF.
lv_boolean = lo_row_1->get_casesensitive( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lv_rulepriority = lo_result->get_priority( ).
lo_ruleaction = lo_result->get_action( ).
IF lo_ruleaction IS NOT INITIAL.
lo_forwardaction = lo_ruleaction->get_forward( ).
IF lo_forwardaction IS NOT INITIAL.
LOOP AT lo_forwardaction->get_targetgroups( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_targetgroupidentifier = lo_row_3->get_targetgroupidentifier( ).
lv_targetgroupweight = lo_row_3->get_weight( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_fixedresponseaction = lo_ruleaction->get_fixedresponse( ).
IF lo_fixedresponseaction IS NOT INITIAL.
lv_httpstatuscode = lo_fixedresponseaction->get_statuscode( ).
ENDIF.
ENDIF.
ENDIF.