IAM.Client.
delete_virtual_mfa_device
(**kwargs)¶Deletes a virtual MFA device.
Note
You must deactivate a user's virtual MFA device before you can delete it. For information about deactivating MFA devices, see DeactivateMFADevice.
See also: AWS API Documentation
Request Syntax
response = client.delete_virtual_mfa_device(
SerialNumber='string'
)
[REQUIRED]
The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the same as the 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: =,.@:/-
Exceptions
IAM.Client.exceptions.NoSuchEntityException
IAM.Client.exceptions.DeleteConflictException
IAM.Client.exceptions.LimitExceededException
IAM.Client.exceptions.ServiceFailureException
Examples
The following delete-virtual-mfa-device command removes the specified MFA device from the current AWS account.
response = client.delete_virtual_mfa_device(
SerialNumber='arn:aws:iam::123456789012:mfa/ExampleName',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}