resyncMFADevice method
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.
May throw ConcurrentModificationException.
May throw InvalidAuthenticationCodeException.
May throw LimitExceededException.
May throw NoSuchEntityException.
May throw ServiceFailureException.
Parameter authenticationCode1 :
An authentication code emitted by the device.
The format for this parameter is a sequence of six digits.
Parameter authenticationCode2 :
A subsequent authentication code emitted by the device.
The format for this parameter is a sequence of six digits.
Parameter serialNumber :
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: _+=,.@-
Parameter userName :
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: _+=,.@-
Implementation
Future<void> resyncMFADevice({
required String authenticationCode1,
required String authenticationCode2,
required String serialNumber,
required String userName,
}) async {
final $request = <String, String>{
'AuthenticationCode1': authenticationCode1,
'AuthenticationCode2': authenticationCode2,
'SerialNumber': serialNumber,
'UserName': userName,
};
await _protocol.send(
$request,
action: 'ResyncMFADevice',
version: '2010-05-08',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
);
}