resetPassword method
Allows the administrator to reset the password for a user.
May throw DirectoryServiceAuthenticationFailedException.
May throw DirectoryUnavailableException.
May throw EntityNotFoundException.
May throw EntityStateException.
May throw InvalidParameterException.
May throw InvalidPasswordException.
May throw OrganizationNotFoundException.
May throw OrganizationStateException.
May throw UnsupportedOperationException.
Parameter organizationId :
The identifier of the organization that contains the user for which the
password is reset.
Parameter password :
The new password for the user.
Parameter userId :
The identifier of the user for whom the password is reset.
Implementation
Future<void> resetPassword({
required String organizationId,
required String password,
required String userId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkMailService.ResetPassword'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'OrganizationId': organizationId,
'Password': password,
'UserId': userId,
},
);
}