Skip to content

IAM  >  Operations  >  deactivate_mfa_device

deactivate_mfa_device

Operation

deactivate_mfa_device async

deactivate_mfa_device(input: DeactivateMFADeviceInput, plugins: list[Plugin] | None = None) -> DeactivateMFADeviceOutput

Deactivates the specified MFA device and removes it from association with the user name for which it was originally enabled.

For more information about creating and working with virtual MFA devices, see Enabling a virtual multi-factor authentication (MFA) device in the IAM User Guide.

Parameters:

Name Type Description Default
input DeactivateMFADeviceInput

An instance of DeactivateMFADeviceInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
DeactivateMFADeviceOutput

An instance of DeactivateMFADeviceOutput.

Input

DeactivateMFADeviceInput dataclass

Bases: _SerdeShape

Dataclass for DeactivateMFADeviceInput structure.

Attributes

serial_number class-attribute instance-attribute
serial_number: str | None = ...

The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the device ARN.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@:/-

user_name class-attribute instance-attribute
user_name: str | None = ...

The name of the user whose MFA device you want to deactivate.

This parameter is optional. If no user name is included, it defaults to the principal making the request. When you make this request with root user credentials, you must use an AssumeRoot session to omit the user name.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

Output

DeactivateMFADeviceOutput dataclass

Bases: _SerdeShape

Dataclass for DeactivateMFADeviceOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.