Class HttpAuthorizer

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.apigatewayv2.HttpAuthorizer
All Implemented Interfaces:
IResource, IAuthorizer, IHttpAuthorizer, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:12.050Z") @Stability(Stable) public class HttpAuthorizer extends Resource implements IHttpAuthorizer
An authorizer for Http Apis.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.apigatewayv2.*;
 HttpApi httpApi;
 HttpAuthorizer httpAuthorizer = HttpAuthorizer.Builder.create(this, "MyHttpAuthorizer")
         .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();
 
  • Constructor Details

    • HttpAuthorizer

      protected HttpAuthorizer(software.amazon.jsii.JsiiObjectRef objRef)
    • HttpAuthorizer

      protected HttpAuthorizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • HttpAuthorizer

      @Stability(Stable) public HttpAuthorizer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HttpAuthorizerProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromHttpAuthorizerAttributes

      @Stability(Stable) @NotNull public static IHttpRouteAuthorizer fromHttpAuthorizerAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HttpAuthorizerAttributes attrs)
      Import an existing HTTP Authorizer into this CDK app.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • getAuthorizerId

      @Stability(Stable) @NotNull public String getAuthorizerId()
      Id of the Authorizer.
      Specified by:
      getAuthorizerId in interface IAuthorizer