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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:11.885Z") @Stability(Stable) public interface LambdaAuthorizerProps extends software.amazon.jsii.JsiiSerializable
Base properties for all lambda authorizers.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.apigateway.*;
 import software.amazon.awscdk.services.iam.*;
 import software.amazon.awscdk.services.lambda.*;
 Function function_;
 Role role;
 LambdaAuthorizerProps lambdaAuthorizerProps = LambdaAuthorizerProps.builder()
         .handler(function_)
         // the properties below are optional
         .assumeRole(role)
         .authorizerName("authorizerName")
         .resultsCacheTtl(Duration.minutes(30))
         .build();
 
  • Method Details

    • getHandler

      @Stability(Stable) @NotNull IFunction 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 and output specification.

    • getAssumeRole

      @Stability(Stable) @Nullable default IRole 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

      @Stability(Stable) @Nullable default String getAuthorizerName()
      An optional human friendly name for the authorizer.

      Note that, this is not the primary identifier of the authorizer.

      Default: - the unique construct ID

    • getResultsCacheTtl

      @Stability(Stable) @Nullable default Duration getResultsCacheTtl()
      How long APIGateway should cache the results.

      Max 1 hour. Disable caching by setting this to 0.

      Default: - Duration.minutes(5)

    • builder

      @Stability(Stable) static LambdaAuthorizerProps.Builder builder()
      Returns:
      a LambdaAuthorizerProps.Builder of LambdaAuthorizerProps