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
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forLambdaAuthorizerPropsstatic final classAn implementation forLambdaAuthorizerProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default IRoleAn optional IAM role for APIGateway to assume before calling the Lambda-based authorizer.default StringAn optional human friendly name for the authorizer.The handler for the authorizer lambda function.default DurationHow 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 {@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}.
-
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.BuilderofLambdaAuthorizerProps
-