IUserPool

class aws_cdk.aws_cognito.IUserPool(*args, **kwargs)

Bases: aws_cdk.core.IResource, typing_extensions.Protocol

Represents a Cognito UserPool.

stability :stability: experimental

__init__(*args, **kwargs)

Methods

add_client(id, *, auth_flows=None, disable_o_auth=None, generate_secret=None, o_auth=None, prevent_user_existence_errors=None, supported_identity_providers=None, user_pool_client_name=None)

Add a new app client to this user pool.

Parameters
  • id (str) –

  • auth_flows (Optional[AuthFlow]) – The set of OAuth authentication flows to enable on the client. Default: - all auth flows disabled

  • disable_o_auth (Optional[bool]) – Turns off all OAuth interactions for this client. Default: false

  • generate_secret (Optional[bool]) – Whether to generate a client secret. Default: false

  • o_auth (Optional[OAuthSettings]) – OAuth settings for this to client to interact with the app. An error is thrown when this is specified and disableOAuth is set. Default: - see defaults in OAuthSettings. meaningless if disableOAuth is set.

  • prevent_user_existence_errors (Optional[bool]) – Whether Cognito returns a UserNotFoundException exception when the user does not exist in the user pool (false), or whether it returns another type of error that doesn’t reveal the user’s absence. Default: true for new stacks

  • supported_identity_providers (Optional[List[UserPoolClientIdentityProvider]]) – The list of identity providers that users should be able to use to sign in using this client. Default: - supports all identity providers that are registered with the user pool. If the user pool and/or identity providers are imported, either specify this option explicitly or ensure that the identity providers are registered with the user pool using the UserPool.registerIdentityProvider() API.

  • user_pool_client_name (Optional[str]) – Name of the application client. Default: - cloudformation generated name

see :see: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-client-apps.html stability :stability: experimental

Return type

UserPoolClient

add_domain(id, *, cognito_domain=None, custom_domain=None)

Associate a domain to this user pool.

Parameters
  • id (str) –

  • cognito_domain (Optional[CognitoDomainOptions]) – Associate a cognito prefix domain with your user pool Either customDomain or cognitoDomain must be specified. Default: - not set if customDomain is specified, otherwise, throws an error.

  • custom_domain (Optional[CustomDomainOptions]) – Associate a custom domain with your user pool Either customDomain or cognitoDomain must be specified. Default: - not set if cognitoDomain is specified, otherwise, throws an error.

see :see: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-assign-domain.html stability :stability: experimental

Return type

UserPoolDomain

register_identity_provider(provider)

Register an identity provider with this user pool.

Parameters

provider (IUserPoolIdentityProvider) –

stability :stability: experimental

Return type

None

Attributes

identity_providers

Get all identity providers registered with this user pool.

stability :stability: experimental

Return type

List[IUserPoolIdentityProvider]

node

The construct tree node for this construct.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

user_pool_arn

The ARN of this user pool resource.

stability :stability: experimental attribute: :attribute:: true

Return type

str

user_pool_id

The physical ID of this user pool resource.

stability :stability: experimental attribute: :attribute:: true

Return type

str