Skip to content
v2.278.0

CfnRouteProps Struct ​

Properties for defining a CfnRoute.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const cfnRouteProps: appmesh.CfnRouteProps = {
  meshName: 'meshName',
  spec: {
    grpcRoute: {
      action: {
        weightedTargets: [{
          virtualNode: 'virtualNode',
          weight: 123,

          // the properties below are optional
          port: 123,
        }],
      },
      match: {
        metadata: [{
          name: 'name',

          // the properties below are optional
          invert: false,
          match: {
            exact: 'exact',
            prefix: 'prefix',
            range: {
              end: 123,
              start: 123,
            },
            regex: 'regex',
            suffix: 'suffix',
          },
        }],
        methodName: 'methodName',
        port: 123,
        serviceName: 'serviceName',
      },

      // the properties below are optional
      retryPolicy: {
        maxRetries: 123,
        perRetryTimeout: {
          unit: 'unit',
          value: 123,
        },

        // the properties below are optional
        grpcRetryEvents: ['grpcRetryEvents'],
        httpRetryEvents: ['httpRetryEvents'],
        tcpRetryEvents: ['tcpRetryEvents'],
      },
      timeout: {
        idle: {
          unit: 'unit',
          value: 123,
        },
        perRequest: {
          unit: 'unit',
          value: 123,
        },
      },
    },
    http2Route: {
      action: {
        weightedTargets: [{
          virtualNode: 'virtualNode',
          weight: 123,

          // the properties below are optional
          port: 123,
        }],
      },
      match: {
        headers: [{
          name: 'name',

          // the properties below are optional
          invert: false,
          match: {
            exact: 'exact',
            prefix: 'prefix',
            range: {
              end: 123,
              start: 123,
            },
            regex: 'regex',
            suffix: 'suffix',
          },
        }],
        method: 'method',
        path: {
          exact: 'exact',
          regex: 'regex',
        },
        port: 123,
        prefix: 'prefix',
        queryParameters: [{
          name: 'name',

          // the properties below are optional
          match: {
            exact: 'exact',
          },
        }],
        scheme: 'scheme',
      },

      // the properties below are optional
      retryPolicy: {
        maxRetries: 123,
        perRetryTimeout: {
          unit: 'unit',
          value: 123,
        },

        // the properties below are optional
        httpRetryEvents: ['httpRetryEvents'],
        tcpRetryEvents: ['tcpRetryEvents'],
      },
      timeout: {
        idle: {
          unit: 'unit',
          value: 123,
        },
        perRequest: {
          unit: 'unit',
          value: 123,
        },
      },
    },
    httpRoute: {
      action: {
        weightedTargets: [{
          virtualNode: 'virtualNode',
          weight: 123,

          // the properties below are optional
          port: 123,
        }],
      },
      match: {
        headers: [{
          name: 'name',

          // the properties below are optional
          invert: false,
          match: {
            exact: 'exact',
            prefix: 'prefix',
            range: {
              end: 123,
              start: 123,
            },
            regex: 'regex',
            suffix: 'suffix',
          },
        }],
        method: 'method',
        path: {
          exact: 'exact',
          regex: 'regex',
        },
        port: 123,
        prefix: 'prefix',
        queryParameters: [{
          name: 'name',

          // the properties below are optional
          match: {
            exact: 'exact',
          },
        }],
        scheme: 'scheme',
      },

      // the properties below are optional
      retryPolicy: {
        maxRetries: 123,
        perRetryTimeout: {
          unit: 'unit',
          value: 123,
        },

        // the properties below are optional
        httpRetryEvents: ['httpRetryEvents'],
        tcpRetryEvents: ['tcpRetryEvents'],
      },
      timeout: {
        idle: {
          unit: 'unit',
          value: 123,
        },
        perRequest: {
          unit: 'unit',
          value: 123,
        },
      },
    },
    priority: 123,
    tcpRoute: {
      action: {
        weightedTargets: [{
          virtualNode: 'virtualNode',
          weight: 123,

          // the properties below are optional
          port: 123,
        }],
      },

      // the properties below are optional
      match: {
        port: 123,
      },
      timeout: {
        idle: {
          unit: 'unit',
          value: 123,
        },
      },
    },
  },
  virtualRouterName: 'virtualRouterName',

  // the properties below are optional
  meshOwner: 'meshOwner',
  routeName: 'routeName',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appmesh as appmesh

cfn_route_props = appmesh.CfnRouteProps(
    mesh_name="meshName",
    spec=appmesh.CfnRoute.RouteSpecProperty(
        grpc_route=appmesh.CfnRoute.GrpcRouteProperty(
            action=appmesh.CfnRoute.GrpcRouteActionProperty(
                weighted_targets=[appmesh.CfnRoute.WeightedTargetProperty(
                    virtual_node="virtualNode",
                    weight=123,

                    # the properties below are optional
                    port=123
                )]
            ),
            match=appmesh.CfnRoute.GrpcRouteMatchProperty(
                metadata=[appmesh.CfnRoute.GrpcRouteMetadataProperty(
                    name="name",

                    # the properties below are optional
                    invert=False,
                    match=appmesh.CfnRoute.GrpcRouteMetadataMatchMethodProperty(
                        exact="exact",
                        prefix="prefix",
                        range=appmesh.CfnRoute.MatchRangeProperty(
                            end=123,
                            start=123
                        ),
                        regex="regex",
                        suffix="suffix"
                    )
                )],
                method_name="methodName",
                port=123,
                service_name="serviceName"
            ),

            # the properties below are optional
            retry_policy=appmesh.CfnRoute.GrpcRetryPolicyProperty(
                max_retries=123,
                per_retry_timeout=appmesh.CfnRoute.DurationProperty(
                    unit="unit",
                    value=123
                ),

                # the properties below are optional
                grpc_retry_events=["grpcRetryEvents"],
                http_retry_events=["httpRetryEvents"],
                tcp_retry_events=["tcpRetryEvents"]
            ),
            timeout=appmesh.CfnRoute.GrpcTimeoutProperty(
                idle=appmesh.CfnRoute.DurationProperty(
                    unit="unit",
                    value=123
                ),
                per_request=appmesh.CfnRoute.DurationProperty(
                    unit="unit",
                    value=123
                )
            )
        ),
        http2_route=appmesh.CfnRoute.HttpRouteProperty(
            action=appmesh.CfnRoute.HttpRouteActionProperty(
                weighted_targets=[appmesh.CfnRoute.WeightedTargetProperty(
                    virtual_node="virtualNode",
                    weight=123,

                    # the properties below are optional
                    port=123
                )]
            ),
            match=appmesh.CfnRoute.HttpRouteMatchProperty(
                headers=[appmesh.CfnRoute.HttpRouteHeaderProperty(
                    name="name",

                    # the properties below are optional
                    invert=False,
                    match=appmesh.CfnRoute.HeaderMatchMethodProperty(
                        exact="exact",
                        prefix="prefix",
                        range=appmesh.CfnRoute.MatchRangeProperty(
                            end=123,
                            start=123
                        ),
                        regex="regex",
                        suffix="suffix"
                    )
                )],
                method="method",
                path=appmesh.CfnRoute.HttpPathMatchProperty(
                    exact="exact",
                    regex="regex"
                ),
                port=123,
                prefix="prefix",
                query_parameters=[appmesh.CfnRoute.QueryParameterProperty(
                    name="name",

                    # the properties below are optional
                    match=appmesh.CfnRoute.HttpQueryParameterMatchProperty(
                        exact="exact"
                    )
                )],
                scheme="scheme"
            ),

            # the properties below are optional
            retry_policy=appmesh.CfnRoute.HttpRetryPolicyProperty(
                max_retries=123,
                per_retry_timeout=appmesh.CfnRoute.DurationProperty(
                    unit="unit",
                    value=123
                ),

                # the properties below are optional
                http_retry_events=["httpRetryEvents"],
                tcp_retry_events=["tcpRetryEvents"]
            ),
            timeout=appmesh.CfnRoute.HttpTimeoutProperty(
                idle=appmesh.CfnRoute.DurationProperty(
                    unit="unit",
                    value=123
                ),
                per_request=appmesh.CfnRoute.DurationProperty(
                    unit="unit",
                    value=123
                )
            )
        ),
        http_route=appmesh.CfnRoute.HttpRouteProperty(
            action=appmesh.CfnRoute.HttpRouteActionProperty(
                weighted_targets=[appmesh.CfnRoute.WeightedTargetProperty(
                    virtual_node="virtualNode",
                    weight=123,

                    # the properties below are optional
                    port=123
                )]
            ),
            match=appmesh.CfnRoute.HttpRouteMatchProperty(
                headers=[appmesh.CfnRoute.HttpRouteHeaderProperty(
                    name="name",

                    # the properties below are optional
                    invert=False,
                    match=appmesh.CfnRoute.HeaderMatchMethodProperty(
                        exact="exact",
                        prefix="prefix",
                        range=appmesh.CfnRoute.MatchRangeProperty(
                            end=123,
                            start=123
                        ),
                        regex="regex",
                        suffix="suffix"
                    )
                )],
                method="method",
                path=appmesh.CfnRoute.HttpPathMatchProperty(
                    exact="exact",
                    regex="regex"
                ),
                port=123,
                prefix="prefix",
                query_parameters=[appmesh.CfnRoute.QueryParameterProperty(
                    name="name",

                    # the properties below are optional
                    match=appmesh.CfnRoute.HttpQueryParameterMatchProperty(
                        exact="exact"
                    )
                )],
                scheme="scheme"
            ),

            # the properties below are optional
            retry_policy=appmesh.CfnRoute.HttpRetryPolicyProperty(
                max_retries=123,
                per_retry_timeout=appmesh.CfnRoute.DurationProperty(
                    unit="unit",
                    value=123
                ),

                # the properties below are optional
                http_retry_events=["httpRetryEvents"],
                tcp_retry_events=["tcpRetryEvents"]
            ),
            timeout=appmesh.CfnRoute.HttpTimeoutProperty(
                idle=appmesh.CfnRoute.DurationProperty(
                    unit="unit",
                    value=123
                ),
                per_request=appmesh.CfnRoute.DurationProperty(
                    unit="unit",
                    value=123
                )
            )
        ),
        priority=123,
        tcp_route=appmesh.CfnRoute.TcpRouteProperty(
            action=appmesh.CfnRoute.TcpRouteActionProperty(
                weighted_targets=[appmesh.CfnRoute.WeightedTargetProperty(
                    virtual_node="virtualNode",
                    weight=123,

                    # the properties below are optional
                    port=123
                )]
            ),

            # the properties below are optional
            match=appmesh.CfnRoute.TcpRouteMatchProperty(
                port=123
            ),
            timeout=appmesh.CfnRoute.TcpTimeoutProperty(
                idle=appmesh.CfnRoute.DurationProperty(
                    unit="unit",
                    value=123
                )
            )
        )
    ),
    virtual_router_name="virtualRouterName",

    # the properties below are optional
    mesh_owner="meshOwner",
    route_name="routeName",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appmesh.*;

CfnRouteProps cfnRouteProps = CfnRouteProps.builder()
        .meshName("meshName")
        .spec(RouteSpecProperty.builder()
                .grpcRoute(GrpcRouteProperty.builder()
                        .action(GrpcRouteActionProperty.builder()
                                .weightedTargets(List.of(WeightedTargetProperty.builder()
                                        .virtualNode("virtualNode")
                                        .weight(123)

                                        // the properties below are optional
                                        .port(123)
                                        .build()))
                                .build())
                        .match(GrpcRouteMatchProperty.builder()
                                .metadata(List.of(GrpcRouteMetadataProperty.builder()
                                        .name("name")

                                        // the properties below are optional
                                        .invert(false)
                                        .match(GrpcRouteMetadataMatchMethodProperty.builder()
                                                .exact("exact")
                                                .prefix("prefix")
                                                .range(MatchRangeProperty.builder()
                                                        .end(123)
                                                        .start(123)
                                                        .build())
                                                .regex("regex")
                                                .suffix("suffix")
                                                .build())
                                        .build()))
                                .methodName("methodName")
                                .port(123)
                                .serviceName("serviceName")
                                .build())

                        // the properties below are optional
                        .retryPolicy(GrpcRetryPolicyProperty.builder()
                                .maxRetries(123)
                                .perRetryTimeout(DurationProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())

                                // the properties below are optional
                                .grpcRetryEvents(List.of("grpcRetryEvents"))
                                .httpRetryEvents(List.of("httpRetryEvents"))
                                .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()
                                        .virtualNode("virtualNode")
                                        .weight(123)

                                        // the properties below are optional
                                        .port(123)
                                        .build()))
                                .build())
                        .match(HttpRouteMatchProperty.builder()
                                .headers(List.of(HttpRouteHeaderProperty.builder()
                                        .name("name")

                                        // the properties below are optional
                                        .invert(false)
                                        .match(HeaderMatchMethodProperty.builder()
                                                .exact("exact")
                                                .prefix("prefix")
                                                .range(MatchRangeProperty.builder()
                                                        .end(123)
                                                        .start(123)
                                                        .build())
                                                .regex("regex")
                                                .suffix("suffix")
                                                .build())
                                        .build()))
                                .method("method")
                                .path(HttpPathMatchProperty.builder()
                                        .exact("exact")
                                        .regex("regex")
                                        .build())
                                .port(123)
                                .prefix("prefix")
                                .queryParameters(List.of(QueryParameterProperty.builder()
                                        .name("name")

                                        // the properties below are optional
                                        .match(HttpQueryParameterMatchProperty.builder()
                                                .exact("exact")
                                                .build())
                                        .build()))
                                .scheme("scheme")
                                .build())

                        // the properties below are optional
                        .retryPolicy(HttpRetryPolicyProperty.builder()
                                .maxRetries(123)
                                .perRetryTimeout(DurationProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())

                                // the properties below are optional
                                .httpRetryEvents(List.of("httpRetryEvents"))
                                .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()
                                        .virtualNode("virtualNode")
                                        .weight(123)

                                        // the properties below are optional
                                        .port(123)
                                        .build()))
                                .build())
                        .match(HttpRouteMatchProperty.builder()
                                .headers(List.of(HttpRouteHeaderProperty.builder()
                                        .name("name")

                                        // the properties below are optional
                                        .invert(false)
                                        .match(HeaderMatchMethodProperty.builder()
                                                .exact("exact")
                                                .prefix("prefix")
                                                .range(MatchRangeProperty.builder()
                                                        .end(123)
                                                        .start(123)
                                                        .build())
                                                .regex("regex")
                                                .suffix("suffix")
                                                .build())
                                        .build()))
                                .method("method")
                                .path(HttpPathMatchProperty.builder()
                                        .exact("exact")
                                        .regex("regex")
                                        .build())
                                .port(123)
                                .prefix("prefix")
                                .queryParameters(List.of(QueryParameterProperty.builder()
                                        .name("name")

                                        // the properties below are optional
                                        .match(HttpQueryParameterMatchProperty.builder()
                                                .exact("exact")
                                                .build())
                                        .build()))
                                .scheme("scheme")
                                .build())

                        // the properties below are optional
                        .retryPolicy(HttpRetryPolicyProperty.builder()
                                .maxRetries(123)
                                .perRetryTimeout(DurationProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())

                                // the properties below are optional
                                .httpRetryEvents(List.of("httpRetryEvents"))
                                .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()
                                        .virtualNode("virtualNode")
                                        .weight(123)

                                        // the properties below are optional
                                        .port(123)
                                        .build()))
                                .build())

                        // the properties below are optional
                        .match(TcpRouteMatchProperty.builder()
                                .port(123)
                                .build())
                        .timeout(TcpTimeoutProperty.builder()
                                .idle(DurationProperty.builder()
                                        .unit("unit")
                                        .value(123)
                                        .build())
                                .build())
                        .build())
                .build())
        .virtualRouterName("virtualRouterName")

        // the properties below are optional
        .meshOwner("meshOwner")
        .routeName("routeName")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppMesh;

var cfnRouteProps = new CfnRouteProps {
    MeshName = "meshName",
    Spec = new RouteSpecProperty {
        GrpcRoute = new GrpcRouteProperty {
            Action = new GrpcRouteActionProperty {
                WeightedTargets = new [] { new WeightedTargetProperty {
                    VirtualNode = "virtualNode",
                    Weight = 123,

                    // the properties below are optional
                    Port = 123
                } }
            },
            Match = new GrpcRouteMatchProperty {
                Metadata = new [] { new GrpcRouteMetadataProperty {
                    Name = "name",

                    // the properties below are optional
                    Invert = false,
                    Match = new GrpcRouteMetadataMatchMethodProperty {
                        Exact = "exact",
                        Prefix = "prefix",
                        Range = new MatchRangeProperty {
                            End = 123,
                            Start = 123
                        },
                        Regex = "regex",
                        Suffix = "suffix"
                    }
                } },
                MethodName = "methodName",
                Port = 123,
                ServiceName = "serviceName"
            },

            // the properties below are optional
            RetryPolicy = new GrpcRetryPolicyProperty {
                MaxRetries = 123,
                PerRetryTimeout = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                },

                // the properties below are optional
                GrpcRetryEvents = new [] { "grpcRetryEvents" },
                HttpRetryEvents = new [] { "httpRetryEvents" },
                TcpRetryEvents = new [] { "tcpRetryEvents" }
            },
            Timeout = new GrpcTimeoutProperty {
                Idle = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                },
                PerRequest = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                }
            }
        },
        Http2Route = new HttpRouteProperty {
            Action = new HttpRouteActionProperty {
                WeightedTargets = new [] { new WeightedTargetProperty {
                    VirtualNode = "virtualNode",
                    Weight = 123,

                    // the properties below are optional
                    Port = 123
                } }
            },
            Match = new HttpRouteMatchProperty {
                Headers = new [] { new HttpRouteHeaderProperty {
                    Name = "name",

                    // the properties below are optional
                    Invert = false,
                    Match = new HeaderMatchMethodProperty {
                        Exact = "exact",
                        Prefix = "prefix",
                        Range = new MatchRangeProperty {
                            End = 123,
                            Start = 123
                        },
                        Regex = "regex",
                        Suffix = "suffix"
                    }
                } },
                Method = "method",
                Path = new HttpPathMatchProperty {
                    Exact = "exact",
                    Regex = "regex"
                },
                Port = 123,
                Prefix = "prefix",
                QueryParameters = new [] { new QueryParameterProperty {
                    Name = "name",

                    // the properties below are optional
                    Match = new HttpQueryParameterMatchProperty {
                        Exact = "exact"
                    }
                } },
                Scheme = "scheme"
            },

            // the properties below are optional
            RetryPolicy = new HttpRetryPolicyProperty {
                MaxRetries = 123,
                PerRetryTimeout = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                },

                // the properties below are optional
                HttpRetryEvents = new [] { "httpRetryEvents" },
                TcpRetryEvents = new [] { "tcpRetryEvents" }
            },
            Timeout = new HttpTimeoutProperty {
                Idle = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                },
                PerRequest = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                }
            }
        },
        HttpRoute = new HttpRouteProperty {
            Action = new HttpRouteActionProperty {
                WeightedTargets = new [] { new WeightedTargetProperty {
                    VirtualNode = "virtualNode",
                    Weight = 123,

                    // the properties below are optional
                    Port = 123
                } }
            },
            Match = new HttpRouteMatchProperty {
                Headers = new [] { new HttpRouteHeaderProperty {
                    Name = "name",

                    // the properties below are optional
                    Invert = false,
                    Match = new HeaderMatchMethodProperty {
                        Exact = "exact",
                        Prefix = "prefix",
                        Range = new MatchRangeProperty {
                            End = 123,
                            Start = 123
                        },
                        Regex = "regex",
                        Suffix = "suffix"
                    }
                } },
                Method = "method",
                Path = new HttpPathMatchProperty {
                    Exact = "exact",
                    Regex = "regex"
                },
                Port = 123,
                Prefix = "prefix",
                QueryParameters = new [] { new QueryParameterProperty {
                    Name = "name",

                    // the properties below are optional
                    Match = new HttpQueryParameterMatchProperty {
                        Exact = "exact"
                    }
                } },
                Scheme = "scheme"
            },

            // the properties below are optional
            RetryPolicy = new HttpRetryPolicyProperty {
                MaxRetries = 123,
                PerRetryTimeout = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                },

                // the properties below are optional
                HttpRetryEvents = new [] { "httpRetryEvents" },
                TcpRetryEvents = new [] { "tcpRetryEvents" }
            },
            Timeout = new HttpTimeoutProperty {
                Idle = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                },
                PerRequest = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                }
            }
        },
        Priority = 123,
        TcpRoute = new TcpRouteProperty {
            Action = new TcpRouteActionProperty {
                WeightedTargets = new [] { new WeightedTargetProperty {
                    VirtualNode = "virtualNode",
                    Weight = 123,

                    // the properties below are optional
                    Port = 123
                } }
            },

            // the properties below are optional
            Match = new TcpRouteMatchProperty {
                Port = 123
            },
            Timeout = new TcpTimeoutProperty {
                Idle = new DurationProperty {
                    Unit = "unit",
                    Value = 123
                }
            }
        }
    },
    VirtualRouterName = "virtualRouterName",

    // the properties below are optional
    MeshOwner = "meshOwner",
    RouteName = "routeName",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnRouteProps := &CfnRouteProps{
	MeshName: jsii.String("meshName"),
	Spec: &RouteSpecProperty{
		GrpcRoute: &GrpcRouteProperty{
			Action: &GrpcRouteActionProperty{
				WeightedTargets: []interface{}{
					&WeightedTargetProperty{
						VirtualNode: jsii.String("virtualNode"),
						Weight: jsii.Number(123),

						// the properties below are optional
						Port: jsii.Number(123),
					},
				},
			},
			Match: &GrpcRouteMatchProperty{
				Metadata: []interface{}{
					&GrpcRouteMetadataProperty{
						Name: jsii.String("name"),

						// the properties below are optional
						Invert: jsii.Boolean(false),
						Match: &GrpcRouteMetadataMatchMethodProperty{
							Exact: jsii.String("exact"),
							Prefix: jsii.String("prefix"),
							Range: &MatchRangeProperty{
								End: jsii.Number(123),
								Start: jsii.Number(123),
							},
							Regex: jsii.String("regex"),
							Suffix: jsii.String("suffix"),
						},
					},
				},
				MethodName: jsii.String("methodName"),
				Port: jsii.Number(123),
				ServiceName: jsii.String("serviceName"),
			},

			// the properties below are optional
			RetryPolicy: &GrpcRetryPolicyProperty{
				MaxRetries: jsii.Number(123),
				PerRetryTimeout: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},

				// the properties below are optional
				GrpcRetryEvents: []*string{
					jsii.String("grpcRetryEvents"),
				},
				HttpRetryEvents: []*string{
					jsii.String("httpRetryEvents"),
				},
				TcpRetryEvents: []*string{
					jsii.String("tcpRetryEvents"),
				},
			},
			Timeout: &GrpcTimeoutProperty{
				Idle: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},
				PerRequest: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},
			},
		},
		Http2Route: &HttpRouteProperty{
			Action: &HttpRouteActionProperty{
				WeightedTargets: []interface{}{
					&WeightedTargetProperty{
						VirtualNode: jsii.String("virtualNode"),
						Weight: jsii.Number(123),

						// the properties below are optional
						Port: jsii.Number(123),
					},
				},
			},
			Match: &HttpRouteMatchProperty{
				Headers: []interface{}{
					&HttpRouteHeaderProperty{
						Name: jsii.String("name"),

						// the properties below are optional
						Invert: jsii.Boolean(false),
						Match: &HeaderMatchMethodProperty{
							Exact: jsii.String("exact"),
							Prefix: jsii.String("prefix"),
							Range: &MatchRangeProperty{
								End: jsii.Number(123),
								Start: jsii.Number(123),
							},
							Regex: jsii.String("regex"),
							Suffix: jsii.String("suffix"),
						},
					},
				},
				Method: jsii.String("method"),
				Path: &HttpPathMatchProperty{
					Exact: jsii.String("exact"),
					Regex: jsii.String("regex"),
				},
				Port: jsii.Number(123),
				Prefix: jsii.String("prefix"),
				QueryParameters: []interface{}{
					&QueryParameterProperty{
						Name: jsii.String("name"),

						// the properties below are optional
						Match: &HttpQueryParameterMatchProperty{
							Exact: jsii.String("exact"),
						},
					},
				},
				Scheme: jsii.String("scheme"),
			},

			// the properties below are optional
			RetryPolicy: &HttpRetryPolicyProperty{
				MaxRetries: jsii.Number(123),
				PerRetryTimeout: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},

				// the properties below are optional
				HttpRetryEvents: []*string{
					jsii.String("httpRetryEvents"),
				},
				TcpRetryEvents: []*string{
					jsii.String("tcpRetryEvents"),
				},
			},
			Timeout: &HttpTimeoutProperty{
				Idle: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},
				PerRequest: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},
			},
		},
		HttpRoute: &HttpRouteProperty{
			Action: &HttpRouteActionProperty{
				WeightedTargets: []interface{}{
					&WeightedTargetProperty{
						VirtualNode: jsii.String("virtualNode"),
						Weight: jsii.Number(123),

						// the properties below are optional
						Port: jsii.Number(123),
					},
				},
			},
			Match: &HttpRouteMatchProperty{
				Headers: []interface{}{
					&HttpRouteHeaderProperty{
						Name: jsii.String("name"),

						// the properties below are optional
						Invert: jsii.Boolean(false),
						Match: &HeaderMatchMethodProperty{
							Exact: jsii.String("exact"),
							Prefix: jsii.String("prefix"),
							Range: &MatchRangeProperty{
								End: jsii.Number(123),
								Start: jsii.Number(123),
							},
							Regex: jsii.String("regex"),
							Suffix: jsii.String("suffix"),
						},
					},
				},
				Method: jsii.String("method"),
				Path: &HttpPathMatchProperty{
					Exact: jsii.String("exact"),
					Regex: jsii.String("regex"),
				},
				Port: jsii.Number(123),
				Prefix: jsii.String("prefix"),
				QueryParameters: []interface{}{
					&QueryParameterProperty{
						Name: jsii.String("name"),

						// the properties below are optional
						Match: &HttpQueryParameterMatchProperty{
							Exact: jsii.String("exact"),
						},
					},
				},
				Scheme: jsii.String("scheme"),
			},

			// the properties below are optional
			RetryPolicy: &HttpRetryPolicyProperty{
				MaxRetries: jsii.Number(123),
				PerRetryTimeout: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},

				// the properties below are optional
				HttpRetryEvents: []*string{
					jsii.String("httpRetryEvents"),
				},
				TcpRetryEvents: []*string{
					jsii.String("tcpRetryEvents"),
				},
			},
			Timeout: &HttpTimeoutProperty{
				Idle: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},
				PerRequest: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},
			},
		},
		Priority: jsii.Number(123),
		TcpRoute: &TcpRouteProperty{
			Action: &TcpRouteActionProperty{
				WeightedTargets: []interface{}{
					&WeightedTargetProperty{
						VirtualNode: jsii.String("virtualNode"),
						Weight: jsii.Number(123),

						// the properties below are optional
						Port: jsii.Number(123),
					},
				},
			},

			// the properties below are optional
			Match: &TcpRouteMatchProperty{
				Port: jsii.Number(123),
			},
			Timeout: &TcpTimeoutProperty{
				Idle: &DurationProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},
			},
		},
	},
	VirtualRouterName: jsii.String("virtualRouterName"),

	// the properties below are optional
	MeshOwner: jsii.String("meshOwner"),
	RouteName: jsii.String("routeName"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

meshNamestringmesh_namestrmeshNameStringMeshNamestringMeshName*string required #
The name of the service mesh to create the route in.
meshOwneroptionalstringmesh_owneroptionalstrmeshOwneroptionalStringMeshOwneroptionalstringMeshOwneroptional*string #
The AWS IAM account ID of the service mesh owner.
notes

If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes .

routeNameoptionalstringroute_nameoptionalstrrouteNameoptionalStringRouteNameoptionalstringRouteNameoptional*string #
The name to use for the route.
specIResolvable | CfnRoute.RouteSpecPropertyspectyping.Union[IResolvable, RouteSpecProperty]specIResolvableSpecIResolvableSpecinterface{} required #
The route specification to apply.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
Optional metadata that you can apply to the route to assist with categorization and organization.

Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

virtualRouterNamestringvirtual_router_namestrvirtualRouterNameStringVirtualRouterNamestringVirtualRouterName*string required #
The name of the virtual router in which to create the route.

If the virtual router is in a shared mesh, then you must be the owner of the virtual router resource.