#[non_exhaustive]pub struct CreateUserPoolInput {Show 23 fields
pub pool_name: Option<String>,
pub policies: Option<UserPoolPolicyType>,
pub deletion_protection: Option<DeletionProtectionType>,
pub lambda_config: Option<LambdaConfigType>,
pub auto_verified_attributes: Option<Vec<VerifiedAttributeType>>,
pub alias_attributes: Option<Vec<AliasAttributeType>>,
pub username_attributes: Option<Vec<UsernameAttributeType>>,
pub sms_verification_message: Option<String>,
pub email_verification_message: Option<String>,
pub email_verification_subject: Option<String>,
pub verification_message_template: Option<VerificationMessageTemplateType>,
pub sms_authentication_message: Option<String>,
pub mfa_configuration: Option<UserPoolMfaType>,
pub user_attribute_update_settings: Option<UserAttributeUpdateSettingsType>,
pub device_configuration: Option<DeviceConfigurationType>,
pub email_configuration: Option<EmailConfigurationType>,
pub sms_configuration: Option<SmsConfigurationType>,
pub user_pool_tags: Option<HashMap<String, String>>,
pub admin_create_user_config: Option<AdminCreateUserConfigType>,
pub schema: Option<Vec<SchemaAttributeType>>,
pub user_pool_add_ons: Option<UserPoolAddOnsType>,
pub username_configuration: Option<UsernameConfigurationType>,
pub account_recovery_setting: Option<AccountRecoverySettingType>,
}
Expand description
Represents the request to create a user pool.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.pool_name: Option<String>
A string used to name the user pool.
policies: Option<UserPoolPolicyType>
The policies associated with the new user pool.
deletion_protection: Option<DeletionProtectionType>
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 an InvalidParameterException
error. To delete a protected user pool, send a new DeleteUserPool
request after you deactivate deletion protection in an UpdateUserPool
API request.
lambda_config: Option<LambdaConfigType>
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 CLI, see add-permission .
auto_verified_attributes: Option<Vec<VerifiedAttributeType>>
The attributes to be auto-verified. Possible values: email, phone_number.
alias_attributes: Option<Vec<AliasAttributeType>>
Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.
username_attributes: Option<Vec<UsernameAttributeType>>
Specifies whether a user can use an email address or phone number as a username when they sign up.
sms_verification_message: Option<String>
This parameter is no longer used. See VerificationMessageTemplateType.
email_verification_message: Option<String>
This parameter is no longer used. See VerificationMessageTemplateType.
email_verification_subject: Option<String>
This parameter is no longer used. See VerificationMessageTemplateType.
verification_message_template: Option<VerificationMessageTemplateType>
The template for the verification message that the user sees when the app requests permission to access the user's information.
sms_authentication_message: Option<String>
A string representing the SMS authentication message.
mfa_configuration: Option<UserPoolMfaType>
Specifies MFA configuration details.
user_attribute_update_settings: Option<UserAttributeUpdateSettingsType>
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.
device_configuration: Option<DeviceConfigurationType>
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.
email_configuration: Option<EmailConfigurationType>
The email configuration of your user pool. The email configuration type sets your preferred sending method, Amazon Web Services Region, and sender for messages from your user pool.
sms_configuration: Option<SmsConfigurationType>
The SMS configuration with the settings that your Amazon Cognito user pool must use to send an SMS message from your Amazon Web Services account through Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the Amazon Web Services Region that you want, the Amazon Cognito user pool uses an Identity and Access Management (IAM) role in your Amazon Web Services account.
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.
admin_create_user_config: Option<AdminCreateUserConfigType>
The configuration for AdminCreateUser
requests.
schema: Option<Vec<SchemaAttributeType>>
An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.
user_pool_add_ons: Option<UserPoolAddOnsType>
User pool add-ons. Contains settings for activation of advanced security features. To log user security information but take no action, set to AUDIT
. To configure automatic security responses to risky traffic to your user pool, set to ENFORCED
.
For more information, see Adding advanced security to a user pool.
username_configuration: Option<UsernameConfigurationType>
Case sensitivity on the username input for the selected sign-in option. When case sensitivity is set to False
(case insensitive), users can sign in with any combination of capital and lowercase letters. For example, username
, USERNAME
, or UserName
, or for email, email@example.com
or EMaiL@eXamplE.Com
. For most use cases, set case sensitivity to False
(case insensitive) as a best practice. When usernames and email addresses are case insensitive, Amazon Cognito treats any variation in case as the same user, and prevents a case variation from being assigned to the same attribute for a different user.
This configuration is immutable after you set it. For more information, see UsernameConfigurationType.
account_recovery_setting: Option<AccountRecoverySettingType>
The available verified method a user can use to recover their password when they call ForgotPassword
. You can use this setting to define a preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method where SMS is preferred through email.
Implementations§
source§impl CreateUserPoolInput
impl CreateUserPoolInput
sourcepub fn policies(&self) -> Option<&UserPoolPolicyType>
pub fn policies(&self) -> Option<&UserPoolPolicyType>
The policies associated with the new user pool.
sourcepub fn deletion_protection(&self) -> Option<&DeletionProtectionType>
pub fn deletion_protection(&self) -> Option<&DeletionProtectionType>
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 an InvalidParameterException
error. To delete a protected user pool, send a new DeleteUserPool
request after you deactivate deletion protection in an UpdateUserPool
API request.
sourcepub fn lambda_config(&self) -> Option<&LambdaConfigType>
pub fn lambda_config(&self) -> Option<&LambdaConfigType>
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 CLI, see add-permission .
sourcepub fn auto_verified_attributes(&self) -> &[VerifiedAttributeType]
pub fn auto_verified_attributes(&self) -> &[VerifiedAttributeType]
The attributes to be auto-verified. Possible values: email, phone_number.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .auto_verified_attributes.is_none()
.
sourcepub fn alias_attributes(&self) -> &[AliasAttributeType]
pub fn alias_attributes(&self) -> &[AliasAttributeType]
Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .alias_attributes.is_none()
.
sourcepub fn username_attributes(&self) -> &[UsernameAttributeType]
pub fn username_attributes(&self) -> &[UsernameAttributeType]
Specifies whether a user can use an email address or phone number as a username when they sign up.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .username_attributes.is_none()
.
sourcepub fn sms_verification_message(&self) -> Option<&str>
pub fn sms_verification_message(&self) -> Option<&str>
This parameter is no longer used. See VerificationMessageTemplateType.
sourcepub fn email_verification_message(&self) -> Option<&str>
pub fn email_verification_message(&self) -> Option<&str>
This parameter is no longer used. See VerificationMessageTemplateType.
sourcepub fn email_verification_subject(&self) -> Option<&str>
pub fn email_verification_subject(&self) -> Option<&str>
This parameter is no longer used. See VerificationMessageTemplateType.
sourcepub fn verification_message_template(
&self,
) -> Option<&VerificationMessageTemplateType>
pub fn verification_message_template( &self, ) -> Option<&VerificationMessageTemplateType>
The template for the verification message that the user sees when the app requests permission to access the user's information.
sourcepub fn sms_authentication_message(&self) -> Option<&str>
pub fn sms_authentication_message(&self) -> Option<&str>
A string representing the SMS authentication message.
sourcepub fn mfa_configuration(&self) -> Option<&UserPoolMfaType>
pub fn mfa_configuration(&self) -> Option<&UserPoolMfaType>
Specifies MFA configuration details.
sourcepub fn user_attribute_update_settings(
&self,
) -> Option<&UserAttributeUpdateSettingsType>
pub fn user_attribute_update_settings( &self, ) -> Option<&UserAttributeUpdateSettingsType>
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.
sourcepub fn device_configuration(&self) -> Option<&DeviceConfigurationType>
pub fn device_configuration(&self) -> Option<&DeviceConfigurationType>
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.
sourcepub fn email_configuration(&self) -> Option<&EmailConfigurationType>
pub fn email_configuration(&self) -> Option<&EmailConfigurationType>
The email configuration of your user pool. The email configuration type sets your preferred sending method, Amazon Web Services Region, and sender for messages from your user pool.
sourcepub fn sms_configuration(&self) -> Option<&SmsConfigurationType>
pub fn sms_configuration(&self) -> Option<&SmsConfigurationType>
The SMS configuration with the settings that your Amazon Cognito user pool must use to send an SMS message from your Amazon Web Services account through Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the Amazon Web Services Region that you want, the Amazon Cognito user pool uses an Identity and Access Management (IAM) role in your Amazon Web Services account.
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.
sourcepub fn admin_create_user_config(&self) -> Option<&AdminCreateUserConfigType>
pub fn admin_create_user_config(&self) -> Option<&AdminCreateUserConfigType>
The configuration for AdminCreateUser
requests.
sourcepub fn schema(&self) -> &[SchemaAttributeType]
pub fn schema(&self) -> &[SchemaAttributeType]
An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .schema.is_none()
.
sourcepub fn user_pool_add_ons(&self) -> Option<&UserPoolAddOnsType>
pub fn user_pool_add_ons(&self) -> Option<&UserPoolAddOnsType>
User pool add-ons. Contains settings for activation of advanced security features. To log user security information but take no action, set to AUDIT
. To configure automatic security responses to risky traffic to your user pool, set to ENFORCED
.
For more information, see Adding advanced security to a user pool.
sourcepub fn username_configuration(&self) -> Option<&UsernameConfigurationType>
pub fn username_configuration(&self) -> Option<&UsernameConfigurationType>
Case sensitivity on the username input for the selected sign-in option. When case sensitivity is set to False
(case insensitive), users can sign in with any combination of capital and lowercase letters. For example, username
, USERNAME
, or UserName
, or for email, email@example.com
or EMaiL@eXamplE.Com
. For most use cases, set case sensitivity to False
(case insensitive) as a best practice. When usernames and email addresses are case insensitive, Amazon Cognito treats any variation in case as the same user, and prevents a case variation from being assigned to the same attribute for a different user.
This configuration is immutable after you set it. For more information, see UsernameConfigurationType.
sourcepub fn account_recovery_setting(&self) -> Option<&AccountRecoverySettingType>
pub fn account_recovery_setting(&self) -> Option<&AccountRecoverySettingType>
The available verified method a user can use to recover their password when they call ForgotPassword
. You can use this setting to define a preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method where SMS is preferred through email.
source§impl CreateUserPoolInput
impl CreateUserPoolInput
sourcepub fn builder() -> CreateUserPoolInputBuilder
pub fn builder() -> CreateUserPoolInputBuilder
Creates a new builder-style object to manufacture CreateUserPoolInput
.
Trait Implementations§
source§impl Clone for CreateUserPoolInput
impl Clone for CreateUserPoolInput
source§fn clone(&self) -> CreateUserPoolInput
fn clone(&self) -> CreateUserPoolInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CreateUserPoolInput
impl Debug for CreateUserPoolInput
source§impl PartialEq for CreateUserPoolInput
impl PartialEq for CreateUserPoolInput
source§fn eq(&self, other: &CreateUserPoolInput) -> bool
fn eq(&self, other: &CreateUserPoolInput) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CreateUserPoolInput
Auto Trait Implementations§
impl Freeze for CreateUserPoolInput
impl RefUnwindSafe for CreateUserPoolInput
impl Send for CreateUserPoolInput
impl Sync for CreateUserPoolInput
impl Unpin for CreateUserPoolInput
impl UnwindSafe for CreateUserPoolInput
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more