Module Smaws_Client_CognitoIdentityProvider.AdminSetUserMFAPreference

Sets the user's multi-factor authentication (MFA) preference, including which MFA options are activated, and if any are preferred. Only one factor can be set as preferred. The preferred MFA factor will be used to authenticate a user if multiple factors are activated. If multiple options are activated and no preference is set, a challenge to choose an MFA option will be returned during sign-in.

Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.

Learn more

val error_to_string : [ Smaws_Lib.Protocols.AwsJson.error | `InternalErrorException of Types.internal_error_exception | `InvalidParameterException of Types.invalid_parameter_exception | `NotAuthorizedException of Types.not_authorized_exception | `OperationNotEnabledException of Types.operation_not_enabled_exception | `PasswordResetRequiredException of Types.password_reset_required_exception | `ResourceNotFoundException of Types.resource_not_found_exception | `UserNotConfirmedException of Types.user_not_confirmed_exception | `UserNotFoundException of Types.user_not_found_exception ] -> string
val request : 'http_type Smaws_Lib.Context.t -> Types.admin_set_user_mfa_preference_request -> (Types.admin_set_user_mfa_preference_response, [> Smaws_Lib.Protocols.AwsJson.error | `InternalErrorException of Types.internal_error_exception | `InvalidParameterException of Types.invalid_parameter_exception | `NotAuthorizedException of Types.not_authorized_exception | `OperationNotEnabledException of Types.operation_not_enabled_exception | `PasswordResetRequiredException of Types.password_reset_required_exception | `ResourceNotFoundException of Types.resource_not_found_exception | `UserNotConfirmedException of Types.user_not_confirmed_exception | `UserNotFoundException of Types.user_not_found_exception ]) Stdlib.result
val request_with_metadata : 'http_type Smaws_Lib.Context.t -> Types.admin_set_user_mfa_preference_request -> (Types.admin_set_user_mfa_preference_response Smaws_Lib.Response.t, [> Smaws_Lib.Protocols.AwsJson.error | `InternalErrorException of Types.internal_error_exception | `InvalidParameterException of Types.invalid_parameter_exception | `NotAuthorizedException of Types.not_authorized_exception | `OperationNotEnabledException of Types.operation_not_enabled_exception | `PasswordResetRequiredException of Types.password_reset_required_exception | `ResourceNotFoundException of Types.resource_not_found_exception | `UserNotConfirmedException of Types.user_not_confirmed_exception | `UserNotFoundException of Types.user_not_found_exception ] * Smaws_Lib.Response.metadata) Stdlib.result