Skip to content
v2.274.0

WebSocketAuthorizerProps Struct ​

Properties to initialize an instance of WebSocketAuthorizer.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigatewayv2 as apigatewayv2 } from 'aws-cdk-lib';

declare const webSocketApi: apigatewayv2.WebSocketApi;
const webSocketAuthorizerProps: apigatewayv2.WebSocketAuthorizerProps = {
  identitySource: ['identitySource'],
  type: apigatewayv2.WebSocketAuthorizerType.LAMBDA,
  webSocketApi: webSocketApi,

  // the properties below are optional
  authorizerName: 'authorizerName',
  authorizerUri: 'authorizerUri',
};

Properties ​

authorizerNamestringauthorizer_namestrauthorizerNameStringAuthorizerNamestringAuthorizerName*string= id of the WebSocketAuthorizer co…#
Name of the authorizer.
default

Default: id of the WebSocketAuthorizer construct.

authorizerUristringauthorizer_uristrauthorizerUriStringAuthorizerUristringAuthorizerUri*string= required for Request authorizer …#
The authorizer's Uniform Resource Identifier (URI).

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

default

Default: required for Request authorizer types

identitySourcestring[]identity_sourcetyping.List[str]identitySourceList<String>IdentitySourcestring[]IdentitySource*[]*stringrequired#
The identity source for which authorization is requested.
webSocketApiIWebSocketApiweb_socket_apiIWebSocketApiwebSocketApiIWebSocketApiWebSocketApiIWebSocketApiWebSocketApiIWebSocketApirequired#
WebSocket Api to attach the authorizer to.