Class LambdaAuthorizerProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.LambdaAuthorizerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LambdaAuthorizerProps>
- Enclosing interface:
- LambdaAuthorizerProps
@Stability(Stable)
public static final class LambdaAuthorizerProps.Builder
extends Object
implements software.amazon.jsii.Builder<LambdaAuthorizerProps>
A builder for
LambdaAuthorizerProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassumeRole(IRole assumeRole) Sets the value ofLambdaAuthorizerProps.getAssumeRole()authorizerName(String authorizerName) Sets the value ofLambdaAuthorizerProps.getAuthorizerName()build()Builds the configured instance.Sets the value ofLambdaAuthorizerProps.getHandler()resultsCacheTtl(Duration resultsCacheTtl) Sets the value ofLambdaAuthorizerProps.getResultsCacheTtl()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
handler
Sets the value ofLambdaAuthorizerProps.getHandler()- Parameters:
handler- The handler for the authorizer lambda function. This parameter is required. 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 {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-input.html | here} and output specification {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html | here}.- Returns:
this
-
assumeRole
Sets the value ofLambdaAuthorizerProps.getAssumeRole()- Parameters:
assumeRole- An optional IAM role for APIGateway to assume before calling the Lambda-based authorizer. The IAM role must be assumable by 'apigateway.amazonaws.com'.- Returns:
this
-
authorizerName
Sets the value ofLambdaAuthorizerProps.getAuthorizerName()- Parameters:
authorizerName- An optional human friendly name for the authorizer. Note that, this is not the primary identifier of the authorizer.- Returns:
this
-
resultsCacheTtl
Sets the value ofLambdaAuthorizerProps.getResultsCacheTtl()- Parameters:
resultsCacheTtl- How long APIGateway should cache the results. Max 1 hour. Disable caching by setting this to 0.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LambdaAuthorizerProps>- Returns:
- a new instance of
LambdaAuthorizerProps - Throws:
NullPointerException- if any required attribute was not provided
-