interface IUserPool
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Cognito.IUserPool |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscognito#IUserPool |
Java | software.amazon.awscdk.services.cognito.IUserPool |
Python | aws_cdk.aws_cognito.IUserPool |
TypeScript (source) | aws-cdk-lib » aws_cognito » IUserPool |
Implemented by
User
Obtainable from
User
.fromUserPoolArn()
, User
.fromUserPoolId()
Represents a Cognito UserPool.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
identity | IUser [] | Get all identity providers registered with this user pool. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
user | string | The ARN of this user pool resource. |
user | string | The physical ID of this user pool resource. |
user | string | The provider name of this user pool resource. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
identityProviders
Type:
IUser
[]
Get all identity providers registered with this user pool.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
userPoolArn
Type:
string
The ARN of this user pool resource.
userPoolId
Type:
string
The physical ID of this user pool resource.
userPoolProviderName
Type:
string
The provider name of this user pool resource.
Methods
Name | Description |
---|---|
add | Add a new app client to this user pool. |
add | Associate a domain to this user pool. |
add | Add a new group to this user pool. |
add | Add a new resource server to this user pool. |
apply | Apply the given removal policy to this resource. |
grant(grantee, ...actions) | Adds an IAM policy statement associated with this user pool to an IAM principal's policy. |
register | Register an identity provider with this user pool. |
Client(id, options?)
addpublic addClient(id: string, options?: UserPoolClientOptions): UserPoolClient
Parameters
- id
string
- options
User
Pool Client Options
Returns
Add a new app client to this user pool.
See also: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-client-apps.html
Domain(id, options)
addpublic addDomain(id: string, options: UserPoolDomainOptions): UserPoolDomain
Parameters
- id
string
- options
User
Pool Domain Options
Returns
Associate a domain to this user pool.
See also: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-assign-domain.html
Group(id, options)
addpublic addGroup(id: string, options: UserPoolGroupOptions): UserPoolGroup
Parameters
- id
string
- options
User
Pool Group Options
Returns
Add a new group to this user pool.
See also: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-user-groups.html
ResourceServer(id, options)
addpublic addResourceServer(id: string, options: UserPoolResourceServerOptions): UserPoolResourceServer
Parameters
- id
string
- options
User
Pool Resource Server Options
Returns
Add a new resource server to this user pool.
See also: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-resource-servers.html
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
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, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable
- actions
string
Returns
Adds an IAM policy statement associated with this user pool to an IAM principal's policy.
IdentityProvider(provider)
registerpublic registerIdentityProvider(provider: IUserPoolIdentityProvider): void
Parameters
- provider
IUser
Pool Identity Provider
Register an identity provider with this user pool.