aws_sdk_cognitoidentityprovider/client/
admin_reset_user_password.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 [`AdminResetUserPassword`](crate::operation::admin_reset_user_password::builders::AdminResetUserPasswordFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`user_pool_id(impl Into<String>)`](crate::operation::admin_reset_user_password::builders::AdminResetUserPasswordFluentBuilder::user_pool_id) / [`set_user_pool_id(Option<String>)`](crate::operation::admin_reset_user_password::builders::AdminResetUserPasswordFluentBuilder::set_user_pool_id):<br>required: **true**<br><p>The ID of the user pool where you want to reset the user's password.</p><br>
7    ///   - [`username(impl Into<String>)`](crate::operation::admin_reset_user_password::builders::AdminResetUserPasswordFluentBuilder::username) / [`set_username(Option<String>)`](crate::operation::admin_reset_user_password::builders::AdminResetUserPasswordFluentBuilder::set_username):<br>required: **true**<br><p>The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If <code>username</code> isn't an alias attribute in your user pool, this value must be the <code>sub</code> of a local user or the username of a user from a third-party IdP.</p><br>
8    ///   - [`client_metadata(impl Into<String>, impl Into<String>)`](crate::operation::admin_reset_user_password::builders::AdminResetUserPasswordFluentBuilder::client_metadata) / [`set_client_metadata(Option<HashMap::<String, String>>)`](crate::operation::admin_reset_user_password::builders::AdminResetUserPasswordFluentBuilder::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 triggers.</p> <p>You create custom workflows by assigning Lambda functions to user pool triggers. The <code>AdminResetUserPassword</code> API operation 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 AdminResetUserPassword 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 [`AdminResetUserPasswordOutput`](crate::operation::admin_reset_user_password::AdminResetUserPasswordOutput)
10    /// - On failure, responds with [`SdkError<AdminResetUserPasswordError>`](crate::operation::admin_reset_user_password::AdminResetUserPasswordError)
11    pub fn admin_reset_user_password(&self) -> crate::operation::admin_reset_user_password::builders::AdminResetUserPasswordFluentBuilder {
12        crate::operation::admin_reset_user_password::builders::AdminResetUserPasswordFluentBuilder::new(self.handle.clone())
13    }
14}