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();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
(experimental) A fluent builder forWebSocketLambdaAuthorizer
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.apigatewayv2.IWebSocketRouteAuthorizer
IWebSocketRouteAuthorizer.Jsii$Default, IWebSocketRouteAuthorizer.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionWebSocketLambdaAuthorizer
(String id, IFunction handler) WebSocketLambdaAuthorizer
(String id, IFunction handler, WebSocketLambdaAuthorizerProps props) protected
WebSocketLambdaAuthorizer
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
WebSocketLambdaAuthorizer
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind
(WebSocketRouteAuthorizerBindOptions options) (experimental) Bind this authorizer to a specified WebSocket route.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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
-
bind
@Stability(Experimental) @NotNull public WebSocketRouteAuthorizerConfig bind(@NotNull WebSocketRouteAuthorizerBindOptions options) (experimental) Bind this authorizer to a specified WebSocket route.- Specified by:
bind
in interfaceIWebSocketRouteAuthorizer
- Parameters:
options
- This parameter is required.
-