Skip to content
v2.274.0

HttpGatewayRouteMatch Struct ​

The criterion for determining a request match for this GatewayRoute.

Example ​

ts
declare const gateway: appmesh.VirtualGateway;
declare const virtualService: appmesh.VirtualService;

gateway.addGatewayRoute('gateway-route-http-2', {
  routeSpec: appmesh.GatewayRouteSpec.http({
    routeTarget: virtualService,
    match: {
      // This rewrites the path from '/test' to '/rewrittenPath'.
      path: appmesh.HttpGatewayRoutePathMatch.exactly('/test', '/rewrittenPath'),
    },
  }),
});

Properties ​

headersoptionalHeaderMatch[]headersoptionaltyping.List[HeaderMatch]headersoptionalList<HeaderMatch>HeadersoptionalHeaderMatch[]Headersoptional*[]HeaderMatch#
Specifies the client request headers to match on.

Default: do not match on headers

All specified headers must match for the gateway route to match.

hostnameoptionalGatewayRouteHostnameMatchhostnameoptionalGatewayRouteHostnameMatchhostnameoptionalGatewayRouteHostnameMatchHostnameoptionalGatewayRouteHostnameMatchHostnameoptionalGatewayRouteHostnameMatch#
The gateway route host name to be matched on.

Default: do not match on host name

methodoptionalHttpRouteMethodmethodoptionalHttpRouteMethodmethodoptionalHttpRouteMethodMethodoptionalHttpRouteMethodMethodoptionalHttpRouteMethod#
The method to match on.

Default: do not match on method

Specify how to match requests based on the 'path' part of their URL.

Default: matches requests with any path

portoptionalnumberportoptionalint | floatportoptionalNumberPortoptionaldoublePortoptional*float64#
The port number to match on.

Default: no default port

queryParametersoptionalQueryParameterMatch[]query_parametersoptionaltyping.List[QueryParameterMatch]queryParametersoptionalList<QueryParameterMatch>QueryParametersoptionalQueryParameterMatch[]QueryParametersoptional*[]QueryParameterMatch#
The query parameters to match on.

Default: do not match on query parameters

All specified query parameters must match for the route to match.

rewriteRequestHostnameoptionalbooleanrewrite_request_hostnameoptionalboolrewriteRequestHostnameoptionalBooleanRewriteRequestHostnameoptionalboolRewriteRequestHostnameoptional*bool= true#
When `true`, rewrites the original request received at the Virtual Gateway to the destination Virtual Service name.

When false, retains the original hostname from the request.