Skip to content
v2.273.0

HttpRouteMatch Struct ​

The criterion for determining a request match for this Route.

Example ​

ts
declare const router: appmesh.VirtualRouter;
declare const node: appmesh.VirtualNode;

router.addRoute('route-http', {
  routeSpec: appmesh.RouteSpec.http({
    weightedTargets: [
      {
        virtualNode: node,
        weight: 50,
      },
      {
        virtualNode: node,
        weight: 50,
      },
    ],
    match: {
      path: appmesh.HttpRoutePathMatch.startsWith('/path-to-app'),
    },
  }),
});

Properties ​

headersHeaderMatch[]headerstyping.List[HeaderMatch]headersList<HeaderMatch>HeadersHeaderMatch[]Headers*[]HeaderMatch= do not match on headers#
Specifies the client request headers to match on.

All specified headers must match for the route to match.

methodHttpRouteMethodmethodHttpRouteMethodmethodHttpRouteMethodMethodHttpRouteMethodMethodHttpRouteMethod= do not match on request method#
The HTTP client request method to match on.
Specifies how is the request matched based on the path part of its URL.
portnumberportint | floatportNumberPortdoublePort*float64= do not match on port#
The port to match from the request.
protocolHttpRouteProtocolprotocolHttpRouteProtocolprotocolHttpRouteProtocolProtocolHttpRouteProtocolProtocolHttpRouteProtocol= do not match on HTTP2 request pr…#
The client request protocol to match on.

Applicable only for HTTP2 routes.

default

Default: do not match on HTTP2 request protocol

queryParametersQueryParameterMatch[]query_parameterstyping.List[QueryParameterMatch]queryParametersList<QueryParameterMatch>QueryParametersQueryParameterMatch[]QueryParameters*[]QueryParameterMatch= do not match on query parameters#
The query parameters to match on.

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