Class UserPool
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cognito.UserPool
- All Implemented Interfaces:
IResource
,IUserPool
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2025-01-15T21:09:16.688Z")
@Stability(Stable)
public class UserPool
extends Resource
implements IUserPool
Define a Cognito User Pool.
Example:
UserPool pool = new UserPool(this, "Pool"); pool.addClient("app-client", UserPoolClientOptions.builder() .oAuth(OAuthSettings.builder() .flows(OAuthFlows.builder() .authorizationCodeGrant(true) .build()) .scopes(List.of(OAuthScope.OPENID)) .callbackUrls(List.of("https://my-app-domain.com/welcome")) .logoutUrls(List.of("https://my-app-domain.com/signin")) .build()) .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.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.cognito.IUserPool
IUserPool.Jsii$Default, IUserPool.Jsii$Proxy
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
UserPool
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
UserPool
(software.amazon.jsii.JsiiObjectRef objRef) UserPool
(software.constructs.Construct scope, String id, UserPoolProps props) -
Method Summary
Modifier and TypeMethodDescriptionAdd a new app client to this user pool.addClient
(String id, UserPoolClientOptions options) Add a new app client to this user pool.addDomain
(String id, UserPoolDomainOptions options) Associate a domain to this user pool.addGroup
(String id, UserPoolGroupOptions options) Add a new group to this user pool.addResourceServer
(String id, UserPoolResourceServerOptions options) Add a new resource server to this user pool.void
addTrigger
(UserPoolOperation operation, IFunction fn) Add a lambda trigger to a user pool operation.void
addTrigger
(UserPoolOperation operation, IFunction fn, LambdaVersion lambdaVersion) Add a lambda trigger to a user pool operation.static IUserPool
fromUserPoolArn
(software.constructs.Construct scope, String id, String userPoolArn) Import an existing user pool based on its ARN.static IUserPool
fromUserPoolId
(software.constructs.Construct scope, String id, String userPoolId) Import an existing user pool based on its id.Get all identity providers registered with this user pool.The ARN of the user pool.The physical ID of this user pool resource.User pool provider name.User pool provider URL.grant
(IGrantable grantee, @NotNull String... actions) Adds an IAM policy statement associated with this user pool to an IAM principal's policy.void
Register an identity provider with this user pool.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
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, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
UserPool
protected UserPool(software.amazon.jsii.JsiiObjectRef objRef) -
UserPool
protected UserPool(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
UserPool
@Stability(Stable) public UserPool(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable UserPoolProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
UserPool
@Stability(Stable) public UserPool(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Details
-
fromUserPoolArn
@Stability(Stable) @NotNull public static IUserPool fromUserPoolArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String userPoolArn) Import an existing user pool based on its ARN.- Parameters:
scope
- This parameter is required.id
- This parameter is required.userPoolArn
- This parameter is required.
-
fromUserPoolId
@Stability(Stable) @NotNull public static IUserPool fromUserPoolId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String userPoolId) Import an existing user pool based on its id.- Parameters:
scope
- This parameter is required.id
- This parameter is required.userPoolId
- This parameter is required.
-
addClient
@Stability(Stable) @NotNull public UserPoolClient addClient(@NotNull String id, @Nullable UserPoolClientOptions options) Add a new app client to this user pool. -
addClient
Add a new app client to this user pool. -
addDomain
@Stability(Stable) @NotNull public UserPoolDomain addDomain(@NotNull String id, @NotNull UserPoolDomainOptions options) Associate a domain to this user pool. -
addGroup
@Stability(Stable) @NotNull public UserPoolGroup addGroup(@NotNull String id, @NotNull UserPoolGroupOptions options) Add a new group to this user pool. -
addResourceServer
@Stability(Stable) @NotNull public UserPoolResourceServer addResourceServer(@NotNull String id, @NotNull UserPoolResourceServerOptions options) Add a new resource server to this user pool.- Specified by:
addResourceServer
in interfaceIUserPool
- Parameters:
id
- This parameter is required.options
- This parameter is required.- See Also:
-
addTrigger
@Stability(Stable) public void addTrigger(@NotNull UserPoolOperation operation, @NotNull IFunction fn, @Nullable LambdaVersion lambdaVersion) Add a lambda trigger to a user pool operation.- Parameters:
operation
- This parameter is required.fn
- This parameter is required.lambdaVersion
-- See Also:
-
addTrigger
@Stability(Stable) public void addTrigger(@NotNull UserPoolOperation operation, @NotNull IFunction fn) Add a lambda trigger to a user pool operation.- Parameters:
operation
- This parameter is required.fn
- This parameter is required.- See Also:
-
grant
@Stability(Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull @NotNull String... actions) Adds an IAM policy statement associated with this user pool to an IAM principal's policy. -
registerIdentityProvider
@Stability(Stable) public void registerIdentityProvider(@NotNull IUserPoolIdentityProvider provider) Register an identity provider with this user pool.- Specified by:
registerIdentityProvider
in interfaceIUserPool
- Parameters:
provider
- This parameter is required.
-
getIdentityProviders
Get all identity providers registered with this user pool.- Specified by:
getIdentityProviders
in interfaceIUserPool
-
getUserPoolArn
The ARN of the user pool.- Specified by:
getUserPoolArn
in interfaceIUserPool
-
getUserPoolId
The physical ID of this user pool resource.- Specified by:
getUserPoolId
in interfaceIUserPool
-
getUserPoolProviderName
User pool provider name.- Specified by:
getUserPoolProviderName
in interfaceIUserPool
-
getUserPoolProviderUrl
User pool provider URL.
-