/AWS1/CL_APM=>CREATEGATEWAYROUTE()
¶
About CreateGatewayRoute¶
Creates a gateway route.
A gateway route is attached to a virtual gateway and routes traffic to an existing virtual service. If a route matches a request, it can distribute traffic to a target virtual service.
For more information about gateway routes, see Gateway routes.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_gatewayroutename
TYPE /AWS1/APMRESOURCENAME
/AWS1/APMRESOURCENAME
¶
The name to use for the gateway route.
iv_meshname
TYPE /AWS1/APMRESOURCENAME
/AWS1/APMRESOURCENAME
¶
The name of the service mesh to create the gateway route in.
iv_virtualgatewayname
TYPE /AWS1/APMRESOURCENAME
/AWS1/APMRESOURCENAME
¶
The name of the virtual gateway to associate the gateway route with. If the virtual gateway is in a shared mesh, then you must be the owner of the virtual gateway resource.
io_spec
TYPE REF TO /AWS1/CL_APMGATEWAYROUTESPEC
/AWS1/CL_APMGATEWAYROUTESPEC
¶
The gateway route specification to apply.
Optional arguments:¶
it_tags
TYPE /AWS1/CL_APMTAGREF=>TT_TAGLIST
TT_TAGLIST
¶
Optional metadata that you can apply to the gateway route to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
iv_clienttoken
TYPE /AWS1/APMSTRING
/AWS1/APMSTRING
¶
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.
iv_meshowner
TYPE /AWS1/APMACCOUNTID
/AWS1/APMACCOUNTID
¶
The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_apmcreategwrouteout
/AWS1/CL_APMCREATEGWROUTEOUT
¶
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->/aws1/if_apm~creategatewayroute(
io_spec = new /aws1/cl_apmgatewayroutespec(
io_grpcroute = new /aws1/cl_apmgrpcgatewayroute(
io_action = new /aws1/cl_apmgrpcgwrouteaction(
io_rewrite = new /aws1/cl_apmgrpcgwrouterewrite( new /aws1/cl_apmgwroutehostnamer00( |string| ) )
io_target = new /aws1/cl_apmgatewayroutetarget(
io_virtualservice = new /aws1/cl_apmgwroutevirtualsvc( |string| )
iv_port = 123
)
)
io_match = new /aws1/cl_apmgrpcgwroutematch(
io_hostname = new /aws1/cl_apmgwroutehostnamem00(
iv_exact = |string|
iv_suffix = |string|
)
it_metadata = VALUE /aws1/cl_apmgrpcgwroutemet=>tt_grpcgatewayroutemetlist(
(
new /aws1/cl_apmgrpcgwroutemet(
io_match = new /aws1/cl_apmgrpcmetmatchmethod(
io_range = new /aws1/cl_apmmatchrange(
iv_end = 123
iv_start = 123
)
iv_exact = |string|
iv_prefix = |string|
iv_regex = |string|
iv_suffix = |string|
)
iv_invert = ABAP_TRUE
iv_name = |string|
)
)
)
iv_port = 123
iv_servicename = |string|
)
)
io_http2route = new /aws1/cl_apmhttpgatewayroute(
io_action = new /aws1/cl_apmhttpgwrouteaction(
io_rewrite = new /aws1/cl_apmhttpgwrouterewrite(
io_hostname = new /aws1/cl_apmgwroutehostnamer00( |string| )
io_path = new /aws1/cl_apmhttpgwroutepathr00( |string| )
io_prefix = new /aws1/cl_apmhttpgwrouteprefi00(
iv_defaultprefix = |string|
iv_value = |string|
)
)
io_target = new /aws1/cl_apmgatewayroutetarget(
io_virtualservice = new /aws1/cl_apmgwroutevirtualsvc( |string| )
iv_port = 123
)
)
io_match = new /aws1/cl_apmhttpgwroutematch(
io_hostname = new /aws1/cl_apmgwroutehostnamem00(
iv_exact = |string|
iv_suffix = |string|
)
io_path = new /aws1/cl_apmhttppathmatch(
iv_exact = |string|
iv_regex = |string|
)
it_headers = VALUE /aws1/cl_apmhttpgwrouteheader=>tt_httpgatewayrouteheaders(
(
new /aws1/cl_apmhttpgwrouteheader(
io_match = new /aws1/cl_apmheadermatchmethod(
io_range = new /aws1/cl_apmmatchrange(
iv_end = 123
iv_start = 123
)
iv_exact = |string|
iv_prefix = |string|
iv_regex = |string|
iv_suffix = |string|
)
iv_invert = ABAP_TRUE
iv_name = |string|
)
)
)
it_queryparameters = VALUE /aws1/cl_apmhttpqueryparameter=>tt_httpqueryparameters(
(
new /aws1/cl_apmhttpqueryparameter(
io_match = new /aws1/cl_apmqueryparammatch( |string| )
iv_name = |string|
)
)
)
iv_method = |string|
iv_port = 123
iv_prefix = |string|
)
)
io_httproute = new /aws1/cl_apmhttpgatewayroute(
io_action = new /aws1/cl_apmhttpgwrouteaction(
io_rewrite = new /aws1/cl_apmhttpgwrouterewrite(
io_hostname = new /aws1/cl_apmgwroutehostnamer00( |string| )
io_path = new /aws1/cl_apmhttpgwroutepathr00( |string| )
io_prefix = new /aws1/cl_apmhttpgwrouteprefi00(
iv_defaultprefix = |string|
iv_value = |string|
)
)
io_target = new /aws1/cl_apmgatewayroutetarget(
io_virtualservice = new /aws1/cl_apmgwroutevirtualsvc( |string| )
iv_port = 123
)
)
io_match = new /aws1/cl_apmhttpgwroutematch(
io_hostname = new /aws1/cl_apmgwroutehostnamem00(
iv_exact = |string|
iv_suffix = |string|
)
io_path = new /aws1/cl_apmhttppathmatch(
iv_exact = |string|
iv_regex = |string|
)
it_headers = VALUE /aws1/cl_apmhttpgwrouteheader=>tt_httpgatewayrouteheaders(
(
new /aws1/cl_apmhttpgwrouteheader(
io_match = new /aws1/cl_apmheadermatchmethod(
io_range = new /aws1/cl_apmmatchrange(
iv_end = 123
iv_start = 123
)
iv_exact = |string|
iv_prefix = |string|
iv_regex = |string|
iv_suffix = |string|
)
iv_invert = ABAP_TRUE
iv_name = |string|
)
)
)
it_queryparameters = VALUE /aws1/cl_apmhttpqueryparameter=>tt_httpqueryparameters(
(
new /aws1/cl_apmhttpqueryparameter(
io_match = new /aws1/cl_apmqueryparammatch( |string| )
iv_name = |string|
)
)
)
iv_method = |string|
iv_port = 123
iv_prefix = |string|
)
)
iv_priority = 123
)
it_tags = VALUE /aws1/cl_apmtagref=>tt_taglist(
(
new /aws1/cl_apmtagref(
iv_key = |string|
iv_value = |string|
)
)
)
iv_clienttoken = |string|
iv_gatewayroutename = |string|
iv_meshname = |string|
iv_meshowner = |string|
iv_virtualgatewayname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_gatewayroutedata = lo_result->get_gatewayroute( ).
IF lo_gatewayroutedata IS NOT INITIAL.
lv_resourcename = lo_gatewayroutedata->get_meshname( ).
lv_resourcename = lo_gatewayroutedata->get_gatewayroutename( ).
lv_resourcename = lo_gatewayroutedata->get_virtualgatewayname( ).
lo_gatewayroutespec = lo_gatewayroutedata->get_spec( ).
IF lo_gatewayroutespec IS NOT INITIAL.
lv_gatewayroutepriority = lo_gatewayroutespec->get_priority( ).
lo_httpgatewayroute = lo_gatewayroutespec->get_httproute( ).
IF lo_httpgatewayroute IS NOT INITIAL.
lo_httpgatewayroutematch = lo_httpgatewayroute->get_match( ).
IF lo_httpgatewayroutematch IS NOT INITIAL.
lv_string = lo_httpgatewayroutematch->get_prefix( ).
lo_httppathmatch = lo_httpgatewayroutematch->get_path( ).
IF lo_httppathmatch IS NOT INITIAL.
lv_httppathexact = lo_httppathmatch->get_exact( ).
lv_httppathregex = lo_httppathmatch->get_regex( ).
ENDIF.
LOOP AT lo_httpgatewayroutematch->get_queryparameters( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_queryparametername = lo_row_1->get_name( ).
lo_queryparametermatch = lo_row_1->get_match( ).
IF lo_queryparametermatch IS NOT INITIAL.
lv_string = lo_queryparametermatch->get_exact( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_httpmethod = lo_httpgatewayroutematch->get_method( ).
lo_gatewayroutehostnamemat = lo_httpgatewayroutematch->get_hostname( ).
IF lo_gatewayroutehostnamemat IS NOT INITIAL.
lv_exacthostname = lo_gatewayroutehostnamemat->get_exact( ).
lv_suffixhostname = lo_gatewayroutehostnamemat->get_suffix( ).
ENDIF.
LOOP AT lo_httpgatewayroutematch->get_headers( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_headername = lo_row_3->get_name( ).
lv_boolean = lo_row_3->get_invert( ).
lo_headermatchmethod = lo_row_3->get_match( ).
IF lo_headermatchmethod IS NOT INITIAL.
lv_headermatch = lo_headermatchmethod->get_exact( ).
lv_headermatch = lo_headermatchmethod->get_regex( ).
lo_matchrange = lo_headermatchmethod->get_range( ).
IF lo_matchrange IS NOT INITIAL.
lv_long = lo_matchrange->get_start( ).
lv_long = lo_matchrange->get_end( ).
ENDIF.
lv_headermatch = lo_headermatchmethod->get_prefix( ).
lv_headermatch = lo_headermatchmethod->get_suffix( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_listenerport = lo_httpgatewayroutematch->get_port( ).
ENDIF.
lo_httpgatewayrouteaction = lo_httpgatewayroute->get_action( ).
IF lo_httpgatewayrouteaction IS NOT INITIAL.
lo_gatewayroutetarget = lo_httpgatewayrouteaction->get_target( ).
IF lo_gatewayroutetarget IS NOT INITIAL.
lo_gatewayroutevirtualserv = lo_gatewayroutetarget->get_virtualservice( ).
IF lo_gatewayroutevirtualserv IS NOT INITIAL.
lv_resourcename = lo_gatewayroutevirtualserv->get_virtualservicename( ).
ENDIF.
lv_listenerport = lo_gatewayroutetarget->get_port( ).
ENDIF.
lo_httpgatewayrouterewrite = lo_httpgatewayrouteaction->get_rewrite( ).
IF lo_httpgatewayrouterewrite IS NOT INITIAL.
lo_httpgatewayrouteprefixr = lo_httpgatewayrouterewrite->get_prefix( ).
IF lo_httpgatewayrouteprefixr IS NOT INITIAL.
lv_defaultgatewayrouterewr = lo_httpgatewayrouteprefixr->get_defaultprefix( ).
lv_httpgatewayrouteprefix = lo_httpgatewayrouteprefixr->get_value( ).
ENDIF.
lo_httpgatewayroutepathrew = lo_httpgatewayrouterewrite->get_path( ).
IF lo_httpgatewayroutepathrew IS NOT INITIAL.
lv_httppathexact = lo_httpgatewayroutepathrew->get_exact( ).
ENDIF.
lo_gatewayroutehostnamerew = lo_httpgatewayrouterewrite->get_hostname( ).
IF lo_gatewayroutehostnamerew IS NOT INITIAL.
lv_defaultgatewayrouterewr = lo_gatewayroutehostnamerew->get_defaulttargethostname( ).
ENDIF.
ENDIF.
ENDIF.
ENDIF.
lo_httpgatewayroute = lo_gatewayroutespec->get_http2route( ).
IF lo_httpgatewayroute IS NOT INITIAL.
lo_httpgatewayroutematch = lo_httpgatewayroute->get_match( ).
IF lo_httpgatewayroutematch IS NOT INITIAL.
lv_string = lo_httpgatewayroutematch->get_prefix( ).
lo_httppathmatch = lo_httpgatewayroutematch->get_path( ).
IF lo_httppathmatch IS NOT INITIAL.
lv_httppathexact = lo_httppathmatch->get_exact( ).
lv_httppathregex = lo_httppathmatch->get_regex( ).
ENDIF.
LOOP AT lo_httpgatewayroutematch->get_queryparameters( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_queryparametername = lo_row_1->get_name( ).
lo_queryparametermatch = lo_row_1->get_match( ).
IF lo_queryparametermatch IS NOT INITIAL.
lv_string = lo_queryparametermatch->get_exact( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_httpmethod = lo_httpgatewayroutematch->get_method( ).
lo_gatewayroutehostnamemat = lo_httpgatewayroutematch->get_hostname( ).
IF lo_gatewayroutehostnamemat IS NOT INITIAL.
lv_exacthostname = lo_gatewayroutehostnamemat->get_exact( ).
lv_suffixhostname = lo_gatewayroutehostnamemat->get_suffix( ).
ENDIF.
LOOP AT lo_httpgatewayroutematch->get_headers( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_headername = lo_row_3->get_name( ).
lv_boolean = lo_row_3->get_invert( ).
lo_headermatchmethod = lo_row_3->get_match( ).
IF lo_headermatchmethod IS NOT INITIAL.
lv_headermatch = lo_headermatchmethod->get_exact( ).
lv_headermatch = lo_headermatchmethod->get_regex( ).
lo_matchrange = lo_headermatchmethod->get_range( ).
IF lo_matchrange IS NOT INITIAL.
lv_long = lo_matchrange->get_start( ).
lv_long = lo_matchrange->get_end( ).
ENDIF.
lv_headermatch = lo_headermatchmethod->get_prefix( ).
lv_headermatch = lo_headermatchmethod->get_suffix( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_listenerport = lo_httpgatewayroutematch->get_port( ).
ENDIF.
lo_httpgatewayrouteaction = lo_httpgatewayroute->get_action( ).
IF lo_httpgatewayrouteaction IS NOT INITIAL.
lo_gatewayroutetarget = lo_httpgatewayrouteaction->get_target( ).
IF lo_gatewayroutetarget IS NOT INITIAL.
lo_gatewayroutevirtualserv = lo_gatewayroutetarget->get_virtualservice( ).
IF lo_gatewayroutevirtualserv IS NOT INITIAL.
lv_resourcename = lo_gatewayroutevirtualserv->get_virtualservicename( ).
ENDIF.
lv_listenerport = lo_gatewayroutetarget->get_port( ).
ENDIF.
lo_httpgatewayrouterewrite = lo_httpgatewayrouteaction->get_rewrite( ).
IF lo_httpgatewayrouterewrite IS NOT INITIAL.
lo_httpgatewayrouteprefixr = lo_httpgatewayrouterewrite->get_prefix( ).
IF lo_httpgatewayrouteprefixr IS NOT INITIAL.
lv_defaultgatewayrouterewr = lo_httpgatewayrouteprefixr->get_defaultprefix( ).
lv_httpgatewayrouteprefix = lo_httpgatewayrouteprefixr->get_value( ).
ENDIF.
lo_httpgatewayroutepathrew = lo_httpgatewayrouterewrite->get_path( ).
IF lo_httpgatewayroutepathrew IS NOT INITIAL.
lv_httppathexact = lo_httpgatewayroutepathrew->get_exact( ).
ENDIF.
lo_gatewayroutehostnamerew = lo_httpgatewayrouterewrite->get_hostname( ).
IF lo_gatewayroutehostnamerew IS NOT INITIAL.
lv_defaultgatewayrouterewr = lo_gatewayroutehostnamerew->get_defaulttargethostname( ).
ENDIF.
ENDIF.
ENDIF.
ENDIF.
lo_grpcgatewayroute = lo_gatewayroutespec->get_grpcroute( ).
IF lo_grpcgatewayroute IS NOT INITIAL.
lo_grpcgatewayroutematch = lo_grpcgatewayroute->get_match( ).
IF lo_grpcgatewayroutematch IS NOT INITIAL.
lv_servicename = lo_grpcgatewayroutematch->get_servicename( ).
lo_gatewayroutehostnamemat = lo_grpcgatewayroutematch->get_hostname( ).
IF lo_gatewayroutehostnamemat IS NOT INITIAL.
lv_exacthostname = lo_gatewayroutehostnamemat->get_exact( ).
lv_suffixhostname = lo_gatewayroutehostnamemat->get_suffix( ).
ENDIF.
LOOP AT lo_grpcgatewayroutematch->get_metadata( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_headername = lo_row_5->get_name( ).
lv_boolean = lo_row_5->get_invert( ).
lo_grpcmetadatamatchmethod = lo_row_5->get_match( ).
IF lo_grpcmetadatamatchmethod IS NOT INITIAL.
lv_headermatch = lo_grpcmetadatamatchmethod->get_exact( ).
lv_headermatch = lo_grpcmetadatamatchmethod->get_regex( ).
lo_matchrange = lo_grpcmetadatamatchmethod->get_range( ).
IF lo_matchrange IS NOT INITIAL.
lv_long = lo_matchrange->get_start( ).
lv_long = lo_matchrange->get_end( ).
ENDIF.
lv_headermatch = lo_grpcmetadatamatchmethod->get_prefix( ).
lv_headermatch = lo_grpcmetadatamatchmethod->get_suffix( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_listenerport = lo_grpcgatewayroutematch->get_port( ).
ENDIF.
lo_grpcgatewayrouteaction = lo_grpcgatewayroute->get_action( ).
IF lo_grpcgatewayrouteaction IS NOT INITIAL.
lo_gatewayroutetarget = lo_grpcgatewayrouteaction->get_target( ).
IF lo_gatewayroutetarget IS NOT INITIAL.
lo_gatewayroutevirtualserv = lo_gatewayroutetarget->get_virtualservice( ).
IF lo_gatewayroutevirtualserv IS NOT INITIAL.
lv_resourcename = lo_gatewayroutevirtualserv->get_virtualservicename( ).
ENDIF.
lv_listenerport = lo_gatewayroutetarget->get_port( ).
ENDIF.
lo_grpcgatewayrouterewrite = lo_grpcgatewayrouteaction->get_rewrite( ).
IF lo_grpcgatewayrouterewrite IS NOT INITIAL.
lo_gatewayroutehostnamerew = lo_grpcgatewayrouterewrite->get_hostname( ).
IF lo_gatewayroutehostnamerew IS NOT INITIAL.
lv_defaultgatewayrouterewr = lo_gatewayroutehostnamerew->get_defaulttargethostname( ).
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
lo_resourcemetadata = lo_gatewayroutedata->get_metadata( ).
IF lo_resourcemetadata IS NOT INITIAL.
lv_arn = lo_resourcemetadata->get_arn( ).
lv_long = lo_resourcemetadata->get_version( ).
lv_string = lo_resourcemetadata->get_uid( ).
lv_timestamp = lo_resourcemetadata->get_createdat( ).
lv_timestamp = lo_resourcemetadata->get_lastupdatedat( ).
lv_accountid = lo_resourcemetadata->get_meshowner( ).
lv_accountid = lo_resourcemetadata->get_resourceowner( ).
ENDIF.
lo_gatewayroutestatus = lo_gatewayroutedata->get_status( ).
IF lo_gatewayroutestatus IS NOT INITIAL.
lv_gatewayroutestatuscode = lo_gatewayroutestatus->get_status( ).
ENDIF.
ENDIF.
ENDIF.