Class CfnUserPool.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnUserPool>
- Enclosing class:
- CfnUserPool
CfnUserPool
.-
Method Summary
Modifier and TypeMethodDescriptionaccountRecoverySetting
(IResolvable accountRecoverySetting) Use this setting to define which verified available method a user can use to recover their password when they callForgotPassword
.accountRecoverySetting
(CfnUserPool.AccountRecoverySettingProperty accountRecoverySetting) Use this setting to define which verified available method a user can use to recover their password when they callForgotPassword
.adminCreateUserConfig
(IResolvable adminCreateUserConfig) The configuration for creating a new user profile.adminCreateUserConfig
(CfnUserPool.AdminCreateUserConfigProperty adminCreateUserConfig) The configuration for creating a new user profile.aliasAttributes
(List<String> aliasAttributes) Attributes supported as an alias for this user pool.autoVerifiedAttributes
(List<String> autoVerifiedAttributes) The attributes to be auto-verified.build()
static CfnUserPool.Builder
deletionProtection
(String deletionProtection) When active,DeletionProtection
prevents accidental deletion of your user pool.deviceConfiguration
(IResolvable deviceConfiguration) The device-remembering configuration for a user pool.deviceConfiguration
(CfnUserPool.DeviceConfigurationProperty deviceConfiguration) The device-remembering configuration for a user pool.emailConfiguration
(IResolvable emailConfiguration) The email configuration of your user pool.emailConfiguration
(CfnUserPool.EmailConfigurationProperty emailConfiguration) The email configuration of your user pool.emailVerificationMessage
(String emailVerificationMessage) This parameter is no longer used.emailVerificationSubject
(String emailVerificationSubject) This parameter is no longer used.enabledMfas
(List<String> enabledMfas) Enables MFA on a specified user pool.lambdaConfig
(IResolvable lambdaConfig) The Lambda trigger configuration information for the new user pool.lambdaConfig
(CfnUserPool.LambdaConfigProperty lambdaConfig) The Lambda trigger configuration information for the new user pool.mfaConfiguration
(String mfaConfiguration) The multi-factor authentication (MFA) configuration.policies
(IResolvable policies) The policy associated with a user pool.policies
(CfnUserPool.PoliciesProperty policies) The policy associated with a user pool.The schema attributes for the new user pool.schema
(IResolvable schema) The schema attributes for the new user pool.smsAuthenticationMessage
(String smsAuthenticationMessage) A string representing the SMS authentication message.smsConfiguration
(IResolvable smsConfiguration) The SMS configuration with the settings that your Amazon Cognito user pool must use to send an SMS message from your AWS account through Amazon Simple Notification Service.smsConfiguration
(CfnUserPool.SmsConfigurationProperty smsConfiguration) The SMS configuration with the settings that your Amazon Cognito user pool must use to send an SMS message from your AWS account through Amazon Simple Notification Service.smsVerificationMessage
(String smsVerificationMessage) This parameter is no longer used.userAttributeUpdateSettings
(IResolvable userAttributeUpdateSettings) The settings for updates to user attributes.userAttributeUpdateSettings
(CfnUserPool.UserAttributeUpdateSettingsProperty userAttributeUpdateSettings) The settings for updates to user attributes.usernameAttributes
(List<String> usernameAttributes) Determines whether email addresses or phone numbers can be specified as user names when a user signs up.usernameConfiguration
(IResolvable usernameConfiguration) You can choose to set case sensitivity on the username input for the selected sign-in option.usernameConfiguration
(CfnUserPool.UsernameConfigurationProperty usernameConfiguration) You can choose to set case sensitivity on the username input for the selected sign-in option.userPoolAddOns
(IResolvable userPoolAddOns) Enables advanced security risk detection.userPoolAddOns
(CfnUserPool.UserPoolAddOnsProperty userPoolAddOns) Enables advanced security risk detection.userPoolName
(String userPoolName) A string used to name the user pool.userPoolTags
(Object userPoolTags) The tag keys and values to assign to the user pool.verificationMessageTemplate
(IResolvable verificationMessageTemplate) The template for the verification message that the user sees when the app requests permission to access the user's information.verificationMessageTemplate
(CfnUserPool.VerificationMessageTemplateProperty verificationMessageTemplate) The template for the verification message that the user sees when the app requests permission to access the user's information.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnUserPool.Builder
.
-
accountRecoverySetting
@Stability(Stable) public CfnUserPool.Builder accountRecoverySetting(IResolvable accountRecoverySetting) Use this setting to define which verified available method a user can use to recover their password when they callForgotPassword
.It allows you to define a preferred method when a user has more than one method available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery method where SMS is preferred over email.
- Parameters:
accountRecoverySetting
- Use this setting to define which verified available method a user can use to recover their password when they callForgotPassword
. This parameter is required.- Returns:
this
-
accountRecoverySetting
@Stability(Stable) public CfnUserPool.Builder accountRecoverySetting(CfnUserPool.AccountRecoverySettingProperty accountRecoverySetting) Use this setting to define which verified available method a user can use to recover their password when they callForgotPassword
.It allows you to define a preferred method when a user has more than one method available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery method where SMS is preferred over email.
- Parameters:
accountRecoverySetting
- Use this setting to define which verified available method a user can use to recover their password when they callForgotPassword
. This parameter is required.- Returns:
this
-
adminCreateUserConfig
@Stability(Stable) public CfnUserPool.Builder adminCreateUserConfig(IResolvable adminCreateUserConfig) The configuration for creating a new user profile.- Parameters:
adminCreateUserConfig
- The configuration for creating a new user profile. This parameter is required.- Returns:
this
-
adminCreateUserConfig
@Stability(Stable) public CfnUserPool.Builder adminCreateUserConfig(CfnUserPool.AdminCreateUserConfigProperty adminCreateUserConfig) The configuration for creating a new user profile.- Parameters:
adminCreateUserConfig
- The configuration for creating a new user profile. This parameter is required.- Returns:
this
-
aliasAttributes
Attributes supported as an alias for this user pool. Possible values: phone_number , email , or preferred_username .This user pool property cannot be updated.
- Parameters:
aliasAttributes
- Attributes supported as an alias for this user pool. Possible values: phone_number , email , or preferred_username . This parameter is required.- Returns:
this
-
autoVerifiedAttributes
@Stability(Stable) public CfnUserPool.Builder autoVerifiedAttributes(List<String> autoVerifiedAttributes) The attributes to be auto-verified.Possible values: email , phone_number .
- Parameters:
autoVerifiedAttributes
- The attributes to be auto-verified. This parameter is required.- Returns:
this
-
deletionProtection
When active,DeletionProtection
prevents accidental deletion of your user pool.Before you can delete a user pool that you have protected against deletion, you must deactivate this feature.
When you try to delete a protected user pool in a
DeleteUserPool
API request, Amazon Cognito returns anInvalidParameterException
error. To delete a protected user pool, send a newDeleteUserPool
request after you deactivate deletion protection in anUpdateUserPool
API request.- Parameters:
deletionProtection
- When active,DeletionProtection
prevents accidental deletion of your user pool. This parameter is required.- Returns:
this
-
deviceConfiguration
The device-remembering configuration for a user pool.A null value indicates that you have deactivated device remembering in your user pool.
When you provide a value for any
DeviceConfiguration
field, you activate the Amazon Cognito device-remembering feature.- Parameters:
deviceConfiguration
- The device-remembering configuration for a user pool. This parameter is required.- Returns:
this
-
deviceConfiguration
@Stability(Stable) public CfnUserPool.Builder deviceConfiguration(CfnUserPool.DeviceConfigurationProperty deviceConfiguration) The device-remembering configuration for a user pool.A null value indicates that you have deactivated device remembering in your user pool.
When you provide a value for any
DeviceConfiguration
field, you activate the Amazon Cognito device-remembering feature.- Parameters:
deviceConfiguration
- The device-remembering configuration for a user pool. This parameter is required.- Returns:
this
-
emailConfiguration
The email configuration of your user pool.The email configuration type sets your preferred sending method, AWS Region, and sender for messages from your user pool.
- Parameters:
emailConfiguration
- The email configuration of your user pool. This parameter is required.- Returns:
this
-
emailConfiguration
@Stability(Stable) public CfnUserPool.Builder emailConfiguration(CfnUserPool.EmailConfigurationProperty emailConfiguration) The email configuration of your user pool.The email configuration type sets your preferred sending method, AWS Region, and sender for messages from your user pool.
- Parameters:
emailConfiguration
- The email configuration of your user pool. This parameter is required.- Returns:
this
-
emailVerificationMessage
@Stability(Stable) public CfnUserPool.Builder emailVerificationMessage(String emailVerificationMessage) This parameter is no longer used.- Parameters:
emailVerificationMessage
- This parameter is no longer used. This parameter is required.- Returns:
this
-
emailVerificationSubject
@Stability(Stable) public CfnUserPool.Builder emailVerificationSubject(String emailVerificationSubject) This parameter is no longer used.- Parameters:
emailVerificationSubject
- This parameter is no longer used. This parameter is required.- Returns:
this
-
enabledMfas
Enables MFA on a specified user pool.To disable all MFAs after it has been enabled, set MfaConfiguration to “OFF” and remove EnabledMfas. MFAs can only be all disabled if MfaConfiguration is OFF. Once SMS_MFA is enabled, SMS_MFA can only be disabled by setting MfaConfiguration to “OFF”. Can be one of the following values:
SMS_MFA
- Enables SMS MFA for the user pool. SMS_MFA can only be enabled if SMS configuration is provided.SOFTWARE_TOKEN_MFA
- Enables software token MFA for the user pool.
Allowed values:
SMS_MFA
|SOFTWARE_TOKEN_MFA
- Parameters:
enabledMfas
- Enables MFA on a specified user pool. This parameter is required.- Returns:
this
-
lambdaConfig
The Lambda trigger configuration information for the new user pool.In a push model, event sources (such as Amazon S3 and custom applications) need permission to invoke a function. So you must make an extra call to add permission for these event sources to invoke your Lambda function.
For more information on using the Lambda API to add permission, see AddPermission .
For adding permission using the AWS CLI , see add-permission .
- Parameters:
lambdaConfig
- The Lambda trigger configuration information for the new user pool. This parameter is required.- Returns:
this
-
lambdaConfig
@Stability(Stable) public CfnUserPool.Builder lambdaConfig(CfnUserPool.LambdaConfigProperty lambdaConfig) The Lambda trigger configuration information for the new user pool.In a push model, event sources (such as Amazon S3 and custom applications) need permission to invoke a function. So you must make an extra call to add permission for these event sources to invoke your Lambda function.
For more information on using the Lambda API to add permission, see AddPermission .
For adding permission using the AWS CLI , see add-permission .
- Parameters:
lambdaConfig
- The Lambda trigger configuration information for the new user pool. This parameter is required.- Returns:
this
-
mfaConfiguration
The multi-factor authentication (MFA) configuration. Valid values include:.OFF
MFA won't be used for any users.ON
MFA is required for all users to sign in.OPTIONAL
MFA will be required only for individual users who have an MFA factor activated.
- Parameters:
mfaConfiguration
- The multi-factor authentication (MFA) configuration. Valid values include:. This parameter is required.- Returns:
this
-
policies
The policy associated with a user pool.- Parameters:
policies
- The policy associated with a user pool. This parameter is required.- Returns:
this
-
policies
The policy associated with a user pool.- Parameters:
policies
- The policy associated with a user pool. This parameter is required.- Returns:
this
-
schema
The schema attributes for the new user pool. These attributes can be standard or custom attributes.During a user pool update, you can add new schema attributes but you cannot modify or delete an existing schema attribute.
- Parameters:
schema
- The schema attributes for the new user pool. These attributes can be standard or custom attributes. This parameter is required.- Returns:
this
-
schema
The schema attributes for the new user pool. These attributes can be standard or custom attributes.During a user pool update, you can add new schema attributes but you cannot modify or delete an existing schema attribute.
- Parameters:
schema
- The schema attributes for the new user pool. These attributes can be standard or custom attributes. This parameter is required.- Returns:
this
-
smsAuthenticationMessage
@Stability(Stable) public CfnUserPool.Builder smsAuthenticationMessage(String smsAuthenticationMessage) A string representing the SMS authentication message.- Parameters:
smsAuthenticationMessage
- A string representing the SMS authentication message. This parameter is required.- Returns:
this
-
smsConfiguration
The SMS configuration with the settings that your Amazon Cognito user pool must use to send an SMS message from your AWS account through Amazon Simple Notification Service.To send SMS messages with Amazon SNS in the AWS Region that you want, the Amazon Cognito user pool uses an AWS Identity and Access Management (IAM) role in your AWS account .
- Parameters:
smsConfiguration
- The SMS configuration with the settings that your Amazon Cognito user pool must use to send an SMS message from your AWS account through Amazon Simple Notification Service. This parameter is required.- Returns:
this
-
smsConfiguration
@Stability(Stable) public CfnUserPool.Builder smsConfiguration(CfnUserPool.SmsConfigurationProperty smsConfiguration) The SMS configuration with the settings that your Amazon Cognito user pool must use to send an SMS message from your AWS account through Amazon Simple Notification Service.To send SMS messages with Amazon SNS in the AWS Region that you want, the Amazon Cognito user pool uses an AWS Identity and Access Management (IAM) role in your AWS account .
- Parameters:
smsConfiguration
- The SMS configuration with the settings that your Amazon Cognito user pool must use to send an SMS message from your AWS account through Amazon Simple Notification Service. This parameter is required.- Returns:
this
-
smsVerificationMessage
This parameter is no longer used.- Parameters:
smsVerificationMessage
- This parameter is no longer used. This parameter is required.- Returns:
this
-
userAttributeUpdateSettings
@Stability(Stable) public CfnUserPool.Builder userAttributeUpdateSettings(IResolvable userAttributeUpdateSettings) The settings for updates to user attributes.These settings include the property
AttributesRequireVerificationBeforeUpdate
, a user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For more information, see Verifying updates to email addresses and phone numbers .- Parameters:
userAttributeUpdateSettings
- The settings for updates to user attributes. This parameter is required.- Returns:
this
-
userAttributeUpdateSettings
@Stability(Stable) public CfnUserPool.Builder userAttributeUpdateSettings(CfnUserPool.UserAttributeUpdateSettingsProperty userAttributeUpdateSettings) The settings for updates to user attributes.These settings include the property
AttributesRequireVerificationBeforeUpdate
, a user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For more information, see Verifying updates to email addresses and phone numbers .- Parameters:
userAttributeUpdateSettings
- The settings for updates to user attributes. This parameter is required.- Returns:
this
-
usernameAttributes
Determines whether email addresses or phone numbers can be specified as user names when a user signs up.Possible values:
phone_number
oremail
.This user pool property cannot be updated.
- Parameters:
usernameAttributes
- Determines whether email addresses or phone numbers can be specified as user names when a user signs up. This parameter is required.- Returns:
this
-
usernameConfiguration
@Stability(Stable) public CfnUserPool.Builder usernameConfiguration(IResolvable usernameConfiguration) You can choose to set case sensitivity on the username input for the selected sign-in option.For example, when this is set to
False
, users will be able to sign in using either "username" or "Username". This configuration is immutable once it has been set.- Parameters:
usernameConfiguration
- You can choose to set case sensitivity on the username input for the selected sign-in option. This parameter is required.- Returns:
this
-
usernameConfiguration
@Stability(Stable) public CfnUserPool.Builder usernameConfiguration(CfnUserPool.UsernameConfigurationProperty usernameConfiguration) You can choose to set case sensitivity on the username input for the selected sign-in option.For example, when this is set to
False
, users will be able to sign in using either "username" or "Username". This configuration is immutable once it has been set.- Parameters:
usernameConfiguration
- You can choose to set case sensitivity on the username input for the selected sign-in option. This parameter is required.- Returns:
this
-
userPoolAddOns
Enables advanced security risk detection.Set the key
AdvancedSecurityMode
to the value "AUDIT".- Parameters:
userPoolAddOns
- Enables advanced security risk detection. This parameter is required.- Returns:
this
-
userPoolAddOns
@Stability(Stable) public CfnUserPool.Builder userPoolAddOns(CfnUserPool.UserPoolAddOnsProperty userPoolAddOns) Enables advanced security risk detection.Set the key
AdvancedSecurityMode
to the value "AUDIT".- Parameters:
userPoolAddOns
- Enables advanced security risk detection. This parameter is required.- Returns:
this
-
userPoolName
A string used to name the user pool.- Parameters:
userPoolName
- A string used to name the user pool. This parameter is required.- Returns:
this
-
userPoolTags
The tag keys and values to assign to the user pool.A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.
- Parameters:
userPoolTags
- The tag keys and values to assign to the user pool. This parameter is required.- Returns:
this
-
verificationMessageTemplate
@Stability(Stable) public CfnUserPool.Builder verificationMessageTemplate(IResolvable verificationMessageTemplate) The template for the verification message that the user sees when the app requests permission to access the user's information.- Parameters:
verificationMessageTemplate
- The template for the verification message that the user sees when the app requests permission to access the user's information. This parameter is required.- Returns:
this
-
verificationMessageTemplate
@Stability(Stable) public CfnUserPool.Builder verificationMessageTemplate(CfnUserPool.VerificationMessageTemplateProperty verificationMessageTemplate) The template for the verification message that the user sees when the app requests permission to access the user's information.- Parameters:
verificationMessageTemplate
- The template for the verification message that the user sees when the app requests permission to access the user's information. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnUserPool>
- Returns:
- a newly built instance of
CfnUserPool
.
-