Interface HttpLambdaAuthorizerProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
HttpLambdaAuthorizerProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.889Z")
@Stability(Experimental)
public interface HttpLambdaAuthorizerProps
extends software.amazon.jsii.JsiiSerializable
(experimental) Properties to initialize HttpTokenAuthorizer.
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 TypeInterfaceDescriptionstatic final class
A builder forHttpLambdaAuthorizerProps
static final class
An implementation forHttpLambdaAuthorizerProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
(experimental) Friendly authorizer name.(experimental) The identity source for which authorization is requested.default List<HttpLambdaResponseType>
(experimental) The types of responses the lambda can return.default Duration
(experimental) How long APIGateway should cache the results.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAuthorizerName
(experimental) Friendly authorizer name.Default: - same value as `id` passed in the constructor.
-
getIdentitySource
(experimental) The identity source for which authorization is requested.Default: ['$request.header.Authorization']
-
getResponseTypes
(experimental) The types of responses the lambda can return.If HttpLambdaResponseType.SIMPLE is included then response format 2.0 will be used.
Default: [HttpLambdaResponseType.IAM]
- See Also:
-
getResultsCacheTtl
(experimental) How long APIGateway should cache the results.Max 1 hour. Disable caching by setting this to
Duration.seconds(0)
.Default: Duration.minutes(5)
-
builder
- Returns:
- a
HttpLambdaAuthorizerProps.Builder
ofHttpLambdaAuthorizerProps
-