Skip to content
v2.273.0

IUserPool Interface ​

Represents a Cognito UserPool.

Properties ​

The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

identityProvidersIUserPoolIdentityProvider[]identity_providerstyping.List[IUserPoolIdentityProvider]identityProvidersList<IUserPoolIdentityProvider>IdentityProvidersIUserPoolIdentityProvider[]IdentityProviders*[]IUserPoolIdentityProviderrequired#
Get all identity providers registered with this user pool.
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this resource is defined.
userPoolArnstringuser_pool_arnstruserPoolArnStringUserPoolArnstringUserPoolArn*stringrequired#
The ARN of this user pool resource.
userPoolIdstringuser_pool_idstruserPoolIdStringUserPoolIdstringUserPoolId*stringrequired#
The physical ID of this user pool resource.
userPoolProviderNamestringuser_pool_provider_namestruserPoolProviderNameStringUserPoolProviderNamestringUserPoolProviderName*stringrequired#
The provider name of this user pool resource.
userPoolRefUserPoolReferenceuser_pool_refUserPoolReferenceuserPoolRefUserPoolReferenceUserPoolRefUserPoolReferenceUserPoolRefUserPoolReferencerequired#
A reference to a UserPool resource.

Methods ​

addClient(id: string, options?: UserPoolClientOptions): UserPoolClientdef add_client(self, id: str, options: typing.Optional[UserPoolClientOptions] = None) -> UserPoolClientpublic UserPoolClient addClient(String id, UserPoolClientOptions options)public UserPoolClient AddClient(string id, UserPoolClientOptions? options = null)func AddClient(Id *string, Options UserPoolClientOptions) UserPoolClient#
Add a new app client to this user pool.
addDomain(id: string, options: UserPoolDomainOptions): UserPoolDomaindef add_domain(self, id: str, options: UserPoolDomainOptions) -> UserPoolDomainpublic UserPoolDomain addDomain(String id, UserPoolDomainOptions options)public UserPoolDomain AddDomain(string id, UserPoolDomainOptions options)func AddDomain(Id *string, Options UserPoolDomainOptions) UserPoolDomain#
Associate a domain to this user pool.
addGroup(id: string, options: UserPoolGroupOptions): UserPoolGroupdef add_group(self, id: str, options: UserPoolGroupOptions) -> UserPoolGrouppublic UserPoolGroup addGroup(String id, UserPoolGroupOptions options)public UserPoolGroup AddGroup(string id, UserPoolGroupOptions options)func AddGroup(Id *string, Options UserPoolGroupOptions) UserPoolGroup#
Add a new group to this user pool.
addResourceServer(id: string, options: UserPoolResourceServerOptions): UserPoolResourceServerdef add_resource_server(self, id: str, options: UserPoolResourceServerOptions) -> UserPoolResourceServerpublic UserPoolResourceServer addResourceServer(String id, UserPoolResourceServerOptions options)public UserPoolResourceServer AddResourceServer(string id, UserPoolResourceServerOptions options)func AddResourceServer(Id *string, Options UserPoolResourceServerOptions) UserPoolResourceServer#
Add a new resource server to this user pool.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

grant(grantee: IGrantable, ...actions: string[]): Grantdef grant(self, grantee: IGrantable, actions: str) -> Grantpublic Grant grant(IGrantable grantee, String actions)public Grant Grant(IGrantable grantee, string actions)func Grant(Grantee IGrantable, Actions *string) Grant#
Adds an IAM policy statement associated with this user pool to an IAM principal's policy.
registerIdentityProvider(provider: IUserPoolIdentityProviderRef): voiddef register_identity_provider(self, provider: IUserPoolIdentityProviderRef) -> Nonepublic void registerIdentityProvider(IUserPoolIdentityProviderRef provider)public void RegisterIdentityProvider(IUserPoolIdentityProviderRef provider)func RegisterIdentityProvider(Provider IUserPoolIdentityProviderRef)#
Register an identity provider with this user pool.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining