listMailboxPermissions method
Lists the mailbox permissions associated with a user, group, or resource mailbox.
May throw EntityNotFoundException.
May throw InvalidParameterException.
May throw OrganizationNotFoundException.
May throw OrganizationStateException.
Parameter entityId :
The identifier of the user, or resource for which to list mailbox
permissions.
The entity ID can accept UserId or ResourceId, Username or Resourcename, or email.
- Entity ID: 12345678-1234-1234-1234-123456789012, or r-0123456789a0123456789b0123456789
- Email address: entity@domain.tld
- Entity name: entity
Parameter organizationId :
The identifier of the organization under which the user, group, or
resource exists.
Parameter maxResults :
The maximum number of results to return in a single call.
Parameter nextToken :
The token to use to retrieve the next page of results. The first call does
not contain any tokens.
Implementation
Future<ListMailboxPermissionsResponse> listMailboxPermissions({
required String entityId,
required String organizationId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkMailService.ListMailboxPermissions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'EntityId': entityId,
'OrganizationId': organizationId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListMailboxPermissionsResponse.fromJson(jsonResponse.body);
}