pub struct CreateUserPoolFluentBuilder { /* private fields */ }
Expand description

Fluent builder constructing a request to CreateUserPool.

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers require you to register an origination phone number before you can send SMS messages to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a phone number with Amazon Pinpoint. Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, activate their accounts, or sign in.

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service, Amazon Simple Notification Service might place your account in the SMS sandbox. In sandbox mode , you can send messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito Developer Guide.

Creates a new Amazon Cognito user pool and sets the password policy for the pool.

If you don't provide a value for an attribute, Amazon Cognito sets it to its default value.

Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.

Learn more

Implementations§

source§

impl CreateUserPoolFluentBuilder

source

pub fn as_input(&self) -> &CreateUserPoolInputBuilder

Access the CreateUserPool as a reference.

source

pub async fn send( self, ) -> Result<CreateUserPoolOutput, SdkError<CreateUserPoolError, HttpResponse>>

Sends the request and returns the response.

If an error occurs, an SdkError will be returned with additional details that can be matched against.

By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.

source

pub fn customize( self, ) -> CustomizableOperation<CreateUserPoolOutput, CreateUserPoolError, Self>

Consumes this builder, creating a customizable operation that can be modified before being sent.

source

pub fn pool_name(self, input: impl Into<String>) -> Self

A string used to name the user pool.

source

pub fn set_pool_name(self, input: Option<String>) -> Self

A string used to name the user pool.

source

pub fn get_pool_name(&self) -> &Option<String>

A string used to name the user pool.

source

pub fn policies(self, input: UserPoolPolicyType) -> Self

The policies associated with the new user pool.

source

pub fn set_policies(self, input: Option<UserPoolPolicyType>) -> Self

The policies associated with the new user pool.

source

pub fn get_policies(&self) -> &Option<UserPoolPolicyType>

The policies associated with the new user pool.

source

pub fn deletion_protection(self, input: DeletionProtectionType) -> Self

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.

source

pub fn set_deletion_protection( self, input: Option<DeletionProtectionType>, ) -> Self

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.

source

pub fn get_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.

source

pub fn lambda_config(self, input: LambdaConfigType) -> Self

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 .

source

pub fn set_lambda_config(self, input: Option<LambdaConfigType>) -> Self

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 .

source

pub fn get_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 .

source

pub fn auto_verified_attributes(self, input: VerifiedAttributeType) -> Self

Appends an item to AutoVerifiedAttributes.

To override the contents of this collection use set_auto_verified_attributes.

The attributes to be auto-verified. Possible values: email, phone_number.

source

pub fn set_auto_verified_attributes( self, input: Option<Vec<VerifiedAttributeType>>, ) -> Self

The attributes to be auto-verified. Possible values: email, phone_number.

source

pub fn get_auto_verified_attributes( &self, ) -> &Option<Vec<VerifiedAttributeType>>

The attributes to be auto-verified. Possible values: email, phone_number.

source

pub fn alias_attributes(self, input: AliasAttributeType) -> Self

Appends an item to AliasAttributes.

To override the contents of this collection use set_alias_attributes.

Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.

source

pub fn set_alias_attributes( self, input: Option<Vec<AliasAttributeType>>, ) -> Self

Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.

source

pub fn get_alias_attributes(&self) -> &Option<Vec<AliasAttributeType>>

Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.

source

pub fn username_attributes(self, input: UsernameAttributeType) -> Self

Appends an item to UsernameAttributes.

To override the contents of this collection use set_username_attributes.

Specifies whether a user can use an email address or phone number as a username when they sign up.

source

pub fn set_username_attributes( self, input: Option<Vec<UsernameAttributeType>>, ) -> Self

Specifies whether a user can use an email address or phone number as a username when they sign up.

source

pub fn get_username_attributes(&self) -> &Option<Vec<UsernameAttributeType>>

Specifies whether a user can use an email address or phone number as a username when they sign up.

source

pub fn sms_verification_message(self, input: impl Into<String>) -> Self

This parameter is no longer used. See VerificationMessageTemplateType.

source

pub fn set_sms_verification_message(self, input: Option<String>) -> Self

This parameter is no longer used. See VerificationMessageTemplateType.

source

pub fn get_sms_verification_message(&self) -> &Option<String>

This parameter is no longer used. See VerificationMessageTemplateType.

source

pub fn email_verification_message(self, input: impl Into<String>) -> Self

This parameter is no longer used. See VerificationMessageTemplateType.

source

pub fn set_email_verification_message(self, input: Option<String>) -> Self

This parameter is no longer used. See VerificationMessageTemplateType.

source

pub fn get_email_verification_message(&self) -> &Option<String>

This parameter is no longer used. See VerificationMessageTemplateType.

source

pub fn email_verification_subject(self, input: impl Into<String>) -> Self

This parameter is no longer used. See VerificationMessageTemplateType.

source

pub fn set_email_verification_subject(self, input: Option<String>) -> Self

This parameter is no longer used. See VerificationMessageTemplateType.

source

pub fn get_email_verification_subject(&self) -> &Option<String>

This parameter is no longer used. See VerificationMessageTemplateType.

source

pub fn verification_message_template( self, input: VerificationMessageTemplateType, ) -> Self

The template for the verification message that the user sees when the app requests permission to access the user's information.

source

pub fn set_verification_message_template( self, input: Option<VerificationMessageTemplateType>, ) -> Self

The template for the verification message that the user sees when the app requests permission to access the user's information.

source

pub fn get_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.

source

pub fn sms_authentication_message(self, input: impl Into<String>) -> Self

A string representing the SMS authentication message.

source

pub fn set_sms_authentication_message(self, input: Option<String>) -> Self

A string representing the SMS authentication message.

source

pub fn get_sms_authentication_message(&self) -> &Option<String>

A string representing the SMS authentication message.

source

pub fn mfa_configuration(self, input: UserPoolMfaType) -> Self

Specifies MFA configuration details.

source

pub fn set_mfa_configuration(self, input: Option<UserPoolMfaType>) -> Self

Specifies MFA configuration details.

source

pub fn get_mfa_configuration(&self) -> &Option<UserPoolMfaType>

Specifies MFA configuration details.

source

pub fn user_attribute_update_settings( self, input: UserAttributeUpdateSettingsType, ) -> Self

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.

source

pub fn set_user_attribute_update_settings( self, input: Option<UserAttributeUpdateSettingsType>, ) -> Self

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.

source

pub fn get_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.

source

pub fn device_configuration(self, input: DeviceConfigurationType) -> Self

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.

source

pub fn set_device_configuration( self, input: Option<DeviceConfigurationType>, ) -> Self

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.

source

pub fn get_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.

source

pub fn email_configuration(self, input: EmailConfigurationType) -> Self

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.

source

pub fn set_email_configuration( self, input: Option<EmailConfigurationType>, ) -> Self

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.

source

pub fn get_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.

source

pub fn sms_configuration(self, input: SmsConfigurationType) -> Self

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.

source

pub fn set_sms_configuration(self, input: Option<SmsConfigurationType>) -> Self

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.

source

pub fn get_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.

source

pub fn user_pool_tags(self, k: impl Into<String>, v: impl Into<String>) -> Self

Adds a key-value pair to UserPoolTags.

To override the contents of this collection use set_user_pool_tags.

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.

source

pub fn set_user_pool_tags(self, input: Option<HashMap<String, String>>) -> Self

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.

source

pub fn get_user_pool_tags(&self) -> &Option<HashMap<String, String>>

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.

source

pub fn admin_create_user_config(self, input: AdminCreateUserConfigType) -> Self

The configuration for AdminCreateUser requests.

source

pub fn set_admin_create_user_config( self, input: Option<AdminCreateUserConfigType>, ) -> Self

The configuration for AdminCreateUser requests.

source

pub fn get_admin_create_user_config(&self) -> &Option<AdminCreateUserConfigType>

The configuration for AdminCreateUser requests.

source

pub fn schema(self, input: SchemaAttributeType) -> Self

Appends an item to Schema.

To override the contents of this collection use set_schema.

An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.

source

pub fn set_schema(self, input: Option<Vec<SchemaAttributeType>>) -> Self

An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.

source

pub fn get_schema(&self) -> &Option<Vec<SchemaAttributeType>>

An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.

source

pub fn user_pool_add_ons(self, input: UserPoolAddOnsType) -> Self

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.

source

pub fn set_user_pool_add_ons(self, input: Option<UserPoolAddOnsType>) -> Self

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.

source

pub fn get_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.

source

pub fn username_configuration(self, input: UsernameConfigurationType) -> Self

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.

source

pub fn set_username_configuration( self, input: Option<UsernameConfigurationType>, ) -> Self

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.

source

pub fn get_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.

source

pub fn account_recovery_setting(self, input: AccountRecoverySettingType) -> Self

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

pub fn set_account_recovery_setting( self, input: Option<AccountRecoverySettingType>, ) -> Self

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

pub fn get_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.

Trait Implementations§

source§

impl Clone for CreateUserPoolFluentBuilder

source§

fn clone(&self) -> CreateUserPoolFluentBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CreateUserPoolFluentBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more