Class CfnUserPool.PasswordPolicyProperty.Builder
java.lang.Object
software.amazon.awscdk.services.cognito.CfnUserPool.PasswordPolicyProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnUserPool.PasswordPolicyProperty>
- Enclosing interface:
CfnUserPool.PasswordPolicyProperty
@Stability(Stable)
public static final class CfnUserPool.PasswordPolicyProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnUserPool.PasswordPolicyProperty>
A builder for
CfnUserPool.PasswordPolicyProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.minimumLength(Number minimumLength) Sets the value ofCfnUserPool.PasswordPolicyProperty.getMinimumLength()passwordHistorySize(Number passwordHistorySize) Sets the value ofCfnUserPool.PasswordPolicyProperty.getPasswordHistorySize()requireLowercase(Boolean requireLowercase) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireLowercase()requireLowercase(IResolvable requireLowercase) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireLowercase()requireNumbers(Boolean requireNumbers) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireNumbers()requireNumbers(IResolvable requireNumbers) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireNumbers()requireSymbols(Boolean requireSymbols) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireSymbols()requireSymbols(IResolvable requireSymbols) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireSymbols()requireUppercase(Boolean requireUppercase) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireUppercase()requireUppercase(IResolvable requireUppercase) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireUppercase()temporaryPasswordValidityDays(Number temporaryPasswordValidityDays) Sets the value ofCfnUserPool.PasswordPolicyProperty.getTemporaryPasswordValidityDays()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
minimumLength
@Stability(Stable) public CfnUserPool.PasswordPolicyProperty.Builder minimumLength(Number minimumLength) Sets the value ofCfnUserPool.PasswordPolicyProperty.getMinimumLength()- Parameters:
minimumLength- The minimum length of the password in the policy that you have set. This value can't be less than 6.- Returns:
this
-
passwordHistorySize
@Stability(Stable) public CfnUserPool.PasswordPolicyProperty.Builder passwordHistorySize(Number passwordHistorySize) Sets the value ofCfnUserPool.PasswordPolicyProperty.getPasswordHistorySize()- Parameters:
passwordHistorySize- The number of previous passwords that you want Amazon Cognito to restrict each user from reusing. Users can't set a password that matches any ofnprevious passwords, wherenis the value ofPasswordHistorySize.- Returns:
this
-
requireLowercase
@Stability(Stable) public CfnUserPool.PasswordPolicyProperty.Builder requireLowercase(Boolean requireLowercase) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireLowercase()- Parameters:
requireLowercase- The requirement in a password policy that users must include at least one lowercase letter in their password.- Returns:
this
-
requireLowercase
@Stability(Stable) public CfnUserPool.PasswordPolicyProperty.Builder requireLowercase(IResolvable requireLowercase) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireLowercase()- Parameters:
requireLowercase- The requirement in a password policy that users must include at least one lowercase letter in their password.- Returns:
this
-
requireNumbers
@Stability(Stable) public CfnUserPool.PasswordPolicyProperty.Builder requireNumbers(Boolean requireNumbers) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireNumbers()- Parameters:
requireNumbers- The requirement in a password policy that users must include at least one number in their password.- Returns:
this
-
requireNumbers
@Stability(Stable) public CfnUserPool.PasswordPolicyProperty.Builder requireNumbers(IResolvable requireNumbers) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireNumbers()- Parameters:
requireNumbers- The requirement in a password policy that users must include at least one number in their password.- Returns:
this
-
requireSymbols
@Stability(Stable) public CfnUserPool.PasswordPolicyProperty.Builder requireSymbols(Boolean requireSymbols) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireSymbols()- Parameters:
requireSymbols- The requirement in a password policy that users must include at least one symbol in their password.- Returns:
this
-
requireSymbols
@Stability(Stable) public CfnUserPool.PasswordPolicyProperty.Builder requireSymbols(IResolvable requireSymbols) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireSymbols()- Parameters:
requireSymbols- The requirement in a password policy that users must include at least one symbol in their password.- Returns:
this
-
requireUppercase
@Stability(Stable) public CfnUserPool.PasswordPolicyProperty.Builder requireUppercase(Boolean requireUppercase) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireUppercase()- Parameters:
requireUppercase- The requirement in a password policy that users must include at least one uppercase letter in their password.- Returns:
this
-
requireUppercase
@Stability(Stable) public CfnUserPool.PasswordPolicyProperty.Builder requireUppercase(IResolvable requireUppercase) Sets the value ofCfnUserPool.PasswordPolicyProperty.getRequireUppercase()- Parameters:
requireUppercase- The requirement in a password policy that users must include at least one uppercase letter in their password.- Returns:
this
-
temporaryPasswordValidityDays
@Stability(Stable) public CfnUserPool.PasswordPolicyProperty.Builder temporaryPasswordValidityDays(Number temporaryPasswordValidityDays) Sets the value ofCfnUserPool.PasswordPolicyProperty.getTemporaryPasswordValidityDays()- Parameters:
temporaryPasswordValidityDays- The number of days a temporary password is valid in the password policy. If the user doesn't sign in during this time, an administrator must reset their password. Defaults to7. If you submit a value of0, Amazon Cognito treats it as a null value and setsTemporaryPasswordValidityDaysto its default value.When you set
TemporaryPasswordValidityDaysfor a user pool, you can no longer set a value for the legacyUnusedAccountValidityDaysparameter in that user pool.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnUserPool.PasswordPolicyProperty>- Returns:
- a new instance of
CfnUserPool.PasswordPolicyProperty - Throws:
NullPointerException- if any required attribute was not provided
-