deleteGroup method

Future<void> deleteGroup({
  1. required String groupId,
  2. required String organizationId,
})

Deletes a group from WorkMail.

May throw DirectoryServiceAuthenticationFailedException. May throw DirectoryUnavailableException. May throw EntityStateException. May throw InvalidParameterException. May throw OrganizationNotFoundException. May throw OrganizationStateException. May throw UnsupportedOperationException.

Parameter groupId : The identifier of the group to be deleted.

The identifier can be the GroupId, or Groupname. The following identity formats are available:

  • Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234
  • Group name: group

Parameter organizationId : The organization that contains the group.

Implementation

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