deleteAlias method
Remove one or more specified aliases from a set of aliases for a given user.
May throw EntityNotFoundException. May throw EntityStateException. May throw InvalidParameterException. May throw OrganizationNotFoundException. May throw OrganizationStateException.
Parameter alias
:
The aliases to be removed from the user's set of aliases. Duplicate
entries in the list are collapsed into single entries (the list is
transformed into a set).
Parameter entityId
:
The identifier for the member (user or group) from which to have the
aliases removed.
Parameter organizationId
:
The identifier for the organization under which the user exists.
Implementation
Future<void> deleteAlias({
required String alias,
required String entityId,
required String organizationId,
}) async {
ArgumentError.checkNotNull(alias, 'alias');
_s.validateStringLength(
'alias',
alias,
1,
254,
isRequired: true,
);
ArgumentError.checkNotNull(entityId, 'entityId');
_s.validateStringLength(
'entityId',
entityId,
12,
256,
isRequired: true,
);
ArgumentError.checkNotNull(organizationId, 'organizationId');
_s.validateStringLength(
'organizationId',
organizationId,
34,
34,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkMailService.DeleteAlias'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Alias': alias,
'EntityId': entityId,
'OrganizationId': organizationId,
},
);
}