Skip to content

/AWS1/IF_MPB=>UPDATELINKROUTINGRULE()

About UpdateLinkRoutingRule

Updates a routing rule for a link.

Method Signature

METHODS /AWS1/IF_MPB~UPDATELINKROUTINGRULE
  IMPORTING
    !IV_GATEWAYID TYPE /AWS1/MPBGATEWAYID OPTIONAL
    !IV_LINKID TYPE /AWS1/MPBLINKID OPTIONAL
    !IV_RULEID TYPE /AWS1/MPBRULEID OPTIONAL
    !IV_PRIORITY TYPE /AWS1/MPBRULEPRIORITY OPTIONAL
    !IO_CONDITIONS TYPE REF TO /AWS1/CL_MPBRULECONDITION OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpbupdlinkroutngrlrsp
  RAISING
    /AWS1/CX_MPBACCESSDENIEDEX
    /AWS1/CX_MPBCONFLICTEXCEPTION
    /AWS1/CX_MPBINTERNALSERVEREX
    /AWS1/CX_MPBRESOURCENOTFOUNDEX
    /AWS1/CX_MPBTHROTTLINGEX
    /AWS1/CX_MPBVALIDATIONEX
    /AWS1/CX_MPBCLIENTEXC
    /AWS1/CX_MPBSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_gatewayid TYPE /AWS1/MPBGATEWAYID /AWS1/MPBGATEWAYID

The unique identifier of the gateway.

iv_linkid TYPE /AWS1/MPBLINKID /AWS1/MPBLINKID

The unique identifier of the link.

iv_ruleid TYPE /AWS1/MPBRULEID /AWS1/MPBRULEID

The unique identifier of the routing rule.

iv_priority TYPE /AWS1/MPBRULEPRIORITY /AWS1/MPBRULEPRIORITY

The updated priority of the routing rule. Lower numbers are evaluated first. Valid values are 1 to 1000. Priority must be unique among non-deleted rules within a link.

io_conditions TYPE REF TO /AWS1/CL_MPBRULECONDITION /AWS1/CL_MPBRULECONDITION

The updated conditions for the routing rule. All specified fields must match for the rule to apply. At least one condition field must be set.

RETURNING

oo_output TYPE REF TO /aws1/cl_mpbupdlinkroutngrlrsp /AWS1/CL_MPBUPDLINKROUTNGRLRSP

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->updatelinkroutingrule(
  io_conditions = new /aws1/cl_mpbrulecondition(
    io_querystringequals = new /aws1/cl_mpbqrystrkeyvaluepair(
      iv_key = |string|
      iv_value = |string|
    )
    iv_hostheader = |string|
    iv_hostheaderwildcard = |string|
    iv_pathexact = |string|
    iv_pathprefix = |string|
    iv_querystringexists = |string|
  )
  iv_gatewayid = |string|
  iv_linkid = |string|
  iv_priority = 123
  iv_ruleid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_ruleid = lo_result->get_ruleid( ).
  lv_rulestatus = lo_result->get_status( ).
  lv_timestamp = lo_result->get_updatedat( ).
ENDIF.

Update the conditions of a routing rule

DATA(lo_result) = lo_client->updatelinkroutingrule(
  io_conditions = new /aws1/cl_mpbrulecondition(
    iv_hostheader = |api.customer.com|
    iv_pathprefix = |/openrtb/|
  )
  iv_gatewayid = |rtb-gw-12345678|
  iv_linkid = |link-87654321|
  iv_priority = 20
  iv_ruleid = |rule-abc123def456|
).