aws_sdk_cognitoidentityprovider/client/
confirm_forgot_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 [`ConfirmForgotPassword`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`client_id(impl Into<String>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::client_id) / [`set_client_id(Option<String>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::set_client_id):<br>required: **true**<br><p>The ID of the app client where the user wants to reset their password. This parameter is an identifier of the client application that users are resetting their password from, but this operation resets users' irrespective of the app clients they sign in to.</p><br>
7    ///   - [`secret_hash(impl Into<String>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::secret_hash) / [`set_secret_hash(Option<String>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::set_secret_hash):<br>required: **false**<br><p>A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message. For more information about <code>SecretHash</code>, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash">Computing secret hash values</a>.</p><br>
8    ///   - [`username(impl Into<String>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::username) / [`set_username(Option<String>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::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>
9    ///   - [`confirmation_code(impl Into<String>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::confirmation_code) / [`set_confirmation_code(Option<String>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::set_confirmation_code):<br>required: **true**<br><p>The confirmation code that your user pool delivered when your user requested to reset their password.</p><br>
10    ///   - [`password(impl Into<String>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::password) / [`set_password(Option<String>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::set_password):<br>required: **true**<br><p>The new password that your user wants to set.</p><br>
11    ///   - [`analytics_metadata(AnalyticsMetadataType)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::analytics_metadata) / [`set_analytics_metadata(Option<AnalyticsMetadataType>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::set_analytics_metadata):<br>required: **false**<br><p>Information that supports analytics outcomes with Amazon Pinpoint, including the user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier, email address, or phone number.</p><br>
12    ///   - [`user_context_data(UserContextDataType)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::user_context_data) / [`set_user_context_data(Option<UserContextDataType>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::set_user_context_data):<br>required: **false**<br><p>Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat protection evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito when it makes API requests.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-viewing-threat-protection-app.html">Collecting data for threat protection in applications</a>.</p><br>
13    ///   - [`client_metadata(impl Into<String>, impl Into<String>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::client_metadata) / [`set_client_metadata(Option<HashMap::<String, String>>)`](crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::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. When you use the ConfirmForgotPassword API action, Amazon Cognito invokes the function that is assigned to the <i>post confirmation</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 ConfirmForgotPassword 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>
14    /// - On success, responds with [`ConfirmForgotPasswordOutput`](crate::operation::confirm_forgot_password::ConfirmForgotPasswordOutput)
15    /// - On failure, responds with [`SdkError<ConfirmForgotPasswordError>`](crate::operation::confirm_forgot_password::ConfirmForgotPasswordError)
16    pub fn confirm_forgot_password(&self) -> crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder {
17        crate::operation::confirm_forgot_password::builders::ConfirmForgotPasswordFluentBuilder::new(self.handle.clone())
18    }
19}