aws-cdk-lib.aws_appmesh.HttpRouteProtocol

enum HttpRouteProtocol

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

Supported :scheme options for HTTP2.

Example

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

router.addRoute('route-http2', {
  routeSpec: appmesh.RouteSpec.http2({
    weightedTargets: [
      {
        virtualNode: node,
      },
    ],
    match: {
      path: appmesh.HttpRoutePathMatch.exactly('/exact'),
      method: appmesh.HttpRouteMethod.POST,
      protocol: appmesh.HttpRouteProtocol.HTTPS,
      headers: [
        // All specified headers must match for the route to match.
        appmesh.HeaderMatch.valueIs('Content-Type', 'application/json'),
        appmesh.HeaderMatch.valueIsNot('Content-Type', 'application/json'),
      ],
      queryParameters: [
        // All specified query parameters must match for the route to match.
        appmesh.QueryParameterMatch.valueIs('query-field', 'value')
      ],
    },
  }),
});

Members

NameDescription
HTTPMatch HTTP requests.
HTTPSMatch HTTPS requests.

HTTP

Match HTTP requests.


HTTPS

Match HTTPS requests.