IAM / Client / resync_mfa_device

resync_mfa_device#

IAM.Client.resync_mfa_device(**kwargs)#

Synchronizes the specified MFA device with its IAM resource object on the Amazon Web Services servers.

For more information about creating and working with virtual MFA devices, see Using a virtual MFA device in the IAM User Guide.

See also: AWS API Documentation

Request Syntax

response = client.resync_mfa_device(
    UserName='string',
    SerialNumber='string',
    AuthenticationCode1='string',
    AuthenticationCode2='string'
)
Parameters:
  • UserName (string) –

    [REQUIRED]

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

    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: _+=,.@-

  • SerialNumber (string) –

    [REQUIRED]

    Serial number that uniquely identifies the MFA device.

    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: _+=,.@-

  • AuthenticationCode1 (string) –

    [REQUIRED]

    An authentication code emitted by the device.

    The format for this parameter is a sequence of six digits.

  • AuthenticationCode2 (string) –

    [REQUIRED]

    A subsequent authentication code emitted by the device.

    The format for this parameter is a sequence of six digits.

Returns:

None

Exceptions

  • IAM.Client.exceptions.InvalidAuthenticationCodeException

  • IAM.Client.exceptions.NoSuchEntityException

  • IAM.Client.exceptions.LimitExceededException

  • IAM.Client.exceptions.ServiceFailureException

  • IAM.Client.exceptions.ConcurrentModificationException