aws_sdk_cognitoidentityprovider/client/
update_user_attributes.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`UpdateUserAttributes`](crate::operation::update_user_attributes::builders::UpdateUserAttributesFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`user_attributes(AttributeType)`](crate::operation::update_user_attributes::builders::UpdateUserAttributesFluentBuilder::user_attributes) / [`set_user_attributes(Option<Vec::<AttributeType>>)`](crate::operation::update_user_attributes::builders::UpdateUserAttributesFluentBuilder::set_user_attributes):<br>required: **true**<br><p>An array of name-value pairs representing user attributes.</p> <p>For custom attributes, you must add a <code>custom:</code> prefix to the attribute name.</p> <p>If you have set an attribute to require verification before Amazon Cognito updates its value, this request doesn’t immediately update the value of that attribute. After your user receives and responds to a verification message to verify the new value, Amazon Cognito updates the attribute value. Your user can sign in and receive messages with the original attribute value until they verify the new value.</p><br>
7    ///   - [`access_token(impl Into<String>)`](crate::operation::update_user_attributes::builders::UpdateUserAttributesFluentBuilder::access_token) / [`set_access_token(Option<String>)`](crate::operation::update_user_attributes::builders::UpdateUserAttributesFluentBuilder::set_access_token):<br>required: **true**<br><p>A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for <code>aws.cognito.signin.user.admin</code>.</p><br>
8    ///   - [`client_metadata(impl Into<String>, impl Into<String>)`](crate::operation::update_user_attributes::builders::UpdateUserAttributesFluentBuilder::client_metadata) / [`set_client_metadata(Option<HashMap::<String, String>>)`](crate::operation::update_user_attributes::builders::UpdateUserAttributesFluentBuilder::set_client_metadata):<br>required: **false**<br><p>A map of custom key-value pairs that you can provide as input for any custom workflows that this action initiates.</p> <p>You create custom workflows by assigning Lambda functions to user pool triggers. When you use the UpdateUserAttributes API action, Amazon Cognito invokes the function that is assigned to the <i>custom message</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 UpdateUserAttributes request. In your function code in Lambda, you can process the <code>clientMetadata</code> value to enhance your workflow for your specific needs.</p> <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>  <p>When you use the <code>ClientMetadata</code> parameter, note that Amazon Cognito won't do the following:</p>  <ul>   <li>    <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>   <li>    <p>Validate the <code>ClientMetadata</code> value.</p></li>   <li>    <p>Encrypt the <code>ClientMetadata</code> value. Don't send sensitive information in this parameter.</p></li>  </ul> </note><br>
9    /// - On success, responds with [`UpdateUserAttributesOutput`](crate::operation::update_user_attributes::UpdateUserAttributesOutput) with field(s):
10    ///   - [`code_delivery_details_list(Option<Vec::<CodeDeliveryDetailsType>>)`](crate::operation::update_user_attributes::UpdateUserAttributesOutput::code_delivery_details_list): <p>When the attribute-update request includes an email address or phone number attribute, Amazon Cognito sends a message to users with a code that confirms ownership of the new value that they entered. The <code>CodeDeliveryDetails</code> object is information about the delivery destination for that link or code. This behavior happens in user pools configured to automatically verify changes to those attributes. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#verifying-when-users-change-their-email-or-phone-number">Verifying when users change their email or phone number</a>.</p>
11    /// - On failure, responds with [`SdkError<UpdateUserAttributesError>`](crate::operation::update_user_attributes::UpdateUserAttributesError)
12    pub fn update_user_attributes(&self) -> crate::operation::update_user_attributes::builders::UpdateUserAttributesFluentBuilder {
13        crate::operation::update_user_attributes::builders::UpdateUserAttributesFluentBuilder::new(self.handle.clone())
14    }
15}