aws-cdk-lib.aws_appmesh.HttpRouteMatch

interface HttpRouteMatch

LanguageType name
.NETAmazon.CDK.AWS.AppMesh.HttpRouteMatch
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#HttpRouteMatch
Javasoftware.amazon.awscdk.services.appmesh.HttpRouteMatch
Pythonaws_cdk.aws_appmesh.HttpRouteMatch
TypeScript (source)aws-cdk-lib » aws_appmesh » HttpRouteMatch

The criterion for determining a request match for this Route.

Example

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

NameTypeDescription
headers?HeaderMatch[]Specifies the client request headers to match on.
method?HttpRouteMethodThe HTTP client request method to match on.
path?HttpRoutePathMatchSpecifies how is the request matched based on the path part of its URL.
port?numberThe port to match from the request.
protocol?HttpRouteProtocolThe client request protocol to match on.
queryParameters?QueryParameterMatch[]The query parameters to match on.

headers?

Type: HeaderMatch[] (optional, default: do not match on headers)

Specifies the client request headers to match on.

All specified headers must match for the route to match.


method?

Type: HttpRouteMethod (optional, default: do not match on request method)

The HTTP client request method to match on.


path?

Type: HttpRoutePathMatch (optional, default: matches requests with all paths)

Specifies how is the request matched based on the path part of its URL.


port?

Type: number (optional, default: do not match on port)

The port to match from the request.


protocol?

Type: HttpRouteProtocol (optional, default: do not match on HTTP2 request protocol)

The client request protocol to match on.

Applicable only for HTTP2 routes.


queryParameters?

Type: QueryParameterMatch[] (optional, default: do not match on query parameters)

The query parameters to match on.

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