@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:02.104Z") @Stability(value=Experimental) public interface HttpLambdaAuthorizerProps extends software.amazon.jsii.JsiiSerializable
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 | Interface and Description |
|---|---|
static class |
HttpLambdaAuthorizerProps.Builder
A builder for
HttpLambdaAuthorizerProps |
static class |
HttpLambdaAuthorizerProps.Jsii$Proxy
An implementation for
HttpLambdaAuthorizerProps |
| Modifier and Type | Method and Description |
|---|---|
static HttpLambdaAuthorizerProps.Builder |
builder() |
default String |
getAuthorizerName()
(experimental) Friendly authorizer name.
|
default List<String> |
getIdentitySource()
(experimental) The identity source for which authorization is requested.
|
default List<HttpLambdaResponseType> |
getResponseTypes()
(experimental) The types of responses the lambda can return.
|
default Duration |
getResultsCacheTtl()
(experimental) How long APIGateway should cache the results.
|
@Stability(value=Experimental) @Nullable default String getAuthorizerName()
Default: - same value as `id` passed in the constructor.
@Stability(value=Experimental) @Nullable default List<String> getIdentitySource()
Default: ['$request.header.Authorization']
@Stability(value=Experimental) @Nullable default List<HttpLambdaResponseType> getResponseTypes()
If HttpLambdaResponseType.SIMPLE is included then response format 2.0 will be used.
Default: [HttpLambdaResponseType.IAM]
https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html#http-api-lambda-authorizer.payload-format-response@Stability(value=Experimental) @Nullable default Duration getResultsCacheTtl()
Max 1 hour.
Disable caching by setting this to Duration.seconds(0).
Default: Duration.minutes(5)
@Stability(value=Experimental) static HttpLambdaAuthorizerProps.Builder builder()
HttpLambdaAuthorizerProps.Builder of HttpLambdaAuthorizerPropsCopyright © 2022. All rights reserved.