HttpGatewayRouteSpecOptions

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

Bases: aws_cdk.aws_appmesh.CommonGatewayRouteSpecOptions

Properties specific for HTTP Based GatewayRoutes.

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

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

  • match (Union[HttpGatewayRouteMatch, Dict[str, Any], None]) – The criterion for determining a request match for this GatewayRoute. When path match is defined, this may optionally determine the path rewrite configuration. Default: - matches any path and automatically rewrites the path to ‘/’

ExampleMetadata

infused

Example:

# gateway: appmesh.VirtualGateway
# virtual_service: appmesh.VirtualService


gateway.add_gateway_route("gateway-route-http-2",
    route_spec=appmesh.GatewayRouteSpec.http(
        route_target=virtual_service,
        match=appmesh.HttpGatewayRouteMatch(
            # This rewrites the path from '/test' to '/rewrittenPath'.
            path=appmesh.HttpGatewayRoutePathMatch.exactly("/test", "/rewrittenPath")
        )
    )
)

Attributes

match

The criterion for determining a request match for this GatewayRoute.

When path match is defined, this may optionally determine the path rewrite configuration.

Default
  • matches any path and automatically rewrites the path to ‘/’

Return type

Optional[HttpGatewayRouteMatch]

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

Return type

Union[int, float, None]

route_target

The VirtualService this GatewayRoute directs traffic to.

Return type

IVirtualService