CfnRouteProps

class aws_cdk.aws_appmesh.CfnRouteProps(*, mesh_name, spec, virtual_router_name, mesh_owner=None, route_name=None, tags=None)

Bases: object

Properties for defining a CfnRoute.

Parameters:
  • mesh_name (str) – The name of the service mesh to create the route in.

  • spec (Union[IResolvable, RouteSpecProperty, Dict[str, Any]]) – The route specification to apply.

  • virtual_router_name (str) – 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.

  • mesh_owner (Optional[str]) – The AWS IAM account ID of the service mesh owner. 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 .

  • route_name (Optional[str]) – The name to use for the route.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – 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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-route.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.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"
    )]
)

Attributes

mesh_name

The name of the service mesh to create the route in.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-route.html#cfn-appmesh-route-meshname

mesh_owner

The AWS IAM account ID of the service mesh owner.

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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-route.html#cfn-appmesh-route-meshowner

route_name

The name to use for the route.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-route.html#cfn-appmesh-route-routename

spec

The route specification to apply.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-route.html#cfn-appmesh-route-spec

tags

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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-route.html#cfn-appmesh-route-tags

virtual_router_name

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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-route.html#cfn-appmesh-route-virtualroutername