updateImpersonationRole method
Updates an impersonation role for the given WorkMail organization.
May throw EntityNotFoundException.
May throw EntityStateException.
May throw InvalidParameterException.
May throw LimitExceededException.
May throw OrganizationNotFoundException.
May throw OrganizationStateException.
May throw ResourceNotFoundException.
Parameter impersonationRoleId :
The ID of the impersonation role to update.
Parameter name :
The updated impersonation role name.
Parameter organizationId :
The WorkMail organization that contains the impersonation role to update.
Parameter rules :
The updated list of rules.
Parameter type :
The updated impersonation role type.
Parameter description :
The updated impersonation role description.
Implementation
Future<void> updateImpersonationRole({
required String impersonationRoleId,
required String name,
required String organizationId,
required List<ImpersonationRule> rules,
required ImpersonationRoleType type,
String? description,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkMailService.UpdateImpersonationRole'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ImpersonationRoleId': impersonationRoleId,
'Name': name,
'OrganizationId': organizationId,
'Rules': rules,
'Type': type.value,
if (description != null) 'Description': description,
},
);
}