/AWS1/IF_MPB=>CREATELINKROUTINGRULE()¶
About CreateLinkRoutingRule¶
Creates a routing rule for a link.
Routing rules use priority-based evaluation where lower priority numbers are evaluated first. Each rule specifies conditions that must all match for the rule to apply.
Method Signature¶
METHODS /AWS1/IF_MPB~CREATELINKROUTINGRULE
IMPORTING
!IV_CLIENTTOKEN TYPE /AWS1/MPBSTRING OPTIONAL
!IV_GATEWAYID TYPE /AWS1/MPBGATEWAYID OPTIONAL
!IV_LINKID TYPE /AWS1/MPBLINKID OPTIONAL
!IV_PRIORITY TYPE /AWS1/MPBRULEPRIORITY OPTIONAL
!IO_CONDITIONS TYPE REF TO /AWS1/CL_MPBRULECONDITION OPTIONAL
!IT_TAGS TYPE /AWS1/CL_MPBTAGSMAP_W=>TT_TAGSMAP OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpbcrelinkroutngrlrsp
RAISING
/AWS1/CX_MPBACCESSDENIEDEX
/AWS1/CX_MPBCONFLICTEXCEPTION
/AWS1/CX_MPBINTERNALSERVEREX
/AWS1/CX_MPBRESOURCENOTFOUNDEX
/AWS1/CX_MPBSERVICEQUOTAEXCDEX
/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_clienttoken TYPE /AWS1/MPBSTRING /AWS1/MPBSTRING¶
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value.
If you don't provide this value, then Amazon Web Services generates a random one for you.
If you retry the operation with the same
ClientToken, but with different parameters, the retry fails with anIdempotentParameterMismatcherror.
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_priority TYPE /AWS1/MPBRULEPRIORITY /AWS1/MPBRULEPRIORITY¶
The 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 conditions for the routing rule. All specified fields must match for the rule to apply. At least one condition field must be set.
Optional arguments:¶
it_tags TYPE /AWS1/CL_MPBTAGSMAP_W=>TT_TAGSMAP TT_TAGSMAP¶
A map of the key-value pairs of the tag or tags to assign to the resource.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mpbcrelinkroutngrlrsp /AWS1/CL_MPBCRELINKROUTNGRLRSP¶
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->createlinkroutingrule(
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|
)
it_tags = VALUE /aws1/cl_mpbtagsmap_w=>tt_tagsmap(
(
VALUE /aws1/cl_mpbtagsmap_w=>ts_tagsmap_maprow(
value = new /aws1/cl_mpbtagsmap_w( |string| )
key = |string|
)
)
)
iv_clienttoken = |string|
iv_gatewayid = |string|
iv_linkid = |string|
iv_priority = 123
).
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_createdat( ).
ENDIF.
Create a link routing rule¶
Create a routing rule with host header and path prefix conditions
DATA(lo_result) = lo_client->createlinkroutingrule(
io_conditions = new /aws1/cl_mpbrulecondition(
iv_hostheader = |api.customer.com|
iv_pathprefix = |/openrtb/|
)
iv_clienttoken = |550e8400-e29b-41d4-a716-446655440000|
iv_gatewayid = |rtb-gw-12345678|
iv_linkid = |link-87654321|
iv_priority = 10
).