Interface LambdaAuthorizerConfig
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
LambdaAuthorizerConfig.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:04.471Z")
@Stability(Stable)
public interface LambdaAuthorizerConfig
extends software.amazon.jsii.JsiiSerializable
Configuration for Lambda authorization in AppSync.
Note that you can only have a single AWS Lambda function configured to authorize your API.
Example:
import software.amazon.awscdk.services.lambda.*; Function authFunction; GraphqlApi.Builder.create(this, "api") .name("api") .definition(Definition.fromFile(join(__dirname, "appsync.test.graphql"))) .authorizationConfig(AuthorizationConfig.builder() .defaultAuthorization(AuthorizationMode.builder() .authorizationType(AuthorizationType.LAMBDA) .lambdaAuthorizerConfig(LambdaAuthorizerConfig.builder() .handler(authFunction) .build()) .build()) .build()) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forLambdaAuthorizerConfig
static final class
An implementation forLambdaAuthorizerConfig
-
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getHandler
The authorizer lambda function.- See Also:
-
getResultsCacheTtl
How long the results are cached.Disable caching by setting this to 0.
Default: Duration.minutes(5)
-
getValidationRegex
A regular expression for validation of tokens before the Lambda function is called.Default: - no regex filter will be applied.
-
builder
- Returns:
- a
LambdaAuthorizerConfig.Builder
ofLambdaAuthorizerConfig
-