@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-22T19:35:46.914Z")
public interface UserPoolProps
Example:
UserPool.Builder.create(this, "myuserpool") // ... .selfSignUpEnabled(true) .userVerification(UserVerificationConfig.builder() .emailSubject("Verify your email for our awesome app!") .emailBody("Thanks for signing up to our awesome app! Your verification code is {####}") .emailStyle(VerificationEmailStyle.CODE) .smsMessage("Thanks for signing up to our awesome app! Your verification code is {####}") .build()) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
UserPoolProps.Builder
A builder for
UserPoolProps |
static class |
UserPoolProps.Jsii$Proxy
An implementation for
UserPoolProps |
Modifier and Type | Method and Description |
---|---|
static UserPoolProps.Builder |
builder() |
default AccountRecovery |
getAccountRecovery()
How will a user be able to recover their account?
|
default AutoVerifiedAttrs |
getAutoVerify()
Attributes which Cognito will look to verify automatically upon user sign up.
|
default java.util.Map<java.lang.String,ICustomAttribute> |
getCustomAttributes()
Define a set of custom attributes that can be configured for each user in the user pool.
|
default IKey |
getCustomSenderKmsKey()
This key will be used to encrypt temporary passwords and authorization codes that Amazon Cognito generates.
|
default DeviceTracking |
getDeviceTracking()
Device tracking settings.
|
default UserPoolEmail |
getEmail()
Email settings for a user pool.
|
default EmailSettings |
getEmailSettings()
Deprecated.
Use 'email' instead.
|
default java.lang.Boolean |
getEnableSmsRole()
Setting this would explicitly enable or disable SMS role creation.
|
default UserPoolTriggers |
getLambdaTriggers()
Lambda functions to use for supported Cognito triggers.
|
default Mfa |
getMfa()
Configure whether users of this user pool can or are required use MFA to sign in.
|
default java.lang.String |
getMfaMessage()
The SMS message template sent during MFA verification.
|
default MfaSecondFactor |
getMfaSecondFactor()
Configure the MFA types that users can use in this user pool.
|
default PasswordPolicy |
getPasswordPolicy()
Password policy for this user pool.
|
default RemovalPolicy |
getRemovalPolicy()
Policy to apply when the user pool is removed from the stack.
|
default java.lang.Boolean |
getSelfSignUpEnabled()
Whether self sign up should be enabled.
|
default SignInAliases |
getSignInAliases()
Methods in which a user registers or signs in to a user pool.
|
default java.lang.Boolean |
getSignInCaseSensitive()
Whether sign-in aliases should be evaluated with case sensitivity.
|
default IRole |
getSmsRole()
The IAM role that Cognito will assume while sending SMS messages.
|
default java.lang.String |
getSmsRoleExternalId()
The 'ExternalId' that Cognito service must using when assuming the `smsRole`, if the role is restricted with an 'sts:ExternalId' conditional.
|
default java.lang.String |
getSnsRegion()
The region to integrate with SNS to send SMS messages.
|
default StandardAttributes |
getStandardAttributes()
The set of attributes that are required for every user in the user pool.
|
default UserInvitationConfig |
getUserInvitation()
Configuration around admins signing up users into a user pool.
|
default java.lang.String |
getUserPoolName()
Name of the user pool.
|
default UserVerificationConfig |
getUserVerification()
Configuration around users signing themselves up to the user pool.
|
default AccountRecovery getAccountRecovery()
Default: AccountRecovery.PHONE_WITHOUT_MFA_AND_EMAIL
default AutoVerifiedAttrs getAutoVerify()
EMAIL and PHONE are the only available options.
Default: - If `signInAlias` includes email and/or phone, they will be included in `autoVerifiedAttributes` by default. If absent, no attributes will be auto-verified.
default java.util.Map<java.lang.String,ICustomAttribute> getCustomAttributes()
Default: - No custom attributes.
default IKey getCustomSenderKmsKey()
Default: - no key ID configured
default DeviceTracking getDeviceTracking()
Default: - see defaults on each property of DeviceTracking.
default UserPoolEmail getEmail()
Default: - cognito will use the default email configuration
@Deprecated default EmailSettings getEmailSettings()
Default: - see defaults on each property of EmailSettings.
default java.lang.Boolean getEnableSmsRole()
When left unspecified, CDK will determine based on other properties if a role is needed or not.
Default: - CDK will determine based on other properties of the user pool if an SMS role should be created or not.
default UserPoolTriggers getLambdaTriggers()
Default: - No Lambda triggers.
default Mfa getMfa()
Default: Mfa.OFF
default java.lang.String getMfaMessage()
Use '{####}' in the template where Cognito should insert the verification code.
Default: 'Your authentication code is {####}.'
default MfaSecondFactor getMfaSecondFactor()
Ignored if mfa
is set to OFF
.
Default: - { sms: true, otp: false }, if `mfa` is set to `OPTIONAL` or `REQUIRED`. { sms: false, otp: false }, otherwise
default PasswordPolicy getPasswordPolicy()
Default: - see defaults on each property of PasswordPolicy.
default RemovalPolicy getRemovalPolicy()
Default: RemovalPolicy.RETAIN
default java.lang.Boolean getSelfSignUpEnabled()
This can be further configured via the selfSignUp
property.
Default: false
default SignInAliases getSignInAliases()
Allows either username with aliases OR sign in with email, phone, or both.
Read the sections on usernames and aliases to learn more - https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html
To match with 'Option 1' in the above link, with a verified email, this property should be set to
{ username: true, email: true }
. To match with 'Option 2' in the above link with both a verified email and phone
number, this property should be set to { email: true, phone: true }
.
Default: { username: true }
default java.lang.Boolean getSignInCaseSensitive()
For example, when this option is set to false, users will be able to sign in using either MyUsername
or myusername
.
Default: true
default IRole getSmsRole()
Default: - a new IAM role is created
default java.lang.String getSmsRoleExternalId()
Learn more about ExternalId here - https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
This property will be ignored if smsRole
is not specified.
Default: - No external id will be configured
default java.lang.String getSnsRegion()
This property will do nothing if SMS configuration is not configured
Default: - The same region as the user pool, with a few exceptions - https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-sms-settings.html#user-pool-sms-settings-first-time
default StandardAttributes getStandardAttributes()
Read more on attributes here - https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html
Default: - All standard attributes are optional and mutable.
default UserInvitationConfig getUserInvitation()
Default: - see defaults in UserInvitationConfig
default java.lang.String getUserPoolName()
Default: - automatically generated name by CloudFormation at deploy time
default UserVerificationConfig getUserVerification()
Enable or disable self sign-up via the selfSignUpEnabled
property.
Default: - see defaults in UserVerificationConfig
static UserPoolProps.Builder builder()
UserPoolProps.Builder
of UserPoolProps