Class LambdaAuthorizerConfig.Builder
java.lang.Object
software.amazon.awscdk.services.appsync.LambdaAuthorizerConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LambdaAuthorizerConfig>
- Enclosing interface:
LambdaAuthorizerConfig
@Stability(Stable)
public static final class LambdaAuthorizerConfig.Builder
extends Object
implements software.amazon.jsii.Builder<LambdaAuthorizerConfig>
A builder for
LambdaAuthorizerConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofLambdaAuthorizerConfig.getHandler()
resultsCacheTtl
(Duration resultsCacheTtl) Sets the value ofLambdaAuthorizerConfig.getResultsCacheTtl()
validationRegex
(String validationRegex) Sets the value ofLambdaAuthorizerConfig.getValidationRegex()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
handler
Sets the value ofLambdaAuthorizerConfig.getHandler()
- Parameters:
handler
- The authorizer lambda function. This parameter is required.- Returns:
this
-
resultsCacheTtl
Sets the value ofLambdaAuthorizerConfig.getResultsCacheTtl()
- Parameters:
resultsCacheTtl
- How long the results are cached. Disable caching by setting this to 0.- Returns:
this
-
validationRegex
Sets the value ofLambdaAuthorizerConfig.getValidationRegex()
- Parameters:
validationRegex
- A regular expression for validation of tokens before the Lambda function is called.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LambdaAuthorizerConfig>
- Returns:
- a new instance of
LambdaAuthorizerConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-