aws-cdk-lib.aws_appmesh.GrpcGatewayRouteMatch

interface GrpcGatewayRouteMatch

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

The criterion for determining a request match for this GatewayRoute.

Example

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

gateway.addGatewayRoute('gateway-route-grpc', {
  routeSpec: appmesh.GatewayRouteSpec.grpc({
    routeTarget: virtualService,
    match: {
      hostname: appmesh.GatewayRouteHostnameMatch.endsWith('.example.com'),
    },
  }),
});

Properties

NameTypeDescription
hostname?GatewayRouteHostnameMatchCreate host name based gRPC gateway route match.
metadata?HeaderMatch[]Create metadata based gRPC gateway route match.
port?numberThe port to match from the request.
rewriteRequestHostname?booleanWhen true, rewrites the original request received at the Virtual Gateway to the destination Virtual Service name.
serviceName?stringCreate service name based gRPC gateway route match.

hostname?

Type: GatewayRouteHostnameMatch (optional, default: no matching on host name)

Create host name based gRPC gateway route match.


metadata?

Type: HeaderMatch[] (optional, default: no matching on metadata)

Create metadata based gRPC gateway route match.

All specified metadata must match for the route to match.


port?

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

The port to match from the request.


rewriteRequestHostname?

Type: boolean (optional, default: 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.


serviceName?

Type: string (optional, default: no matching on service name)

Create service name based gRPC gateway route match.