:doc:`IAM <../../iam>` / Client / resync_mfa_device

*****************
resync_mfa_device
*****************



.. py:method:: 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 <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html>`__ in the *IAM User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResyncMFADevice>`_  


  **Request Syntax**
  ::

    response = client.resync_mfa_device(
        UserName='string',
        SerialNumber='string',
        AuthenticationCode1='string',
        AuthenticationCode2='string'
    )
    
  :type UserName: string
  :param UserName: **[REQUIRED]** 

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

     

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

    

  
  :type SerialNumber: string
  :param SerialNumber: **[REQUIRED]** 

    Serial number that uniquely identifies the MFA device.

     

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

    

  
  :type AuthenticationCode1: string
  :param AuthenticationCode1: **[REQUIRED]** 

    An authentication code emitted by the device.

     

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

    

  
  :type AuthenticationCode2: string
  :param AuthenticationCode2: **[REQUIRED]** 

    A subsequent authentication code emitted by the device.

     

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

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`IAM.Client.exceptions.InvalidAuthenticationCodeException`

  
  *   :py:class:`IAM.Client.exceptions.NoSuchEntityException`

  
  *   :py:class:`IAM.Client.exceptions.LimitExceededException`

  
  *   :py:class:`IAM.Client.exceptions.ServiceFailureException`

  
  *   :py:class:`IAM.Client.exceptions.ConcurrentModificationException`

  