RouteSpecConfig

class aws_cdk.aws_appmesh.RouteSpecConfig(*, grpc_route_spec=None, http2_route_spec=None, http_route_spec=None, priority=None, tcp_route_spec=None)

Bases: object

All Properties for Route Specs.

Parameters:
  • grpc_route_spec (Union[GrpcRouteProperty, Dict[str, Any], None]) – The spec for a grpc route. Default: - no grpc spec

  • http2_route_spec (Union[HttpRouteProperty, Dict[str, Any], None]) – The spec for an http2 route. Default: - no http2 spec

  • http_route_spec (Union[HttpRouteProperty, Dict[str, Any], None]) – The spec for an http route. Default: - no http spec

  • priority (Union[int, float, None]) – The priority for the route. When a Virtual Router has multiple routes, route match is performed in the order of specified value, where 0 is the highest priority, and first matched route is selected. Default: - no particular priority

  • tcp_route_spec (Union[TcpRouteProperty, Dict[str, Any], None]) – The spec for a tcp route. Default: - no tcp spec

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

route_spec_config = appmesh.RouteSpecConfig(
    grpc_route_spec=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_spec=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_spec=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_spec=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
            )
        )
    )
)

Attributes

grpc_route_spec

The spec for a grpc route.

Default:
  • no grpc spec

http2_route_spec

The spec for an http2 route.

Default:
  • no http2 spec

http_route_spec

The spec for an http route.

Default:
  • no http spec

priority

The priority for the route.

When a Virtual Router has multiple routes, route match is performed in the order of specified value, where 0 is the highest priority, and first matched route is selected.

Default:
  • no particular priority

tcp_route_spec

The spec for a tcp route.

Default:
  • no tcp spec