Class HttpLambdaAuthorizer.Builder
java.lang.Object
software.amazon.awscdk.services.apigatewayv2.authorizers.HttpLambdaAuthorizer.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<HttpLambdaAuthorizer>
- Enclosing class:
HttpLambdaAuthorizer
@Stability(Experimental)
public static final class HttpLambdaAuthorizer.Builder
extends Object
implements software.amazon.jsii.Builder<HttpLambdaAuthorizer>
(experimental) A fluent builder for
HttpLambdaAuthorizer
.-
Method Summary
Modifier and TypeMethodDescriptionauthorizerName
(String authorizerName) (experimental) Friendly authorizer name.build()
static HttpLambdaAuthorizer.Builder
identitySource
(List<String> identitySource) (experimental) The identity source for which authorization is requested.responseTypes
(List<? extends HttpLambdaResponseType> responseTypes) (experimental) The types of responses the lambda can return.resultsCacheTtl
(Duration resultsCacheTtl) (experimental) How long APIGateway should cache the results.
-
Method Details
-
create
@Stability(Experimental) public static HttpLambdaAuthorizer.Builder create(String id, IFunction handler) - 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
(experimental) Friendly authorizer name.Default: - same value as `id` passed in the constructor.
- Parameters:
authorizerName
- Friendly authorizer name. This parameter is required.- Returns:
this
-
identitySource
@Stability(Experimental) public HttpLambdaAuthorizer.Builder identitySource(List<String> identitySource) (experimental) 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(Experimental) public HttpLambdaAuthorizer.Builder responseTypes(List<? extends HttpLambdaResponseType> responseTypes) (experimental) 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
@Stability(Experimental) public HttpLambdaAuthorizer.Builder resultsCacheTtl(Duration resultsCacheTtl) (experimental) 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
.
-