Class HttpLambdaAuthorizer.Builder
java.lang.Object
software.amazon.awscdk.aws_apigatewayv2_authorizers.HttpLambdaAuthorizer.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<HttpLambdaAuthorizer>
- Enclosing class:
HttpLambdaAuthorizer
@Stability(Stable)
public static final class HttpLambdaAuthorizer.Builder
extends Object
implements software.amazon.jsii.Builder<HttpLambdaAuthorizer>
A fluent builder for
HttpLambdaAuthorizer
.-
Method Summary
Modifier and TypeMethodDescriptionauthorizerName
(String authorizerName) Friendly authorizer name.build()
static HttpLambdaAuthorizer.Builder
identitySource
(List<String> identitySource) The identity source for which authorization is requested.responseTypes
(List<? extends HttpLambdaResponseType> responseTypes) The types of responses the lambda can return.resultsCacheTtl
(Duration resultsCacheTtl) How long APIGateway should cache the results.
-
Method Details
-
create
- Parameters:
id
- The id of the underlying construct. This parameter is required.handler
- This parameter is required.- Returns:
- a new instance of
HttpLambdaAuthorizer.Builder
.
-
authorizerName
Friendly authorizer name.Default: - same value as `id` passed in the constructor.
- Parameters:
authorizerName
- Friendly authorizer name. This parameter is required.- Returns:
this
-
identitySource
The identity source for which authorization is requested.Default: ['$request.header.Authorization']
- Parameters:
identitySource
- The identity source for which authorization is requested. This parameter is required.- Returns:
this
-
responseTypes
@Stability(Stable) public HttpLambdaAuthorizer.Builder responseTypes(List<? extends HttpLambdaResponseType> responseTypes) The types of responses the lambda can return.If HttpLambdaResponseType.SIMPLE is included then response format 2.0 will be used.
Default: [HttpLambdaResponseType.IAM]
- Parameters:
responseTypes
- The types of responses the lambda can return. This parameter is required.- Returns:
this
- See Also:
-
resultsCacheTtl
How long APIGateway should cache the results.Max 1 hour. Disable caching by setting this to
Duration.seconds(0)
.Default: Duration.minutes(5)
- Parameters:
resultsCacheTtl
- How long APIGateway should cache the results. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<HttpLambdaAuthorizer>
- Returns:
- a newly built instance of
HttpLambdaAuthorizer
.
-