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(Experimental) public static final class LambdaAuthorizerConfig.Builder extends Object implements software.amazon.jsii.Builder<LambdaAuthorizerConfig>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • handler

      @Stability(Experimental) public LambdaAuthorizerConfig.Builder handler(IFunction handler)
      Parameters:
      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

      Returns:
      this
    • resultsCacheTtl

      @Stability(Experimental) public LambdaAuthorizerConfig.Builder resultsCacheTtl(Duration resultsCacheTtl)
      Parameters:
      resultsCacheTtl - How long the results are cached. Disable caching by setting this to 0.
      Returns:
      this
    • validationRegex

      @Stability(Experimental) public LambdaAuthorizerConfig.Builder validationRegex(String validationRegex)
      Parameters:
      validationRegex - A regular expression for validation of tokens before the Lambda function is called.
      Returns:
      this
    • build

      @Stability(Experimental) public LambdaAuthorizerConfig build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<LambdaAuthorizerConfig>
      Returns:
      a new instance of LambdaAuthorizerConfig
      Throws:
      NullPointerException - if any required attribute was not provided