disassociateMemberFromGroup method

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

Removes a member from a group.

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

Parameter groupId : The identifier for the group from which members are removed.

Parameter memberId : The identifier for the member to be removed to the group.

Parameter organizationId : The identifier for the organization under which the group exists.

Implementation

Future<void> disassociateMemberFromGroup({
  required String groupId,
  required String memberId,
  required String organizationId,
}) async {
  ArgumentError.checkNotNull(groupId, 'groupId');
  _s.validateStringLength(
    'groupId',
    groupId,
    12,
    256,
    isRequired: true,
  );
  ArgumentError.checkNotNull(memberId, 'memberId');
  _s.validateStringLength(
    'memberId',
    memberId,
    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.DisassociateMemberFromGroup'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'GroupId': groupId,
      'MemberId': memberId,
      'OrganizationId': organizationId,
    },
  );
}