GatewayRouteSpecConfig

class aws_cdk.aws_appmesh.GatewayRouteSpecConfig(*, grpc_spec_config=None, http2_spec_config=None, http_spec_config=None, priority=None)

Bases: object

All Properties for GatewayRoute Specs.

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

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

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

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

ExampleMetadata:

fixture=_generated

Example:

# 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

gateway_route_spec_config = appmesh.GatewayRouteSpecConfig(
    grpc_spec_config=appmesh.CfnGatewayRoute.GrpcGatewayRouteProperty(
        action=appmesh.CfnGatewayRoute.GrpcGatewayRouteActionProperty(
            target=appmesh.CfnGatewayRoute.GatewayRouteTargetProperty(
                virtual_service=appmesh.CfnGatewayRoute.GatewayRouteVirtualServiceProperty(
                    virtual_service_name="virtualServiceName"
                ),

                # the properties below are optional
                port=123
            ),

            # the properties below are optional
            rewrite=appmesh.CfnGatewayRoute.GrpcGatewayRouteRewriteProperty(
                hostname=appmesh.CfnGatewayRoute.GatewayRouteHostnameRewriteProperty(
                    default_target_hostname="defaultTargetHostname"
                )
            )
        ),
        match=appmesh.CfnGatewayRoute.GrpcGatewayRouteMatchProperty(
            hostname=appmesh.CfnGatewayRoute.GatewayRouteHostnameMatchProperty(
                exact="exact",
                suffix="suffix"
            ),
            metadata=[appmesh.CfnGatewayRoute.GrpcGatewayRouteMetadataProperty(
                name="name",

                # the properties below are optional
                invert=False,
                match=appmesh.CfnGatewayRoute.GatewayRouteMetadataMatchProperty(
                    exact="exact",
                    prefix="prefix",
                    range=appmesh.CfnGatewayRoute.GatewayRouteRangeMatchProperty(
                        end=123,
                        start=123
                    ),
                    regex="regex",
                    suffix="suffix"
                )
            )],
            port=123,
            service_name="serviceName"
        )
    ),
    http2_spec_config=appmesh.CfnGatewayRoute.HttpGatewayRouteProperty(
        action=appmesh.CfnGatewayRoute.HttpGatewayRouteActionProperty(
            target=appmesh.CfnGatewayRoute.GatewayRouteTargetProperty(
                virtual_service=appmesh.CfnGatewayRoute.GatewayRouteVirtualServiceProperty(
                    virtual_service_name="virtualServiceName"
                ),

                # the properties below are optional
                port=123
            ),

            # the properties below are optional
            rewrite=appmesh.CfnGatewayRoute.HttpGatewayRouteRewriteProperty(
                hostname=appmesh.CfnGatewayRoute.GatewayRouteHostnameRewriteProperty(
                    default_target_hostname="defaultTargetHostname"
                ),
                path=appmesh.CfnGatewayRoute.HttpGatewayRoutePathRewriteProperty(
                    exact="exact"
                ),
                prefix=appmesh.CfnGatewayRoute.HttpGatewayRoutePrefixRewriteProperty(
                    default_prefix="defaultPrefix",
                    value="value"
                )
            )
        ),
        match=appmesh.CfnGatewayRoute.HttpGatewayRouteMatchProperty(
            headers=[appmesh.CfnGatewayRoute.HttpGatewayRouteHeaderProperty(
                name="name",

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

                # the properties below are optional
                match=appmesh.CfnGatewayRoute.HttpQueryParameterMatchProperty(
                    exact="exact"
                )
            )]
        )
    ),
    http_spec_config=appmesh.CfnGatewayRoute.HttpGatewayRouteProperty(
        action=appmesh.CfnGatewayRoute.HttpGatewayRouteActionProperty(
            target=appmesh.CfnGatewayRoute.GatewayRouteTargetProperty(
                virtual_service=appmesh.CfnGatewayRoute.GatewayRouteVirtualServiceProperty(
                    virtual_service_name="virtualServiceName"
                ),

                # the properties below are optional
                port=123
            ),

            # the properties below are optional
            rewrite=appmesh.CfnGatewayRoute.HttpGatewayRouteRewriteProperty(
                hostname=appmesh.CfnGatewayRoute.GatewayRouteHostnameRewriteProperty(
                    default_target_hostname="defaultTargetHostname"
                ),
                path=appmesh.CfnGatewayRoute.HttpGatewayRoutePathRewriteProperty(
                    exact="exact"
                ),
                prefix=appmesh.CfnGatewayRoute.HttpGatewayRoutePrefixRewriteProperty(
                    default_prefix="defaultPrefix",
                    value="value"
                )
            )
        ),
        match=appmesh.CfnGatewayRoute.HttpGatewayRouteMatchProperty(
            headers=[appmesh.CfnGatewayRoute.HttpGatewayRouteHeaderProperty(
                name="name",

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

                # the properties below are optional
                match=appmesh.CfnGatewayRoute.HttpQueryParameterMatchProperty(
                    exact="exact"
                )
            )]
        )
    ),
    priority=123
)

Attributes

grpc_spec_config

The spec for a grpc gateway route.

Default:
  • no grpc spec

http2_spec_config

The spec for an http2 gateway route.

Default:
  • no http2 spec

http_spec_config

The spec for an http gateway route.

Default:
  • no http spec

priority

The priority for the gateway route.

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

Default:
  • no particular priority