aws-cdk-lib.aws_cognito.IUserPool

interface IUserPool

LanguageType name
.NETAmazon.CDK.AWS.Cognito.IUserPool
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscognito#IUserPool
Javasoftware.amazon.awscdk.services.cognito.IUserPool
Pythonaws_cdk.aws_cognito.IUserPool
TypeScript (source)aws-cdk-lib » aws_cognito » IUserPool

Implemented by UserPool

Obtainable from UserPool.fromUserPoolArn(), UserPool.fromUserPoolId()

Represents a Cognito UserPool.

Properties

NameTypeDescription
envResourceEnvironmentThe environment this resource belongs to.
identityProvidersIUserPoolIdentityProvider[]Get all identity providers registered with this user pool.
nodeNodeThe tree node.
stackStackThe stack in which this resource is defined.
userPoolArnstringThe ARN of this user pool resource.
userPoolIdstringThe physical ID of this user pool resource.

env

Type: ResourceEnvironment

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: IUserPoolIdentityProvider[]

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.

Methods

NameDescription
addClient(id, options?)Add a new app client to this user pool.
addDomain(id, options)Associate a domain to this user pool.
addResourceServer(id, options)Add a new resource server to this user pool.
applyRemovalPolicy(policy)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.
registerIdentityProvider(provider)Register an identity provider with this user pool.

addClient(id, options?)

public addClient(id: string, options?: UserPoolClientOptions): UserPoolClient

Parameters

  • id string
  • options UserPoolClientOptions

Returns

  • UserPoolClient

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


addDomain(id, options)

public addDomain(id: string, options: UserPoolDomainOptions): UserPoolDomain

Parameters

  • id string
  • options UserPoolDomainOptions

Returns

  • UserPoolDomain

Associate a domain to this user pool.

See also: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-assign-domain.html


addResourceServer(id, options)

public addResourceServer(id: string, options: UserPoolResourceServerOptions): UserPoolResourceServer

Parameters

  • id string
  • options UserPoolResourceServerOptions

Returns

  • UserPoolResourceServer

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


applyRemovalPolicy(policy)

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

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

  • Grant

Adds an IAM policy statement associated with this user pool to an IAM principal's policy.


registerIdentityProvider(provider)

public registerIdentityProvider(provider: IUserPoolIdentityProvider): void

Parameters

  • provider IUserPoolIdentityProvider

Register an identity provider with this user pool.