Interface HttpRouteSpecOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable,RouteSpecOptionsBase
- All Known Implementing Classes:
HttpRouteSpecOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.101Z")
@Stability(Stable)
public interface HttpRouteSpecOptions
extends software.amazon.jsii.JsiiSerializable, RouteSpecOptionsBase
Properties specific for HTTP Based Routes.
Example:
VirtualRouter router;
VirtualNode node;
router.addRoute("route-http2-retry", RouteBaseProps.builder()
.routeSpec(RouteSpec.http2(HttpRouteSpecOptions.builder()
.weightedTargets(List.of(WeightedTarget.builder().virtualNode(node).build()))
.retryPolicy(HttpRetryPolicy.builder()
// Retry if the connection failed
.tcpRetryEvents(List.of(TcpRetryEvent.CONNECTION_ERROR))
// Retry if HTTP responds with a gateway error (502, 503, 504)
.httpRetryEvents(List.of(HttpRetryEvent.GATEWAY_ERROR))
// Retry five times
.retryAttempts(5)
// Use a 1 second timeout per retry
.retryTimeout(Duration.seconds(1))
.build())
.build()))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forHttpRouteSpecOptionsstatic final classAn implementation forHttpRouteSpecOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpRouteSpecOptions.Builderbuilder()default HttpRouteMatchgetMatch()The criterion for determining a request match for this Route.default HttpRetryPolicyThe retry policy.default HttpTimeoutAn object that represents a http timeout.List of targets that traffic is routed to when a request matches the route.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.appmesh.RouteSpecOptionsBase
getPriority
-
Method Details
-
getWeightedTargets
List of targets that traffic is routed to when a request matches the route. -
getMatch
The criterion for determining a request match for this Route.Default: - matches on '/'
-
getRetryPolicy
The retry policy.Default: - no retry policy
-
getTimeout
An object that represents a http timeout.Default: - None
-
builder
- Returns:
- a
HttpRouteSpecOptions.BuilderofHttpRouteSpecOptions
-