Class UserPoolProps.Builder
java.lang.Object
software.amazon.awscdk.services.cognito.UserPoolProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<UserPoolProps>
- Enclosing interface:
- UserPoolProps
@Stability(Stable)
public static final class UserPoolProps.Builder
extends Object
implements software.amazon.jsii.Builder<UserPoolProps>
A builder for
UserPoolProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccountRecovery(AccountRecovery accountRecovery) Sets the value ofUserPoolProps.getAccountRecovery()autoVerify(AutoVerifiedAttrs autoVerify) Sets the value ofUserPoolProps.getAutoVerify()build()Builds the configured instance.customAttributes(Map<String, ? extends ICustomAttribute> customAttributes) Sets the value ofUserPoolProps.getCustomAttributes()customSenderKmsKey(IKey customSenderKmsKey) Sets the value ofUserPoolProps.getCustomSenderKmsKey()deviceTracking(DeviceTracking deviceTracking) Sets the value ofUserPoolProps.getDeviceTracking()email(UserPoolEmail email) Sets the value ofUserPoolProps.getEmail()emailSettings(EmailSettings emailSettings) Deprecated.Use 'email' instead.enableSmsRole(Boolean enableSmsRole) Sets the value ofUserPoolProps.getEnableSmsRole()lambdaTriggers(UserPoolTriggers lambdaTriggers) Sets the value ofUserPoolProps.getLambdaTriggers()Sets the value ofUserPoolProps.getMfa()mfaMessage(String mfaMessage) Sets the value ofUserPoolProps.getMfaMessage()mfaSecondFactor(MfaSecondFactor mfaSecondFactor) Sets the value ofUserPoolProps.getMfaSecondFactor()passwordPolicy(PasswordPolicy passwordPolicy) Sets the value ofUserPoolProps.getPasswordPolicy()removalPolicy(RemovalPolicy removalPolicy) Sets the value ofUserPoolProps.getRemovalPolicy()selfSignUpEnabled(Boolean selfSignUpEnabled) Sets the value ofUserPoolProps.getSelfSignUpEnabled()signInAliases(SignInAliases signInAliases) Sets the value ofUserPoolProps.getSignInAliases()signInCaseSensitive(Boolean signInCaseSensitive) Sets the value ofUserPoolProps.getSignInCaseSensitive()Sets the value ofUserPoolProps.getSmsRole()smsRoleExternalId(String smsRoleExternalId) Sets the value ofUserPoolProps.getSmsRoleExternalId()Sets the value ofUserPoolProps.getSnsRegion()standardAttributes(StandardAttributes standardAttributes) Sets the value ofUserPoolProps.getStandardAttributes()userInvitation(UserInvitationConfig userInvitation) Sets the value ofUserPoolProps.getUserInvitation()userPoolName(String userPoolName) Sets the value ofUserPoolProps.getUserPoolName()userVerification(UserVerificationConfig userVerification) Sets the value ofUserPoolProps.getUserVerification()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
accountRecovery
Sets the value ofUserPoolProps.getAccountRecovery()- Parameters:
accountRecovery- How will a user be able to recover their account?.- Returns:
this
-
autoVerify
Sets the value ofUserPoolProps.getAutoVerify()- Parameters:
autoVerify- Attributes which Cognito will look to verify automatically upon user sign up. EMAIL and PHONE are the only available options.- Returns:
this
-
customAttributes
@Stability(Stable) public UserPoolProps.Builder customAttributes(Map<String, ? extends ICustomAttribute> customAttributes) Sets the value ofUserPoolProps.getCustomAttributes()- Parameters:
customAttributes- Define a set of custom attributes that can be configured for each user in the user pool.- Returns:
this
-
customSenderKmsKey
Sets the value ofUserPoolProps.getCustomSenderKmsKey()- Parameters:
customSenderKmsKey- This key will be used to encrypt temporary passwords and authorization codes that Amazon Cognito generates.- Returns:
this
-
deviceTracking
Sets the value ofUserPoolProps.getDeviceTracking()- Parameters:
deviceTracking- Device tracking settings.- Returns:
this
-
email
Sets the value ofUserPoolProps.getEmail()- Parameters:
email- Email settings for a user pool.- Returns:
this
-
emailSettings
@Stability(Deprecated) @Deprecated public UserPoolProps.Builder emailSettings(EmailSettings emailSettings) Deprecated.Use 'email' instead.Sets the value ofUserPoolProps.getEmailSettings()- Parameters:
emailSettings- Email settings for a user pool.- Returns:
this
-
enableSmsRole
Sets the value ofUserPoolProps.getEnableSmsRole()- Parameters:
enableSmsRole- Setting this would explicitly enable or disable SMS role creation. When left unspecified, CDK will determine based on other properties if a role is needed or not.- Returns:
this
-
lambdaTriggers
Sets the value ofUserPoolProps.getLambdaTriggers()- Parameters:
lambdaTriggers- Lambda functions to use for supported Cognito triggers.- Returns:
this
-
mfa
Sets the value ofUserPoolProps.getMfa()- Parameters:
mfa- Configure whether users of this user pool can or are required use MFA to sign in.- Returns:
this
-
mfaMessage
Sets the value ofUserPoolProps.getMfaMessage()- Parameters:
mfaMessage- The SMS message template sent during MFA verification. Use '{####}' in the template where Cognito should insert the verification code.- Returns:
this
-
mfaSecondFactor
Sets the value ofUserPoolProps.getMfaSecondFactor()- Parameters:
mfaSecondFactor- Configure the MFA types that users can use in this user pool. Ignored ifmfais set toOFF.- Returns:
this
-
passwordPolicy
Sets the value ofUserPoolProps.getPasswordPolicy()- Parameters:
passwordPolicy- Password policy for this user pool.- Returns:
this
-
removalPolicy
Sets the value ofUserPoolProps.getRemovalPolicy()- Parameters:
removalPolicy- Policy to apply when the user pool is removed from the stack.- Returns:
this
-
selfSignUpEnabled
Sets the value ofUserPoolProps.getSelfSignUpEnabled()- Parameters:
selfSignUpEnabled- Whether self sign up should be enabled. This can be further configured via theselfSignUpproperty.- Returns:
this
-
signInAliases
Sets the value ofUserPoolProps.getSignInAliases()- Parameters:
signInAliases- Methods in which a user registers or signs in to a user pool. 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 }.- Returns:
this
-
signInCaseSensitive
Sets the value ofUserPoolProps.getSignInCaseSensitive()- Parameters:
signInCaseSensitive- Whether sign-in aliases should be evaluated with case sensitivity. For example, when this option is set to false, users will be able to sign in using eitherMyUsernameormyusername.- Returns:
this
-
smsRole
Sets the value ofUserPoolProps.getSmsRole()- Parameters:
smsRole- The IAM role that Cognito will assume while sending SMS messages.- Returns:
this
-
smsRoleExternalId
Sets the value ofUserPoolProps.getSmsRoleExternalId()- Parameters:
smsRoleExternalId- The 'ExternalId' that Cognito service must using when assuming thesmsRole, if the role is restricted with an 'sts:ExternalId' conditional. Learn more about ExternalId here - https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.htmlThis property will be ignored if
smsRoleis not specified.- Returns:
this
-
snsRegion
Sets the value ofUserPoolProps.getSnsRegion()- Parameters:
snsRegion- The region to integrate with SNS to send SMS messages. This property will do nothing if SMS configuration is not configured- Returns:
this
-
standardAttributes
@Stability(Stable) public UserPoolProps.Builder standardAttributes(StandardAttributes standardAttributes) Sets the value ofUserPoolProps.getStandardAttributes()- Parameters:
standardAttributes- The set of attributes that are required for every user in the user pool. Read more on attributes here - https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html- Returns:
this
-
userInvitation
Sets the value ofUserPoolProps.getUserInvitation()- Parameters:
userInvitation- Configuration around admins signing up users into a user pool.- Returns:
this
-
userPoolName
Sets the value ofUserPoolProps.getUserPoolName()- Parameters:
userPoolName- Name of the user pool.- Returns:
this
-
userVerification
@Stability(Stable) public UserPoolProps.Builder userVerification(UserVerificationConfig userVerification) Sets the value ofUserPoolProps.getUserVerification()- Parameters:
userVerification- Configuration around users signing themselves up to the user pool. Enable or disable self sign-up via theselfSignUpEnabledproperty.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<UserPoolProps>- Returns:
- a new instance of
UserPoolProps - Throws:
NullPointerException- if any required attribute was not provided
-