RouteBaseProps
- class aws_cdk.aws_appmesh.RouteBaseProps(*, route_spec, route_name=None)
Bases:
object
Base interface properties for all Routes.
- Parameters:
route_spec (
RouteSpec
) – Protocol specific spec.route_name (
Optional
[str
]) – The name of the route. Default: - An automatically generated name
- ExampleMetadata:
infused
Example:
# router: appmesh.VirtualRouter # node: appmesh.VirtualNode router.add_route("route-http2-retry", route_spec=appmesh.RouteSpec.http2( weighted_targets=[appmesh.WeightedTarget(virtual_node=node)], retry_policy=appmesh.HttpRetryPolicy( # Retry if the connection failed tcp_retry_events=[appmesh.TcpRetryEvent.CONNECTION_ERROR], # Retry if HTTP responds with a gateway error (502, 503, 504) http_retry_events=[appmesh.HttpRetryEvent.GATEWAY_ERROR], # Retry five times retry_attempts=5, # Use a 1 second timeout per retry retry_timeout=cdk.Duration.seconds(1) ) ) )
Attributes
- route_name
The name of the route.
- Default:
An automatically generated name
- route_spec
Protocol specific spec.