@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.176Z") @Stability(value=Stable) public interface LambdaAuthorizerProps extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.apigateway.*;
import software.amazon.awscdk.services.iam.*;
import software.amazon.awscdk.services.lambda.*;
Function function_;
Role role;
LambdaAuthorizerProps lambdaAuthorizerProps = LambdaAuthorizerProps.builder()
.handler(function_)
// the properties below are optional
.assumeRole(role)
.authorizerName("authorizerName")
.resultsCacheTtl(Duration.minutes(30))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
LambdaAuthorizerProps.Builder
A builder for
LambdaAuthorizerProps |
static class |
LambdaAuthorizerProps.Jsii$Proxy
An implementation for
LambdaAuthorizerProps |
| Modifier and Type | Method and Description |
|---|---|
static LambdaAuthorizerProps.Builder |
builder() |
default IRole |
getAssumeRole()
An optional IAM role for APIGateway to assume before calling the Lambda-based authorizer.
|
default String |
getAuthorizerName()
An optional human friendly name for the authorizer.
|
IFunction |
getHandler()
The handler for the authorizer lambda function.
|
default Duration |
getResultsCacheTtl()
How long APIGateway should cache the results.
|
@Stability(value=Stable) @NotNull IFunction getHandler()
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 {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-input.html | here} and output specification {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html | here}.
@Stability(value=Stable) @Nullable default IRole getAssumeRole()
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.
@Stability(value=Stable) @Nullable default String getAuthorizerName()
Note that, this is not the primary identifier of the authorizer.
Default: - the unique construcrt ID
@Stability(value=Stable) @Nullable default Duration getResultsCacheTtl()
Max 1 hour. Disable caching by setting this to 0.
Default: Duration.minutes(5)
@Stability(value=Stable) static LambdaAuthorizerProps.Builder builder()
LambdaAuthorizerProps.Builder of LambdaAuthorizerPropsCopyright © 2022. All rights reserved.