Interface HttpRouteSpecOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,RouteSpecOptionsBase
- All Known Implementing Classes:
HttpRouteSpecOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-17T21:37:26.250Z")
@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
Modifier and TypeInterfaceDescriptionstatic final class
A builder forHttpRouteSpecOptions
static final class
An implementation forHttpRouteSpecOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpRouteSpecOptions.Builder
builder()
default HttpRouteMatch
getMatch()
The criterion for determining a request match for this Route.default HttpRetryPolicy
The retry policy.default HttpTimeout
An 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$toJson
Methods 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.Builder
ofHttpRouteSpecOptions
-