aws_sdk_cognitoidentityprovider/operation/admin_create_user/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::admin_create_user::_admin_create_user_output::AdminCreateUserOutputBuilder;
3
4pub use crate::operation::admin_create_user::_admin_create_user_input::AdminCreateUserInputBuilder;
5
6impl crate::operation::admin_create_user::builders::AdminCreateUserInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::admin_create_user::AdminCreateUserOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::admin_create_user::AdminCreateUserError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.admin_create_user();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `AdminCreateUser`.
24///
25/// <p>Creates a new user in the specified user pool.</p>
26/// <p>If <code>MessageAction</code> isn't set, the default is to send a welcome message via email or phone (SMS).</p>
27/// <p>This message is based on a template that you configured in your call to create or update a user pool. This template includes your custom sign-up instructions and placeholders for user name and temporary password.</p>
28/// <p>Alternatively, you can call <code>AdminCreateUser</code> with <code>SUPPRESS</code> for the <code>MessageAction</code> parameter, and Amazon Cognito won't send any email.</p>
29/// <p>In either case, if the user has a password, they will be in the <code>FORCE_CHANGE_PASSWORD</code> state until they sign in and set their password. Your invitation message template must have the <code>{####}</code> password placeholder if your users have passwords. If your template doesn't have this placeholder, Amazon Cognito doesn't deliver the invitation message. In this case, you must update your message template and resend the password with a new <code>AdminCreateUser</code> request with a <code>MessageAction</code> value of <code>RESEND</code>.</p><note>
30/// <p>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 <a href="https://console.aws.amazon.com/pinpoint/home/">Amazon Pinpoint</a>. 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.</p>
31/// <p>If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Services service, Amazon Simple Notification Service might place your account in the SMS sandbox. In <i> <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html">sandbox mode</a> </i>, 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 <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-sms-settings.html"> SMS message settings for Amazon Cognito user pools</a> in the <i>Amazon Cognito Developer Guide</i>.</p>
32/// </note> <note>
33/// <p>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.</p>
34/// <p class="title"><b>Learn more</b></p>
35/// <ul>
36/// <li>
37/// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html">Signing Amazon Web Services API Requests</a></p></li>
38/// <li>
39/// <p><a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html">Using the Amazon Cognito user pools API and user pool endpoints</a></p></li>
40/// </ul>
41/// </note>
42#[derive(::std::clone::Clone, ::std::fmt::Debug)]
43pub struct AdminCreateUserFluentBuilder {
44    handle: ::std::sync::Arc<crate::client::Handle>,
45    inner: crate::operation::admin_create_user::builders::AdminCreateUserInputBuilder,
46    config_override: ::std::option::Option<crate::config::Builder>,
47}
48impl
49    crate::client::customize::internal::CustomizableSend<
50        crate::operation::admin_create_user::AdminCreateUserOutput,
51        crate::operation::admin_create_user::AdminCreateUserError,
52    > for AdminCreateUserFluentBuilder
53{
54    fn send(
55        self,
56        config_override: crate::config::Builder,
57    ) -> crate::client::customize::internal::BoxFuture<
58        crate::client::customize::internal::SendResult<
59            crate::operation::admin_create_user::AdminCreateUserOutput,
60            crate::operation::admin_create_user::AdminCreateUserError,
61        >,
62    > {
63        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
64    }
65}
66impl AdminCreateUserFluentBuilder {
67    /// Creates a new `AdminCreateUserFluentBuilder`.
68    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
69        Self {
70            handle,
71            inner: ::std::default::Default::default(),
72            config_override: ::std::option::Option::None,
73        }
74    }
75    /// Access the AdminCreateUser as a reference.
76    pub fn as_input(&self) -> &crate::operation::admin_create_user::builders::AdminCreateUserInputBuilder {
77        &self.inner
78    }
79    /// Sends the request and returns the response.
80    ///
81    /// If an error occurs, an `SdkError` will be returned with additional details that
82    /// can be matched against.
83    ///
84    /// By default, any retryable failures will be retried twice. Retry behavior
85    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
86    /// set when configuring the client.
87    pub async fn send(
88        self,
89    ) -> ::std::result::Result<
90        crate::operation::admin_create_user::AdminCreateUserOutput,
91        ::aws_smithy_runtime_api::client::result::SdkError<
92            crate::operation::admin_create_user::AdminCreateUserError,
93            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
94        >,
95    > {
96        let input = self
97            .inner
98            .build()
99            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
100        let runtime_plugins = crate::operation::admin_create_user::AdminCreateUser::operation_runtime_plugins(
101            self.handle.runtime_plugins.clone(),
102            &self.handle.conf,
103            self.config_override,
104        );
105        crate::operation::admin_create_user::AdminCreateUser::orchestrate(&runtime_plugins, input).await
106    }
107
108    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
109    pub fn customize(
110        self,
111    ) -> crate::client::customize::CustomizableOperation<
112        crate::operation::admin_create_user::AdminCreateUserOutput,
113        crate::operation::admin_create_user::AdminCreateUserError,
114        Self,
115    > {
116        crate::client::customize::CustomizableOperation::new(self)
117    }
118    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
119        self.set_config_override(::std::option::Option::Some(config_override.into()));
120        self
121    }
122
123    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
124        self.config_override = config_override;
125        self
126    }
127    /// <p>The ID of the user pool where you want to create a user.</p>
128    pub fn user_pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.inner = self.inner.user_pool_id(input.into());
130        self
131    }
132    /// <p>The ID of the user pool where you want to create a user.</p>
133    pub fn set_user_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.inner = self.inner.set_user_pool_id(input);
135        self
136    }
137    /// <p>The ID of the user pool where you want to create a user.</p>
138    pub fn get_user_pool_id(&self) -> &::std::option::Option<::std::string::String> {
139        self.inner.get_user_pool_id()
140    }
141    /// <p>The value that you want to set as the username sign-in attribute. The following conditions apply to the username parameter.</p>
142    /// <ul>
143    /// <li>
144    /// <p>The username can't be a duplicate of another username in the same user pool.</p></li>
145    /// <li>
146    /// <p>You can't change the value of a username after you create it.</p></li>
147    /// <li>
148    /// <p>You can only provide a value if usernames are a valid sign-in attribute for your user pool. If your user pool only supports phone numbers or email addresses as sign-in attributes, Amazon Cognito automatically generates a username value. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#user-pool-settings-aliases">Customizing sign-in attributes</a>.</p></li>
149    /// </ul>
150    pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151        self.inner = self.inner.username(input.into());
152        self
153    }
154    /// <p>The value that you want to set as the username sign-in attribute. The following conditions apply to the username parameter.</p>
155    /// <ul>
156    /// <li>
157    /// <p>The username can't be a duplicate of another username in the same user pool.</p></li>
158    /// <li>
159    /// <p>You can't change the value of a username after you create it.</p></li>
160    /// <li>
161    /// <p>You can only provide a value if usernames are a valid sign-in attribute for your user pool. If your user pool only supports phone numbers or email addresses as sign-in attributes, Amazon Cognito automatically generates a username value. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#user-pool-settings-aliases">Customizing sign-in attributes</a>.</p></li>
162    /// </ul>
163    pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.inner = self.inner.set_username(input);
165        self
166    }
167    /// <p>The value that you want to set as the username sign-in attribute. The following conditions apply to the username parameter.</p>
168    /// <ul>
169    /// <li>
170    /// <p>The username can't be a duplicate of another username in the same user pool.</p></li>
171    /// <li>
172    /// <p>You can't change the value of a username after you create it.</p></li>
173    /// <li>
174    /// <p>You can only provide a value if usernames are a valid sign-in attribute for your user pool. If your user pool only supports phone numbers or email addresses as sign-in attributes, Amazon Cognito automatically generates a username value. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#user-pool-settings-aliases">Customizing sign-in attributes</a>.</p></li>
175    /// </ul>
176    pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
177        self.inner.get_username()
178    }
179    ///
180    /// Appends an item to `UserAttributes`.
181    ///
182    /// To override the contents of this collection use [`set_user_attributes`](Self::set_user_attributes).
183    ///
184    /// <p>An array of name-value pairs that contain user attributes and attribute values to be set for the user to be created. You can create a user without specifying any attributes other than <code>Username</code>. However, any attributes that you specify as required (when creating a user pool or in the <b>Attributes</b> tab of the console) either you should supply (in your call to <code>AdminCreateUser</code>) or the user should supply (when they sign up in response to your welcome message).</p>
185    /// <p>For custom attributes, you must prepend the <code>custom:</code> prefix to the attribute name.</p>
186    /// <p>To send a message inviting the user to sign up, you must specify the user's email address or phone number. You can do this in your call to AdminCreateUser or in the <b>Users</b> tab of the Amazon Cognito console for managing your user pools.</p>
187    /// <p>You must also provide an email address or phone number when you expect the user to do passwordless sign-in with an email or SMS OTP. These attributes must be provided when passwordless options are the only available, or when you don't submit a <code>TemporaryPassword</code>.</p>
188    /// <p>In your <code>AdminCreateUser</code> request, you can set the <code>email_verified</code> and <code>phone_number_verified</code> attributes to <code>true</code>. The following conditions apply:</p>
189    /// <dl>
190    /// <dt>
191    /// email
192    /// </dt>
193    /// <dd>
194    /// <p>The email address where you want the user to receive their confirmation code and username. You must provide a value for <code>email</code> when you want to set <code>email_verified</code> to <code>true</code>, or if you set <code>EMAIL</code> in the <code>DesiredDeliveryMediums</code> parameter.</p>
195    /// </dd>
196    /// <dt>
197    /// phone_number
198    /// </dt>
199    /// <dd>
200    /// <p>The phone number where you want the user to receive their confirmation code and username. You must provide a value for <code>phone_number</code> when you want to set <code>phone_number_verified</code> to <code>true</code>, or if you set <code>SMS</code> in the <code>DesiredDeliveryMediums</code> parameter.</p>
201    /// </dd>
202    /// </dl>
203    pub fn user_attributes(mut self, input: crate::types::AttributeType) -> Self {
204        self.inner = self.inner.user_attributes(input);
205        self
206    }
207    /// <p>An array of name-value pairs that contain user attributes and attribute values to be set for the user to be created. You can create a user without specifying any attributes other than <code>Username</code>. However, any attributes that you specify as required (when creating a user pool or in the <b>Attributes</b> tab of the console) either you should supply (in your call to <code>AdminCreateUser</code>) or the user should supply (when they sign up in response to your welcome message).</p>
208    /// <p>For custom attributes, you must prepend the <code>custom:</code> prefix to the attribute name.</p>
209    /// <p>To send a message inviting the user to sign up, you must specify the user's email address or phone number. You can do this in your call to AdminCreateUser or in the <b>Users</b> tab of the Amazon Cognito console for managing your user pools.</p>
210    /// <p>You must also provide an email address or phone number when you expect the user to do passwordless sign-in with an email or SMS OTP. These attributes must be provided when passwordless options are the only available, or when you don't submit a <code>TemporaryPassword</code>.</p>
211    /// <p>In your <code>AdminCreateUser</code> request, you can set the <code>email_verified</code> and <code>phone_number_verified</code> attributes to <code>true</code>. The following conditions apply:</p>
212    /// <dl>
213    /// <dt>
214    /// email
215    /// </dt>
216    /// <dd>
217    /// <p>The email address where you want the user to receive their confirmation code and username. You must provide a value for <code>email</code> when you want to set <code>email_verified</code> to <code>true</code>, or if you set <code>EMAIL</code> in the <code>DesiredDeliveryMediums</code> parameter.</p>
218    /// </dd>
219    /// <dt>
220    /// phone_number
221    /// </dt>
222    /// <dd>
223    /// <p>The phone number where you want the user to receive their confirmation code and username. You must provide a value for <code>phone_number</code> when you want to set <code>phone_number_verified</code> to <code>true</code>, or if you set <code>SMS</code> in the <code>DesiredDeliveryMediums</code> parameter.</p>
224    /// </dd>
225    /// </dl>
226    pub fn set_user_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AttributeType>>) -> Self {
227        self.inner = self.inner.set_user_attributes(input);
228        self
229    }
230    /// <p>An array of name-value pairs that contain user attributes and attribute values to be set for the user to be created. You can create a user without specifying any attributes other than <code>Username</code>. However, any attributes that you specify as required (when creating a user pool or in the <b>Attributes</b> tab of the console) either you should supply (in your call to <code>AdminCreateUser</code>) or the user should supply (when they sign up in response to your welcome message).</p>
231    /// <p>For custom attributes, you must prepend the <code>custom:</code> prefix to the attribute name.</p>
232    /// <p>To send a message inviting the user to sign up, you must specify the user's email address or phone number. You can do this in your call to AdminCreateUser or in the <b>Users</b> tab of the Amazon Cognito console for managing your user pools.</p>
233    /// <p>You must also provide an email address or phone number when you expect the user to do passwordless sign-in with an email or SMS OTP. These attributes must be provided when passwordless options are the only available, or when you don't submit a <code>TemporaryPassword</code>.</p>
234    /// <p>In your <code>AdminCreateUser</code> request, you can set the <code>email_verified</code> and <code>phone_number_verified</code> attributes to <code>true</code>. The following conditions apply:</p>
235    /// <dl>
236    /// <dt>
237    /// email
238    /// </dt>
239    /// <dd>
240    /// <p>The email address where you want the user to receive their confirmation code and username. You must provide a value for <code>email</code> when you want to set <code>email_verified</code> to <code>true</code>, or if you set <code>EMAIL</code> in the <code>DesiredDeliveryMediums</code> parameter.</p>
241    /// </dd>
242    /// <dt>
243    /// phone_number
244    /// </dt>
245    /// <dd>
246    /// <p>The phone number where you want the user to receive their confirmation code and username. You must provide a value for <code>phone_number</code> when you want to set <code>phone_number_verified</code> to <code>true</code>, or if you set <code>SMS</code> in the <code>DesiredDeliveryMediums</code> parameter.</p>
247    /// </dd>
248    /// </dl>
249    pub fn get_user_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AttributeType>> {
250        self.inner.get_user_attributes()
251    }
252    ///
253    /// Appends an item to `ValidationData`.
254    ///
255    /// To override the contents of this collection use [`set_validation_data`](Self::set_validation_data).
256    ///
257    /// <p>Temporary user attributes that contribute to the outcomes of your pre sign-up Lambda trigger. This set of key-value pairs are for custom validation of information that you collect from your users but don't need to retain.</p>
258    /// <p>Your Lambda function can analyze this additional data and act on it. Your function can automatically confirm and verify select users or perform external API operations like logging user attributes and validation data to Amazon CloudWatch Logs.</p>
259    /// <p>For more information about the pre sign-up Lambda trigger, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html">Pre sign-up Lambda trigger</a>.</p>
260    pub fn validation_data(mut self, input: crate::types::AttributeType) -> Self {
261        self.inner = self.inner.validation_data(input);
262        self
263    }
264    /// <p>Temporary user attributes that contribute to the outcomes of your pre sign-up Lambda trigger. This set of key-value pairs are for custom validation of information that you collect from your users but don't need to retain.</p>
265    /// <p>Your Lambda function can analyze this additional data and act on it. Your function can automatically confirm and verify select users or perform external API operations like logging user attributes and validation data to Amazon CloudWatch Logs.</p>
266    /// <p>For more information about the pre sign-up Lambda trigger, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html">Pre sign-up Lambda trigger</a>.</p>
267    pub fn set_validation_data(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AttributeType>>) -> Self {
268        self.inner = self.inner.set_validation_data(input);
269        self
270    }
271    /// <p>Temporary user attributes that contribute to the outcomes of your pre sign-up Lambda trigger. This set of key-value pairs are for custom validation of information that you collect from your users but don't need to retain.</p>
272    /// <p>Your Lambda function can analyze this additional data and act on it. Your function can automatically confirm and verify select users or perform external API operations like logging user attributes and validation data to Amazon CloudWatch Logs.</p>
273    /// <p>For more information about the pre sign-up Lambda trigger, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html">Pre sign-up Lambda trigger</a>.</p>
274    pub fn get_validation_data(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AttributeType>> {
275        self.inner.get_validation_data()
276    }
277    /// <p>The user's temporary password. This password must conform to the password policy that you specified when you created the user pool.</p>
278    /// <p>The exception to the requirement for a password is when your user pool supports passwordless sign-in with email or SMS OTPs. To create a user with no password, omit this parameter or submit a blank value. You can only create a passwordless user when passwordless sign-in is available.</p>
279    /// <p>The temporary password is valid only once. To complete the Admin Create User flow, the user must enter the temporary password in the sign-in page, along with a new password to be used in all future sign-ins.</p>
280    /// <p>If you don't specify a value, Amazon Cognito generates one for you unless you have passwordless options active for your user pool.</p>
281    /// <p>The temporary password can only be used until the user account expiration limit that you set for your user pool. To reset the account after that time limit, you must call <code>AdminCreateUser</code> again and specify <code>RESEND</code> for the <code>MessageAction</code> parameter.</p>
282    pub fn temporary_password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
283        self.inner = self.inner.temporary_password(input.into());
284        self
285    }
286    /// <p>The user's temporary password. This password must conform to the password policy that you specified when you created the user pool.</p>
287    /// <p>The exception to the requirement for a password is when your user pool supports passwordless sign-in with email or SMS OTPs. To create a user with no password, omit this parameter or submit a blank value. You can only create a passwordless user when passwordless sign-in is available.</p>
288    /// <p>The temporary password is valid only once. To complete the Admin Create User flow, the user must enter the temporary password in the sign-in page, along with a new password to be used in all future sign-ins.</p>
289    /// <p>If you don't specify a value, Amazon Cognito generates one for you unless you have passwordless options active for your user pool.</p>
290    /// <p>The temporary password can only be used until the user account expiration limit that you set for your user pool. To reset the account after that time limit, you must call <code>AdminCreateUser</code> again and specify <code>RESEND</code> for the <code>MessageAction</code> parameter.</p>
291    pub fn set_temporary_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
292        self.inner = self.inner.set_temporary_password(input);
293        self
294    }
295    /// <p>The user's temporary password. This password must conform to the password policy that you specified when you created the user pool.</p>
296    /// <p>The exception to the requirement for a password is when your user pool supports passwordless sign-in with email or SMS OTPs. To create a user with no password, omit this parameter or submit a blank value. You can only create a passwordless user when passwordless sign-in is available.</p>
297    /// <p>The temporary password is valid only once. To complete the Admin Create User flow, the user must enter the temporary password in the sign-in page, along with a new password to be used in all future sign-ins.</p>
298    /// <p>If you don't specify a value, Amazon Cognito generates one for you unless you have passwordless options active for your user pool.</p>
299    /// <p>The temporary password can only be used until the user account expiration limit that you set for your user pool. To reset the account after that time limit, you must call <code>AdminCreateUser</code> again and specify <code>RESEND</code> for the <code>MessageAction</code> parameter.</p>
300    pub fn get_temporary_password(&self) -> &::std::option::Option<::std::string::String> {
301        self.inner.get_temporary_password()
302    }
303    /// <p>This parameter is used only if the <code>phone_number_verified</code> or <code>email_verified</code> attribute is set to <code>True</code>. Otherwise, it is ignored.</p>
304    /// <p>If this parameter is set to <code>True</code> and the phone number or email address specified in the <code>UserAttributes</code> parameter already exists as an alias with a different user, this request migrates the alias from the previous user to the newly-created user. The previous user will no longer be able to log in using that alias.</p>
305    /// <p>If this parameter is set to <code>False</code>, the API throws an <code>AliasExistsException</code> error if the alias already exists. The default value is <code>False</code>.</p>
306    pub fn force_alias_creation(mut self, input: bool) -> Self {
307        self.inner = self.inner.force_alias_creation(input);
308        self
309    }
310    /// <p>This parameter is used only if the <code>phone_number_verified</code> or <code>email_verified</code> attribute is set to <code>True</code>. Otherwise, it is ignored.</p>
311    /// <p>If this parameter is set to <code>True</code> and the phone number or email address specified in the <code>UserAttributes</code> parameter already exists as an alias with a different user, this request migrates the alias from the previous user to the newly-created user. The previous user will no longer be able to log in using that alias.</p>
312    /// <p>If this parameter is set to <code>False</code>, the API throws an <code>AliasExistsException</code> error if the alias already exists. The default value is <code>False</code>.</p>
313    pub fn set_force_alias_creation(mut self, input: ::std::option::Option<bool>) -> Self {
314        self.inner = self.inner.set_force_alias_creation(input);
315        self
316    }
317    /// <p>This parameter is used only if the <code>phone_number_verified</code> or <code>email_verified</code> attribute is set to <code>True</code>. Otherwise, it is ignored.</p>
318    /// <p>If this parameter is set to <code>True</code> and the phone number or email address specified in the <code>UserAttributes</code> parameter already exists as an alias with a different user, this request migrates the alias from the previous user to the newly-created user. The previous user will no longer be able to log in using that alias.</p>
319    /// <p>If this parameter is set to <code>False</code>, the API throws an <code>AliasExistsException</code> error if the alias already exists. The default value is <code>False</code>.</p>
320    pub fn get_force_alias_creation(&self) -> &::std::option::Option<bool> {
321        self.inner.get_force_alias_creation()
322    }
323    /// <p>Set to <code>RESEND</code> to resend the invitation message to a user that already exists, and to reset the temporary-password duration with a new temporary password. Set to <code>SUPPRESS</code> to suppress sending the message. You can specify only one value.</p>
324    pub fn message_action(mut self, input: crate::types::MessageActionType) -> Self {
325        self.inner = self.inner.message_action(input);
326        self
327    }
328    /// <p>Set to <code>RESEND</code> to resend the invitation message to a user that already exists, and to reset the temporary-password duration with a new temporary password. Set to <code>SUPPRESS</code> to suppress sending the message. You can specify only one value.</p>
329    pub fn set_message_action(mut self, input: ::std::option::Option<crate::types::MessageActionType>) -> Self {
330        self.inner = self.inner.set_message_action(input);
331        self
332    }
333    /// <p>Set to <code>RESEND</code> to resend the invitation message to a user that already exists, and to reset the temporary-password duration with a new temporary password. Set to <code>SUPPRESS</code> to suppress sending the message. You can specify only one value.</p>
334    pub fn get_message_action(&self) -> &::std::option::Option<crate::types::MessageActionType> {
335        self.inner.get_message_action()
336    }
337    ///
338    /// Appends an item to `DesiredDeliveryMediums`.
339    ///
340    /// To override the contents of this collection use [`set_desired_delivery_mediums`](Self::set_desired_delivery_mediums).
341    ///
342    /// <p>Specify <code>EMAIL</code> if email will be used to send the welcome message. Specify <code>SMS</code> if the phone number will be used. The default value is <code>SMS</code>. You can specify more than one value.</p>
343    pub fn desired_delivery_mediums(mut self, input: crate::types::DeliveryMediumType) -> Self {
344        self.inner = self.inner.desired_delivery_mediums(input);
345        self
346    }
347    /// <p>Specify <code>EMAIL</code> if email will be used to send the welcome message. Specify <code>SMS</code> if the phone number will be used. The default value is <code>SMS</code>. You can specify more than one value.</p>
348    pub fn set_desired_delivery_mediums(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DeliveryMediumType>>) -> Self {
349        self.inner = self.inner.set_desired_delivery_mediums(input);
350        self
351    }
352    /// <p>Specify <code>EMAIL</code> if email will be used to send the welcome message. Specify <code>SMS</code> if the phone number will be used. The default value is <code>SMS</code>. You can specify more than one value.</p>
353    pub fn get_desired_delivery_mediums(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DeliveryMediumType>> {
354        self.inner.get_desired_delivery_mediums()
355    }
356    ///
357    /// Adds a key-value pair to `ClientMetadata`.
358    ///
359    /// To override the contents of this collection use [`set_client_metadata`](Self::set_client_metadata).
360    ///
361    /// <p>A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.</p>
362    /// <p>You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminCreateUser API action, Amazon Cognito invokes the function that is assigned to the <i>pre sign-up</i> trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a <code>ClientMetadata</code> attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminCreateUser request. In your function code in Lambda, you can process the <code>clientMetadata</code> value to enhance your workflow for your specific needs.</p>
363    /// <p>For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html"> Using Lambda triggers</a> in the <i>Amazon Cognito Developer Guide</i>.</p><note>
364    /// <p>When you use the <code>ClientMetadata</code> parameter, note that Amazon Cognito won't do the following:</p>
365    /// <ul>
366    /// <li>
367    /// <p>Store the <code>ClientMetadata</code> value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the <code>ClientMetadata</code> parameter serves no purpose.</p></li>
368    /// <li>
369    /// <p>Validate the <code>ClientMetadata</code> value.</p></li>
370    /// <li>
371    /// <p>Encrypt the <code>ClientMetadata</code> value. Don't send sensitive information in this parameter.</p></li>
372    /// </ul>
373    /// </note>
374    pub fn client_metadata(
375        mut self,
376        k: impl ::std::convert::Into<::std::string::String>,
377        v: impl ::std::convert::Into<::std::string::String>,
378    ) -> Self {
379        self.inner = self.inner.client_metadata(k.into(), v.into());
380        self
381    }
382    /// <p>A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.</p>
383    /// <p>You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminCreateUser API action, Amazon Cognito invokes the function that is assigned to the <i>pre sign-up</i> trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a <code>ClientMetadata</code> attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminCreateUser request. In your function code in Lambda, you can process the <code>clientMetadata</code> value to enhance your workflow for your specific needs.</p>
384    /// <p>For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html"> Using Lambda triggers</a> in the <i>Amazon Cognito Developer Guide</i>.</p><note>
385    /// <p>When you use the <code>ClientMetadata</code> parameter, note that Amazon Cognito won't do the following:</p>
386    /// <ul>
387    /// <li>
388    /// <p>Store the <code>ClientMetadata</code> value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the <code>ClientMetadata</code> parameter serves no purpose.</p></li>
389    /// <li>
390    /// <p>Validate the <code>ClientMetadata</code> value.</p></li>
391    /// <li>
392    /// <p>Encrypt the <code>ClientMetadata</code> value. Don't send sensitive information in this parameter.</p></li>
393    /// </ul>
394    /// </note>
395    pub fn set_client_metadata(
396        mut self,
397        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
398    ) -> Self {
399        self.inner = self.inner.set_client_metadata(input);
400        self
401    }
402    /// <p>A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.</p>
403    /// <p>You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminCreateUser API action, Amazon Cognito invokes the function that is assigned to the <i>pre sign-up</i> trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a <code>ClientMetadata</code> attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminCreateUser request. In your function code in Lambda, you can process the <code>clientMetadata</code> value to enhance your workflow for your specific needs.</p>
404    /// <p>For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html"> Using Lambda triggers</a> in the <i>Amazon Cognito Developer Guide</i>.</p><note>
405    /// <p>When you use the <code>ClientMetadata</code> parameter, note that Amazon Cognito won't do the following:</p>
406    /// <ul>
407    /// <li>
408    /// <p>Store the <code>ClientMetadata</code> value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the <code>ClientMetadata</code> parameter serves no purpose.</p></li>
409    /// <li>
410    /// <p>Validate the <code>ClientMetadata</code> value.</p></li>
411    /// <li>
412    /// <p>Encrypt the <code>ClientMetadata</code> value. Don't send sensitive information in this parameter.</p></li>
413    /// </ul>
414    /// </note>
415    pub fn get_client_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
416        self.inner.get_client_metadata()
417    }
418}