Interface IHttpRouteSpecOptions
Properties specific for HTTP Based Routes.
Inherited Members
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IHttpRouteSpecOptions : IRouteSpecOptionsBase
Syntax (vb)
Public Interface IHttpRouteSpecOptions
Inherits IRouteSpecOptionsBase
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
Properties
Match | The criterion for determining a request match for this Route. |
RetryPolicy | The retry policy. |
Timeout | An object that represents a http timeout. |
WeightedTargets | List of targets that traffic is routed to when a request matches the route. |
Properties
Match
The criterion for determining a request match for this Route.
virtual IHttpRouteMatch Match { get; }
Property Value
Remarks
Default: - matches on '/'
RetryPolicy
The retry policy.
virtual IHttpRetryPolicy RetryPolicy { get; }
Property Value
Remarks
Default: - no retry policy
Timeout
An object that represents a http timeout.
virtual IHttpTimeout Timeout { get; }
Property Value
Remarks
Default: - None
WeightedTargets
List of targets that traffic is routed to when a request matches the route.
IWeightedTarget[] WeightedTargets { get; }
Property Value