Class HttpUserPoolAuthorizer
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.aws_apigatewayv2_authorizers.HttpUserPoolAuthorizer
- All Implemented Interfaces:
IHttpRouteAuthorizer
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.106.0 (build e852934)",
date="2025-02-12T12:31:57.397Z")
@Stability(Stable)
public class HttpUserPoolAuthorizer
extends software.amazon.jsii.JsiiObject
implements IHttpRouteAuthorizer
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.aws_apigatewayv2_authorizers.HttpUserPoolAuthorizer; import software.amazon.awscdk.aws_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.example.com")) .path("/books") .authorizer(authorizer) .build());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.apigatewayv2.IHttpRouteAuthorizer
IHttpRouteAuthorizer.Jsii$Default, IHttpRouteAuthorizer.Jsii$Proxy
-
Constructor Summary
ConstructorsModifierConstructorDescriptionHttpUserPoolAuthorizer
(String id, IUserPool pool) Initialize a Cognito user pool authorizer to be bound with HTTP route.HttpUserPoolAuthorizer
(String id, IUserPool pool, HttpUserPoolAuthorizerProps props) Initialize a Cognito user pool authorizer to be bound with HTTP route.protected
HttpUserPoolAuthorizer
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
HttpUserPoolAuthorizer
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind
(HttpRouteAuthorizerBindOptions options) Bind this authorizer to a specified Http route.The authorizationType used for UserPool Authorizer.Return the id of the authorizer if it's been constructed.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
HttpUserPoolAuthorizer
protected HttpUserPoolAuthorizer(software.amazon.jsii.JsiiObjectRef objRef) -
HttpUserPoolAuthorizer
protected HttpUserPoolAuthorizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
HttpUserPoolAuthorizer
@Stability(Stable) public HttpUserPoolAuthorizer(@NotNull String id, @NotNull IUserPool pool, @Nullable HttpUserPoolAuthorizerProps props) 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
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
-
bind
@Stability(Stable) @NotNull public HttpRouteAuthorizerConfig bind(@NotNull HttpRouteAuthorizerBindOptions options) Bind this authorizer to a specified Http route.- Specified by:
bind
in interfaceIHttpRouteAuthorizer
- Parameters:
options
- This parameter is required.
-
getAuthorizationType
The authorizationType used for UserPool Authorizer. -
getAuthorizerId
Return the id of the authorizer if it's been constructed.
-