Class HttpUserPoolAuthorizer

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigatewayv2.authorizers.HttpUserPoolAuthorizer
All Implemented Interfaces:
IHttpRouteAuthorizer, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.890Z") @Stability(Experimental) public class HttpUserPoolAuthorizer extends software.amazon.jsii.JsiiObject implements IHttpRouteAuthorizer
(experimental) Authorize Http Api routes on whether the requester is registered as part of an AWS Cognito user pool.

Example:

 import software.amazon.awscdk.services.cognito.*;
 import software.amazon.awscdk.services.apigatewayv2.authorizers.HttpUserPoolAuthorizer;
 import software.amazon.awscdk.services.apigatewayv2.integrations.HttpUrlIntegration;
 UserPool userPool = new UserPool(this, "UserPool");
 HttpUserPoolAuthorizer authorizer = new HttpUserPoolAuthorizer("BooksAuthorizer", userPool);
 HttpApi api = new HttpApi(this, "HttpApi");
 api.addRoutes(AddRoutesOptions.builder()
         .integration(new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.myproxy.internal"))
         .path("/books")
         .authorizer(authorizer)
         .build());
 
  • Constructor Details

    • HttpUserPoolAuthorizer

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

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

      @Stability(Experimental) public HttpUserPoolAuthorizer(@NotNull String id, @NotNull IUserPool pool, @Nullable HttpUserPoolAuthorizerProps props)
      (experimental) Initialize a Cognito user pool authorizer to be bound with HTTP route.

      Parameters:
      id - The id of the underlying construct. This parameter is required.
      pool - The user pool to use for authorization. This parameter is required.
      props - Properties to configure the authorizer.
    • HttpUserPoolAuthorizer

      @Stability(Experimental) public HttpUserPoolAuthorizer(@NotNull String id, @NotNull IUserPool pool)
      (experimental) Initialize a Cognito user pool authorizer to be bound with HTTP route.

      Parameters:
      id - The id of the underlying construct. This parameter is required.
      pool - The user pool to use for authorization. This parameter is required.
  • Method Details