getMailboxDetails method

Future<GetMailboxDetailsResponse> getMailboxDetails({
  1. required String organizationId,
  2. required String userId,
})

Requests a user's mailbox details for a specified organization and user.

May throw EntityNotFoundException. May throw InvalidParameterException. May throw OrganizationNotFoundException. May throw OrganizationStateException.

Parameter organizationId : The identifier for the organization that contains the user whose mailbox details are being requested.

Parameter userId : The identifier for the user whose mailbox details are being requested.

The identifier can be the UserId, Username, or email. The following identity formats are available:

  • User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234
  • Email address: user@domain.tld
  • User name: user

Implementation

Future<GetMailboxDetailsResponse> getMailboxDetails({
  required String organizationId,
  required String userId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkMailService.GetMailboxDetails'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'OrganizationId': organizationId,
      'UserId': userId,
    },
  );

  return GetMailboxDetailsResponse.fromJson(jsonResponse.body);
}