@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-07T23:46:59.920Z") @Stability(value=Experimental) public class HttpLambdaAuthorizer extends software.amazon.jsii.JsiiObject implements IHttpRouteAuthorizer
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());
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpLambdaAuthorizer.Builder
(experimental) A fluent builder for
HttpLambdaAuthorizer. |
software.amazon.jsii.JsiiObject.InitializationModeIHttpRouteAuthorizer.Jsii$Default, IHttpRouteAuthorizer.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
HttpLambdaAuthorizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
HttpLambdaAuthorizer(software.amazon.jsii.JsiiObjectRef objRef) |
|
HttpLambdaAuthorizer(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.
|
| Modifier and Type | Method and Description |
|---|---|
HttpRouteAuthorizerConfig |
bind(HttpRouteAuthorizerBindOptions options)
(experimental) Bind this authorizer to a specified Http route.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected HttpLambdaAuthorizer(software.amazon.jsii.JsiiObjectRef objRef)
protected HttpLambdaAuthorizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public HttpLambdaAuthorizer(@NotNull
String id,
@NotNull
IFunction handler,
@Nullable
HttpLambdaAuthorizerProps props)
id - The id of the underlying construct. This parameter is required.handler - This parameter is required.props - Properties to configure the authorizer.@Stability(value=Experimental)
public HttpLambdaAuthorizer(@NotNull
String id,
@NotNull
IFunction handler)
id - The id of the underlying construct. This parameter is required.handler - This parameter is required.@Stability(value=Experimental) @NotNull public HttpRouteAuthorizerConfig bind(@NotNull HttpRouteAuthorizerBindOptions options)
bind in interface IHttpRouteAuthorizeroptions - This parameter is required.Copyright © 2022. All rights reserved.