interface GrpcRouteMatch
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppMesh.GrpcRouteMatch |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#GrpcRouteMatch |
![]() | software.amazon.awscdk.services.appmesh.GrpcRouteMatch |
![]() | aws_cdk.aws_appmesh.GrpcRouteMatch |
![]() | aws-cdk-lib » aws_appmesh » GrpcRouteMatch |
The criterion for determining a request match for this Route.
At least one match type must be selected.
Example
declare const router: appmesh.VirtualRouter;
declare const node: appmesh.VirtualNode;
router.addRoute('route-grpc-retry', {
routeSpec: appmesh.RouteSpec.grpc({
weightedTargets: [{ virtualNode: node }],
match: {
// When method name is specified, service name must be also specified.
methodName: 'methodname',
serviceName: 'servicename',
metadata: [
// All specified metadata must match for the route to match.
appmesh.HeaderMatch.valueStartsWith('Content-Type', 'application/'),
appmesh.HeaderMatch.valueDoesNotStartWith('Content-Type', 'text/'),
],
},
}),
});
Properties
Name | Type | Description |
---|---|---|
metadata? | Header [] | Create metadata based gRPC route match. |
method | string | The method name to match from the request. |
port? | number | The port to match from the request. |
service | string | Create service name based gRPC route match. |
metadata?
Type:
Header
[]
(optional, default: do not match on metadata)
Create metadata based gRPC route match.
All specified metadata must match for the route to match.
methodName?
Type:
string
(optional, default: do not match on method name)
The method name to match from the request.
If the method name is specified, service name must be also provided.
port?
Type:
number
(optional, default: do not match on port)
The port to match from the request.
serviceName?
Type:
string
(optional, default: do not match on service name)
Create service name based gRPC route match.