Interface LambdaAuthorizerProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
RequestAuthorizerProps
,TokenAuthorizerProps
- All Known Implementing Classes:
LambdaAuthorizerProps.Jsii$Proxy
,RequestAuthorizerProps.Jsii$Proxy
,TokenAuthorizerProps.Jsii$Proxy
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.apigateway.*; import software.amazon.awscdk.services.iam.*; import software.amazon.awscdk.services.lambda.*; import software.amazon.awscdk.core.*; Function function_; Role role; LambdaAuthorizerProps lambdaAuthorizerProps = LambdaAuthorizerProps.builder() .handler(function_) // the properties below are optional .assumeRole(role) .authorizerName("authorizerName") .resultsCacheTtl(Duration.minutes(30)) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forLambdaAuthorizerProps
static final class
An implementation forLambdaAuthorizerProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default IRole
An optional IAM role for APIGateway to assume before calling the Lambda-based authorizer.default String
An optional human friendly name for the authorizer.The handler for the authorizer lambda function.default Duration
How long APIGateway should cache the results.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getHandler
The handler for the authorizer lambda function.The handler must follow a very specific protocol on the input it receives and the output it needs to produce. API Gateway has documented the handler's input specification
invalid @link
{@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-input.html
invalid @link
{@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html
-
getAssumeRole
An optional IAM role for APIGateway to assume before calling the Lambda-based authorizer.The IAM role must be assumable by 'apigateway.amazonaws.com'.
Default: - A resource policy is added to the Lambda function allowing apigateway.amazonaws.com to invoke the function.
-
getAuthorizerName
An optional human friendly name for the authorizer.Note that, this is not the primary identifier of the authorizer.
Default: - the unique construcrt ID
-
getResultsCacheTtl
How long APIGateway should cache the results.Max 1 hour. Disable caching by setting this to 0.
Default: Duration.minutes(5)
-
builder
- Returns:
- a
LambdaAuthorizerProps.Builder
ofLambdaAuthorizerProps
-