HttpRetryEvent
- class aws_cdk.aws_appmesh.HttpRetryEvent(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
HTTP events on which to retry.
- 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=Duration.seconds(1) ) ) )
Attributes
- CLIENT_ERROR
HTTP status code 409.
- GATEWAY_ERROR
HTTP status codes 502, 503, and 504.
- SERVER_ERROR
HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511.
- STREAM_ERROR
Retry on refused stream.