Class WebSocketLambdaAuthorizer

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigatewayv2.authorizers.WebSocketLambdaAuthorizer
All Implemented Interfaces:
IWebSocketRouteAuthorizer, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.909Z") @Stability(Experimental) public class WebSocketLambdaAuthorizer extends software.amazon.jsii.JsiiObject implements IWebSocketRouteAuthorizer
(experimental) Authorize WebSocket Api routes via a lambda function.

Example:

 import software.amazon.awscdk.services.apigatewayv2.authorizers.WebSocketLambdaAuthorizer;
 import software.amazon.awscdk.services.apigatewayv2.integrations.WebSocketLambdaIntegration;
 // This function handles your auth logic
 Function authHandler;
 // This function handles your WebSocket requests
 Function handler;
 WebSocketLambdaAuthorizer authorizer = new WebSocketLambdaAuthorizer("Authorizer", authHandler);
 WebSocketLambdaIntegration integration = new WebSocketLambdaIntegration("Integration", handler);
 WebSocketApi.Builder.create(this, "WebSocketApi")
         .connectRouteOptions(WebSocketRouteOptions.builder()
                 .integration(integration)
                 .authorizer(authorizer)
                 .build())
         .build();
 
  • Constructor Details

    • WebSocketLambdaAuthorizer

      protected WebSocketLambdaAuthorizer(software.amazon.jsii.JsiiObjectRef objRef)
    • WebSocketLambdaAuthorizer

      protected WebSocketLambdaAuthorizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • WebSocketLambdaAuthorizer

      @Stability(Experimental) public WebSocketLambdaAuthorizer(@NotNull String id, @NotNull IFunction handler, @Nullable WebSocketLambdaAuthorizerProps props)
      Parameters:
      id - This parameter is required.
      handler - This parameter is required.
      props -
    • WebSocketLambdaAuthorizer

      @Stability(Experimental) public WebSocketLambdaAuthorizer(@NotNull String id, @NotNull IFunction handler)
      Parameters:
      id - This parameter is required.
      handler - This parameter is required.
  • Method Details