WebSocketRouteProps

class aws_cdk.aws_apigatewayv2.WebSocketRouteProps(*, integration, authorizer=None, route_key, web_socket_api, api_key_required=None)

Bases: WebSocketRouteOptions

(experimental) Properties to initialize a new Route.

Parameters:
  • integration (WebSocketRouteIntegration) – (experimental) The integration to be configured on this route.

  • authorizer (Optional[IWebSocketRouteAuthorizer]) – (experimental) The authorize to this route. You can only set authorizer to a $connect route. Default: - No Authorizer

  • route_key (str) – (experimental) The key to this route.

  • web_socket_api (IWebSocketApi) – (experimental) The API the route is associated with.

  • api_key_required (Optional[bool]) – (experimental) Whether the route requires an API Key to be provided. Default: false

Stability:

experimental

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_apigatewayv2 as apigatewayv2

# web_socket_api: apigatewayv2.WebSocketApi
# web_socket_route_authorizer: apigatewayv2.IWebSocketRouteAuthorizer
# web_socket_route_integration: apigatewayv2.WebSocketRouteIntegration

web_socket_route_props = apigatewayv2.WebSocketRouteProps(
    integration=web_socket_route_integration,
    route_key="routeKey",
    web_socket_api=web_socket_api,

    # the properties below are optional
    api_key_required=False,
    authorizer=web_socket_route_authorizer
)

Attributes

api_key_required

(experimental) Whether the route requires an API Key to be provided.

Default:

false

Stability:

experimental

authorizer

(experimental) The authorize to this route.

You can only set authorizer to a $connect route.

Default:
  • No Authorizer

Stability:

experimental

integration

(experimental) The integration to be configured on this route.

Stability:

experimental

route_key

(experimental) The key to this route.

Stability:

experimental

web_socket_api

(experimental) The API the route is associated with.

Stability:

experimental