aws_sdk_cognitoidentityprovider/client/
get_user.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 [`GetUser`](crate::operation::get_user::builders::GetUserFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`access_token(impl Into<String>)`](crate::operation::get_user::builders::GetUserFluentBuilder::access_token) / [`set_access_token(Option<String>)`](crate::operation::get_user::builders::GetUserFluentBuilder::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>
7    /// - On success, responds with [`GetUserOutput`](crate::operation::get_user::GetUserOutput) with field(s):
8    ///   - [`username(String)`](crate::operation::get_user::GetUserOutput::username): <p>The name of the user that you requested.</p>
9    ///   - [`user_attributes(Vec::<AttributeType>)`](crate::operation::get_user::GetUserOutput::user_attributes): <p>An array of name-value pairs representing user attributes.</p> <p>Custom attributes are prepended with the <code>custom:</code> prefix.</p>
10    ///   - [`mfa_options(Option<Vec::<MfaOptionType>>)`](crate::operation::get_user::GetUserOutput::mfa_options): <p><i>This response parameter is no longer supported.</i> It provides information only about SMS MFA configurations. It doesn't provide information about time-based one-time password (TOTP) software token MFA configurations. To look up information about either type of MFA configuration, use UserMFASettingList instead.</p>
11    ///   - [`preferred_mfa_setting(Option<String>)`](crate::operation::get_user::GetUserOutput::preferred_mfa_setting): <p>The user's preferred MFA. Users can prefer SMS message, email message, or TOTP MFA.</p>
12    ///   - [`user_mfa_setting_list(Option<Vec::<String>>)`](crate::operation::get_user::GetUserOutput::user_mfa_setting_list): <p>The MFA options that are activated for the user. The possible values in this list are <code>SMS_MFA</code>, <code>EMAIL_OTP</code>, and <code>SOFTWARE_TOKEN_MFA</code>.</p>
13    /// - On failure, responds with [`SdkError<GetUserError>`](crate::operation::get_user::GetUserError)
14    pub fn get_user(&self) -> crate::operation::get_user::builders::GetUserFluentBuilder {
15        crate::operation::get_user::builders::GetUserFluentBuilder::new(self.handle.clone())
16    }
17}