GrpcGatewayRouteSpecOptions

class aws_cdk.aws_appmesh.GrpcGatewayRouteSpecOptions(*, priority=None, match, route_target)

Bases: CommonGatewayRouteSpecOptions

Properties specific for a gRPC GatewayRoute.

Parameters:
  • priority (Union[int, float, None]) – The priority for the gateway route. When a Virtual Gateway has multiple gateway routes, gateway route match is performed in the order of specified value, where 0 is the highest priority, and first matched gateway route is selected. Default: - no particular priority

  • match (Union[GrpcGatewayRouteMatch, Dict[str, Any]]) – The criterion for determining a request match for this GatewayRoute.

  • route_target (IVirtualService) – The VirtualService this GatewayRoute directs traffic to.

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

match

The criterion for determining a request match for this GatewayRoute.

priority

The priority for the gateway route.

When a Virtual Gateway has multiple gateway routes, gateway route match is performed in the order of specified value, where 0 is the highest priority, and first matched gateway route is selected.

Default:
  • no particular priority

route_target

The VirtualService this GatewayRoute directs traffic to.