GatewayRouteBaseProps

class aws_cdk.aws_appmesh.GatewayRouteBaseProps(*, gateway_route_name=None, route_spec)

Bases: object

Basic configuration properties for a GatewayRoute.

Parameters
  • gateway_route_name (Optional[str]) – The name of the GatewayRoute. Default: - an automatically generated name

  • route_spec (GatewayRouteSpec) – What protocol the route uses.

Example:

# gateway is of type VirtualGateway
# virtual_service is of type VirtualService


gateway.add_gateway_route("gateway-route-grpc",
    route_spec=appmesh.GatewayRouteSpec.grpc(
        route_target=virtual_service,
        match=appmesh.GrpcGatewayRouteMatch(
            hostname=appmesh.GatewayRouteHostnameMatch.exactly("example.com"),
            # This disables the default rewrite to virtual service name and retain original request.
            rewrite_request_hostname=False
        )
    )
)

Attributes

gateway_route_name

The name of the GatewayRoute.

Default
  • an automatically generated name

Return type

Optional[str]

route_spec

What protocol the route uses.

Return type

GatewayRouteSpec