WebSocketAuthorizerProps

class aws_cdk.aws_apigatewayv2.WebSocketAuthorizerProps(*, identity_source, type, web_socket_api, authorizer_name=None, authorizer_uri=None)

Bases: object

(experimental) Properties to initialize an instance of WebSocketAuthorizer.

Parameters:
  • identity_source (Sequence[str]) – (experimental) The identity source for which authorization is requested.

  • type (WebSocketAuthorizerType) – (experimental) The type of authorizer.

  • web_socket_api (IWebSocketApi) – (experimental) WebSocket Api to attach the authorizer to.

  • authorizer_name (Optional[str]) – (experimental) Name of the authorizer. Default: - id of the WebSocketAuthorizer construct.

  • authorizer_uri (Optional[str]) – (experimental) The authorizer’s Uniform Resource Identifier (URI). For REQUEST authorizers, this must be a well-formed Lambda function URI. Default: - required for Request authorizer types

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_authorizer_props = apigatewayv2.WebSocketAuthorizerProps(
    identity_source=["identitySource"],
    type=apigatewayv2.WebSocketAuthorizerType.LAMBDA,
    web_socket_api=web_socket_api,

    # the properties below are optional
    authorizer_name="authorizerName",
    authorizer_uri="authorizerUri"
)

Attributes

authorizer_name

(experimental) Name of the authorizer.

Default:
  • id of the WebSocketAuthorizer construct.

Stability:

experimental

authorizer_uri

(experimental) The authorizer’s Uniform Resource Identifier (URI).

For REQUEST authorizers, this must be a well-formed Lambda function URI.

Default:
  • required for Request authorizer types

Stability:

experimental

identity_source

(experimental) The identity source for which authorization is requested.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html#cfn-apigatewayv2-authorizer-identitysource

Stability:

experimental

type

(experimental) The type of authorizer.

Stability:

experimental

web_socket_api

(experimental) WebSocket Api to attach the authorizer to.

Stability:

experimental