@Stability(value=Experimental) public static final class LambdaAuthorizerConfig.Builder extends Object implements software.amazon.jsii.Builder<LambdaAuthorizerConfig>
LambdaAuthorizerConfig| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
LambdaAuthorizerConfig |
build()
Builds the configured instance.
|
LambdaAuthorizerConfig.Builder |
handler(IFunction handler)
Sets the value of
LambdaAuthorizerConfig.getHandler() |
LambdaAuthorizerConfig.Builder |
resultsCacheTtl(Duration resultsCacheTtl)
Sets the value of
LambdaAuthorizerConfig.getResultsCacheTtl() |
LambdaAuthorizerConfig.Builder |
validationRegex(String validationRegex)
Sets the value of
LambdaAuthorizerConfig.getValidationRegex() |
@Stability(value=Experimental) public LambdaAuthorizerConfig.Builder handler(IFunction handler)
LambdaAuthorizerConfig.getHandler()handler - The authorizer lambda function. This parameter is required.
Note: This Lambda function must have the following resource-based policy assigned to it.
When configuring Lambda authorizers in the console, this is done for you.
To do so with the AWS CLI, run the following:
aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction
this@Stability(value=Experimental) public LambdaAuthorizerConfig.Builder resultsCacheTtl(Duration resultsCacheTtl)
LambdaAuthorizerConfig.getResultsCacheTtl()resultsCacheTtl - How long the results are cached.
Disable caching by setting this to 0.this@Stability(value=Experimental) public LambdaAuthorizerConfig.Builder validationRegex(String validationRegex)
LambdaAuthorizerConfig.getValidationRegex()validationRegex - A regular expression for validation of tokens before the Lambda function is called.this@Stability(value=Experimental) public LambdaAuthorizerConfig build()
build in interface software.amazon.jsii.Builder<LambdaAuthorizerConfig>LambdaAuthorizerConfigNullPointerException - if any required attribute was not providedCopyright © 2022. All rights reserved.