java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.appmesh.CfnRoutePropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:19:55.784Z") @Stability(Stable) public class CfnRoutePropsMixin extends Mixin implements software.constructs.IMixin
Creates a route that is associated with a virtual router.

You can route several different protocols and define a retry policy for a route. Traffic can be routed to one or more virtual nodes.

For more information about routes, see Routes .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.appmesh.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnRoutePropsMixin cfnRoutePropsMixin = CfnRoutePropsMixin.Builder.create(CfnRouteMixinProps.builder()
         .meshName("meshName")
         .meshOwner("meshOwner")
         .routeName("routeName")
         .spec(RouteSpecProperty.builder()
                 .grpcRoute(GrpcRouteProperty.builder()
                         .action(GrpcRouteActionProperty.builder()
                                 .weightedTargets(List.of(WeightedTargetProperty.builder()
                                         .port(123)
                                         .virtualNode("virtualNode")
                                         .weight(123)
                                         .build()))
                                 .build())
                         .match(GrpcRouteMatchProperty.builder()
                                 .metadata(List.of(GrpcRouteMetadataProperty.builder()
                                         .invert(false)
                                         .match(GrpcRouteMetadataMatchMethodProperty.builder()
                                                 .exact("exact")
                                                 .prefix("prefix")
                                                 .range(MatchRangeProperty.builder()
                                                         .end(123)
                                                         .start(123)
                                                         .build())
                                                 .regex("regex")
                                                 .suffix("suffix")
                                                 .build())
                                         .name("name")
                                         .build()))
                                 .methodName("methodName")
                                 .port(123)
                                 .serviceName("serviceName")
                                 .build())
                         .retryPolicy(GrpcRetryPolicyProperty.builder()
                                 .grpcRetryEvents(List.of("grpcRetryEvents"))
                                 .httpRetryEvents(List.of("httpRetryEvents"))
                                 .maxRetries(123)
                                 .perRetryTimeout(DurationProperty.builder()
                                         .unit("unit")
                                         .value(123)
                                         .build())
                                 .tcpRetryEvents(List.of("tcpRetryEvents"))
                                 .build())
                         .timeout(GrpcTimeoutProperty.builder()
                                 .idle(DurationProperty.builder()
                                         .unit("unit")
                                         .value(123)
                                         .build())
                                 .perRequest(DurationProperty.builder()
                                         .unit("unit")
                                         .value(123)
                                         .build())
                                 .build())
                         .build())
                 .http2Route(HttpRouteProperty.builder()
                         .action(HttpRouteActionProperty.builder()
                                 .weightedTargets(List.of(WeightedTargetProperty.builder()
                                         .port(123)
                                         .virtualNode("virtualNode")
                                         .weight(123)
                                         .build()))
                                 .build())
                         .match(HttpRouteMatchProperty.builder()
                                 .headers(List.of(HttpRouteHeaderProperty.builder()
                                         .invert(false)
                                         .match(HeaderMatchMethodProperty.builder()
                                                 .exact("exact")
                                                 .prefix("prefix")
                                                 .range(MatchRangeProperty.builder()
                                                         .end(123)
                                                         .start(123)
                                                         .build())
                                                 .regex("regex")
                                                 .suffix("suffix")
                                                 .build())
                                         .name("name")
                                         .build()))
                                 .method("method")
                                 .path(HttpPathMatchProperty.builder()
                                         .exact("exact")
                                         .regex("regex")
                                         .build())
                                 .port(123)
                                 .prefix("prefix")
                                 .queryParameters(List.of(QueryParameterProperty.builder()
                                         .match(HttpQueryParameterMatchProperty.builder()
                                                 .exact("exact")
                                                 .build())
                                         .name("name")
                                         .build()))
                                 .scheme("scheme")
                                 .build())
                         .retryPolicy(HttpRetryPolicyProperty.builder()
                                 .httpRetryEvents(List.of("httpRetryEvents"))
                                 .maxRetries(123)
                                 .perRetryTimeout(DurationProperty.builder()
                                         .unit("unit")
                                         .value(123)
                                         .build())
                                 .tcpRetryEvents(List.of("tcpRetryEvents"))
                                 .build())
                         .timeout(HttpTimeoutProperty.builder()
                                 .idle(DurationProperty.builder()
                                         .unit("unit")
                                         .value(123)
                                         .build())
                                 .perRequest(DurationProperty.builder()
                                         .unit("unit")
                                         .value(123)
                                         .build())
                                 .build())
                         .build())
                 .httpRoute(HttpRouteProperty.builder()
                         .action(HttpRouteActionProperty.builder()
                                 .weightedTargets(List.of(WeightedTargetProperty.builder()
                                         .port(123)
                                         .virtualNode("virtualNode")
                                         .weight(123)
                                         .build()))
                                 .build())
                         .match(HttpRouteMatchProperty.builder()
                                 .headers(List.of(HttpRouteHeaderProperty.builder()
                                         .invert(false)
                                         .match(HeaderMatchMethodProperty.builder()
                                                 .exact("exact")
                                                 .prefix("prefix")
                                                 .range(MatchRangeProperty.builder()
                                                         .end(123)
                                                         .start(123)
                                                         .build())
                                                 .regex("regex")
                                                 .suffix("suffix")
                                                 .build())
                                         .name("name")
                                         .build()))
                                 .method("method")
                                 .path(HttpPathMatchProperty.builder()
                                         .exact("exact")
                                         .regex("regex")
                                         .build())
                                 .port(123)
                                 .prefix("prefix")
                                 .queryParameters(List.of(QueryParameterProperty.builder()
                                         .match(HttpQueryParameterMatchProperty.builder()
                                                 .exact("exact")
                                                 .build())
                                         .name("name")
                                         .build()))
                                 .scheme("scheme")
                                 .build())
                         .retryPolicy(HttpRetryPolicyProperty.builder()
                                 .httpRetryEvents(List.of("httpRetryEvents"))
                                 .maxRetries(123)
                                 .perRetryTimeout(DurationProperty.builder()
                                         .unit("unit")
                                         .value(123)
                                         .build())
                                 .tcpRetryEvents(List.of("tcpRetryEvents"))
                                 .build())
                         .timeout(HttpTimeoutProperty.builder()
                                 .idle(DurationProperty.builder()
                                         .unit("unit")
                                         .value(123)
                                         .build())
                                 .perRequest(DurationProperty.builder()
                                         .unit("unit")
                                         .value(123)
                                         .build())
                                 .build())
                         .build())
                 .priority(123)
                 .tcpRoute(TcpRouteProperty.builder()
                         .action(TcpRouteActionProperty.builder()
                                 .weightedTargets(List.of(WeightedTargetProperty.builder()
                                         .port(123)
                                         .virtualNode("virtualNode")
                                         .weight(123)
                                         .build()))
                                 .build())
                         .match(TcpRouteMatchProperty.builder()
                                 .port(123)
                                 .build())
                         .timeout(TcpTimeoutProperty.builder()
                                 .idle(DurationProperty.builder()
                                         .unit("unit")
                                         .value(123)
                                         .build())
                                 .build())
                         .build())
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .virtualRouterName("virtualRouterName")
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnRoutePropsMixin

      protected CfnRoutePropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnRoutePropsMixin

      protected CfnRoutePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnRoutePropsMixin

      @Stability(Stable) public CfnRoutePropsMixin(@NotNull CfnRouteMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::AppMesh::Route.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnRoutePropsMixin

      @Stability(Stable) public CfnRoutePropsMixin(@NotNull CfnRouteMixinProps props)
      Create a mixin to apply properties to AWS::AppMesh::Route.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnRouteMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()