Class HttpRetryEvent
HTTP events on which to retry.
Inheritance
System.Object
HttpRetryEvent
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public sealed class HttpRetryEvent : Enum
Syntax (vb)
Public NotInheritable Class HttpRetryEvent
Inherits
Enum
Remarks
ExampleMetadata: infused
Examples
VirtualRouter router;
VirtualNode node;
router.AddRoute("route-http2-retry", new RouteBaseProps {
RouteSpec = RouteSpec.Http2(new HttpRouteSpecOptions {
WeightedTargets = new [] { new WeightedTarget { VirtualNode = node } },
RetryPolicy = new HttpRetryPolicy {
// Retry if the connection failed
TcpRetryEvents = new [] { TcpRetryEvent.CONNECTION_ERROR },
// Retry if HTTP responds with a gateway error (502, 503, 504)
HttpRetryEvents = new [] { HttpRetryEvent.GATEWAY_ERROR },
// Retry five times
RetryAttempts = 5,
// Use a 1 second timeout per retry
RetryTimeout = Duration.Seconds(1)
}
})
});
Synopsis
Fields
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. |
value__ |
Fields
CLIENT_ERROR
HTTP status code 409.
public const HttpRetryEvent CLIENT_ERROR
Field Value
Type | Description |
---|---|
HttpRetryEvent |
GATEWAY_ERROR
HTTP status codes 502, 503, and 504.
public const HttpRetryEvent GATEWAY_ERROR
Field Value
Type | Description |
---|---|
HttpRetryEvent |
SERVER_ERROR
HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511.
public const HttpRetryEvent SERVER_ERROR
Field Value
Type | Description |
---|---|
HttpRetryEvent |
STREAM_ERROR
Retry on refused stream.
public const HttpRetryEvent STREAM_ERROR
Field Value
Type | Description |
---|---|
HttpRetryEvent |
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |