aws_sdk_cognitoidentityprovider/client/
admin_set_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 [`AdminSetUserPassword`](crate::operation::admin_set_user_password::builders::AdminSetUserPasswordFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`user_pool_id(impl Into<String>)`](crate::operation::admin_set_user_password::builders::AdminSetUserPasswordFluentBuilder::user_pool_id) / [`set_user_pool_id(Option<String>)`](crate::operation::admin_set_user_password::builders::AdminSetUserPasswordFluentBuilder::set_user_pool_id):<br>required: **true**<br><p>The ID of the user pool where you want to set the user's password.</p><br>
7    ///   - [`username(impl Into<String>)`](crate::operation::admin_set_user_password::builders::AdminSetUserPasswordFluentBuilder::username) / [`set_username(Option<String>)`](crate::operation::admin_set_user_password::builders::AdminSetUserPasswordFluentBuilder::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    ///   - [`password(impl Into<String>)`](crate::operation::admin_set_user_password::builders::AdminSetUserPasswordFluentBuilder::password) / [`set_password(Option<String>)`](crate::operation::admin_set_user_password::builders::AdminSetUserPasswordFluentBuilder::set_password):<br>required: **true**<br><p>The new temporary or permanent password that you want to set for the user. You can't remove the password for a user who already has a password so that they can only sign in with passwordless methods. In this scenario, you must create a new user without a password.</p><br>
9    ///   - [`permanent(bool)`](crate::operation::admin_set_user_password::builders::AdminSetUserPasswordFluentBuilder::permanent) / [`set_permanent(Option<bool>)`](crate::operation::admin_set_user_password::builders::AdminSetUserPasswordFluentBuilder::set_permanent):<br>required: **false**<br><p>Set to <code>true</code> to set a password that the user can immediately sign in with. Set to <code>false</code> to set a temporary password that the user must change on their next sign-in.</p><br>
10    /// - On success, responds with [`AdminSetUserPasswordOutput`](crate::operation::admin_set_user_password::AdminSetUserPasswordOutput)
11    /// - On failure, responds with [`SdkError<AdminSetUserPasswordError>`](crate::operation::admin_set_user_password::AdminSetUserPasswordError)
12    pub fn admin_set_user_password(&self) -> crate::operation::admin_set_user_password::builders::AdminSetUserPasswordFluentBuilder {
13        crate::operation::admin_set_user_password::builders::AdminSetUserPasswordFluentBuilder::new(self.handle.clone())
14    }
15}