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

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    RouteSpec(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    RouteSpec(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    bind(Construct scope)
    Called when the RouteSpec type is initialized.
    static RouteSpec
    Creates a GRPC Based RouteSpec.
    static RouteSpec
    Creates an HTTP Based RouteSpec.
    static RouteSpec
    Creates an HTTP2 Based RouteSpec.
    static RouteSpec
    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

      @Stability(Stable) @NotNull public static RouteSpec grpc(@NotNull GrpcRouteSpecOptions options)
      Creates a GRPC Based RouteSpec.

      Parameters:
      options - This parameter is required.
    • http

      @Stability(Stable) @NotNull public static RouteSpec http(@NotNull HttpRouteSpecOptions options)
      Creates an HTTP Based RouteSpec.

      Parameters:
      options - This parameter is required.
    • http2

      @Stability(Stable) @NotNull public static RouteSpec http2(@NotNull HttpRouteSpecOptions options)
      Creates an HTTP2 Based RouteSpec.

      Parameters:
      options - This parameter is required.
    • tcp

      @Stability(Stable) @NotNull public static RouteSpec tcp(@NotNull TcpRouteSpecOptions options)
      Creates a TCP Based RouteSpec.

      Parameters:
      options - This parameter is required.
    • bind

      @Stability(Stable) @NotNull public abstract RouteSpecConfig bind(@NotNull Construct scope)
      Called when the RouteSpec type is initialized.

      Can be used to enforce mutual exclusivity with future properties

      Parameters:
      scope - This parameter is required.