Class RouteSpec
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appmesh.RouteSpec
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.146Z")
@Stability(Stable)
public abstract class RouteSpec
extends software.amazon.jsii.JsiiObject
Used to generate specs with different protocols for a RouteSpec.
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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract RouteSpecConfig
Called when the RouteSpec type is initialized.static RouteSpec
grpc
(GrpcRouteSpecOptions options) Creates a GRPC Based RouteSpec.static RouteSpec
http
(HttpRouteSpecOptions options) Creates an HTTP Based RouteSpec.static RouteSpec
http2
(HttpRouteSpecOptions options) Creates an HTTP2 Based RouteSpec.static RouteSpec
tcp
(TcpRouteSpecOptions options) Creates a TCP Based RouteSpec.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
RouteSpec
protected RouteSpec(software.amazon.jsii.JsiiObjectRef objRef) -
RouteSpec
protected RouteSpec(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
RouteSpec
@Stability(Stable) protected RouteSpec()
-
-
Method Details
-
grpc
Creates a GRPC Based RouteSpec.- Parameters:
options
- This parameter is required.
-
http
Creates an HTTP Based RouteSpec.- Parameters:
options
- This parameter is required.
-
http2
Creates an HTTP2 Based RouteSpec.- Parameters:
options
- This parameter is required.
-
tcp
Creates a TCP Based RouteSpec.- Parameters:
options
- This parameter is required.
-
bind
Called when the RouteSpec type is initialized.Can be used to enforce mutual exclusivity with future properties
- Parameters:
scope
- This parameter is required.
-