Class HttpLambdaAuthorizer
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigatewayv2.authorizers.HttpLambdaAuthorizer
- All Implemented Interfaces:
IHttpRouteAuthorizer
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.887Z")
@Stability(Experimental)
public class HttpLambdaAuthorizer
extends software.amazon.jsii.JsiiObject
implements IHttpRouteAuthorizer
(experimental) Authorize Http Api routes via a lambda function.
Example:
import software.amazon.awscdk.services.apigatewayv2.authorizers.HttpLambdaAuthorizer; import software.amazon.awscdk.services.apigatewayv2.authorizers.HttpLambdaResponseType; import software.amazon.awscdk.services.apigatewayv2.integrations.HttpUrlIntegration; // This function handles your auth logic Function authHandler; HttpLambdaAuthorizer authorizer = HttpLambdaAuthorizer.Builder.create("BooksAuthorizer", authHandler) .responseTypes(List.of(HttpLambdaResponseType.SIMPLE)) .build(); HttpApi api = new HttpApi(this, "HttpApi"); api.addRoutes(AddRoutesOptions.builder() .integration(new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.myproxy.internal")) .path("/books") .authorizer(authorizer) .build());
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
(experimental) A fluent builder forHttpLambdaAuthorizer
.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.IHttpRouteAuthorizer
IHttpRouteAuthorizer.Jsii$Default, IHttpRouteAuthorizer.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionHttpLambdaAuthorizer
(String id, IFunction handler) (experimental) Initialize a lambda authorizer to be bound with HTTP route.HttpLambdaAuthorizer
(String id, IFunction handler, HttpLambdaAuthorizerProps props) (experimental) Initialize a lambda authorizer to be bound with HTTP route.protected
HttpLambdaAuthorizer
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
HttpLambdaAuthorizer
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind
(HttpRouteAuthorizerBindOptions options) (experimental) Bind this authorizer to a specified Http 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
-
HttpLambdaAuthorizer
protected HttpLambdaAuthorizer(software.amazon.jsii.JsiiObjectRef objRef) -
HttpLambdaAuthorizer
protected HttpLambdaAuthorizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
HttpLambdaAuthorizer
@Stability(Experimental) public HttpLambdaAuthorizer(@NotNull String id, @NotNull IFunction handler, @Nullable HttpLambdaAuthorizerProps props) (experimental) Initialize a lambda authorizer to be bound with HTTP route.- Parameters:
id
- The id of the underlying construct. This parameter is required.handler
- This parameter is required.props
- Properties to configure the authorizer.
-
HttpLambdaAuthorizer
@Stability(Experimental) public HttpLambdaAuthorizer(@NotNull String id, @NotNull IFunction handler) (experimental) Initialize a lambda authorizer to be bound with HTTP route.- Parameters:
id
- The id of the underlying construct. This parameter is required.handler
- This parameter is required.
-
-
Method Details
-
bind
@Stability(Experimental) @NotNull public HttpRouteAuthorizerConfig bind(@NotNull HttpRouteAuthorizerBindOptions options) (experimental) Bind this authorizer to a specified Http route.- Specified by:
bind
in interfaceIHttpRouteAuthorizer
- Parameters:
options
- This parameter is required.
-