GrpcGatewayRouteMatch
- class aws_cdk.aws_appmesh.GrpcGatewayRouteMatch(*, hostname=None, metadata=None, rewrite_request_hostname=None, service_name=None)
Bases:
object
The criterion for determining a request match for this GatewayRoute.
- Parameters:
hostname (
Optional
[GatewayRouteHostnameMatch
]) – Create host name based gRPC gateway route match. Default: - no matching on host namemetadata (
Optional
[Sequence
[HeaderMatch
]]) – Create metadata based gRPC gateway route match. All specified metadata must match for the route to match. Default: - no matching on metadatarewrite_request_hostname (
Optional
[bool
]) – Whentrue
, rewrites the original request received at the Virtual Gateway to the destination Virtual Service name. Whenfalse
, retains the original hostname from the request. Default: trueservice_name (
Optional
[str
]) – Create service name based gRPC gateway route match. Default: - no matching on service name
- ExampleMetadata:
infused
Example:
# gateway: appmesh.VirtualGateway # virtual_service: appmesh.VirtualService gateway.add_gateway_route("gateway-route-grpc", route_spec=appmesh.GatewayRouteSpec.grpc( route_target=virtual_service, match=appmesh.GrpcGatewayRouteMatch( hostname=appmesh.GatewayRouteHostnameMatch.ends_with(".example.com") ) ) )
Attributes
- hostname
Create host name based gRPC gateway route match.
- Default:
no matching on host name
- metadata
Create metadata based gRPC gateway route match.
All specified metadata must match for the route to match.
- Default:
no matching on metadata
- rewrite_request_hostname
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.- Default:
true
- service_name
Create service name based gRPC gateway route match.
- Default:
no matching on service name