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 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

      @Stability(Experimental) public HttpLambdaAuthorizer.Builder authorizerName(String 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

      @Stability(Experimental) public HttpLambdaAuthorizer build()
      Specified by:
      build in interface software.amazon.jsii.Builder<HttpLambdaAuthorizer>
      Returns:
      a newly built instance of HttpLambdaAuthorizer.