Interface HttpAuthorizerProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
HttpAuthorizerProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.254Z") @Stability(Experimental) public interface HttpAuthorizerProps extends software.amazon.jsii.JsiiSerializable
(experimental) Properties to initialize an instance of HttpAuthorizer.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.apigatewayv2.*;
 import software.amazon.awscdk.core.*;
 HttpApi httpApi;
 HttpAuthorizerProps httpAuthorizerProps = HttpAuthorizerProps.builder()
         .httpApi(httpApi)
         .identitySource(List.of("identitySource"))
         .type(HttpAuthorizerType.IAM)
         // the properties below are optional
         .authorizerName("authorizerName")
         .authorizerUri("authorizerUri")
         .enableSimpleResponses(false)
         .jwtAudience(List.of("jwtAudience"))
         .jwtIssuer("jwtIssuer")
         .payloadFormatVersion(AuthorizerPayloadVersion.VERSION_1_0)
         .resultsCacheTtl(Duration.minutes(30))
         .build();
 
  • Method Details

    • getHttpApi

      @Stability(Experimental) @NotNull IHttpApi getHttpApi()
      (experimental) HTTP Api to attach the authorizer to.
    • getIdentitySource

      @Stability(Experimental) @NotNull List<String> getIdentitySource()
      (experimental) The identity source for which authorization is requested.

      See Also:
    • getType

      @Stability(Experimental) @NotNull HttpAuthorizerType getType()
      (experimental) The type of authorizer.
    • getAuthorizerName

      @Stability(Experimental) @Nullable default String getAuthorizerName()
      (experimental) Name of the authorizer.

      Default: - id of the HttpAuthorizer construct.

    • getAuthorizerUri

      @Stability(Experimental) @Nullable default String getAuthorizerUri()
      (experimental) The authorizer's Uniform Resource Identifier (URI).

      For REQUEST authorizers, this must be a well-formed Lambda function URI.

      Default: - required for Request authorizer types

    • getEnableSimpleResponses

      @Stability(Experimental) @Nullable default Boolean getEnableSimpleResponses()
      (experimental) Specifies whether a Lambda authorizer returns a response in a simple format.

      If enabled, the Lambda authorizer can return a boolean value instead of an IAM policy.

      Default: - The lambda authorizer must return an IAM policy as its response

    • getJwtAudience

      @Stability(Experimental) @Nullable default List<String> getJwtAudience()
      (experimental) A list of the intended recipients of the JWT.

      A valid JWT must provide an aud that matches at least one entry in this list.

      Default: - required for JWT authorizer typess.

    • getJwtIssuer

      @Stability(Experimental) @Nullable default String getJwtIssuer()
      (experimental) The base domain of the identity provider that issues JWT.

      Default: - required for JWT authorizer types.

    • getPayloadFormatVersion

      @Stability(Experimental) @Nullable default AuthorizerPayloadVersion getPayloadFormatVersion()
      (experimental) Specifies the format of the payload sent to an HTTP API Lambda authorizer.

      Default: AuthorizerPayloadVersion.VERSION_2_0 if the authorizer type is HttpAuthorizerType.LAMBDA

    • getResultsCacheTtl

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

      Max 1 hour.

      Default: - API Gateway will not cache authorizer responses

    • builder

      @Stability(Experimental) static HttpAuthorizerProps.Builder builder()
      Returns:
      a HttpAuthorizerProps.Builder of HttpAuthorizerProps