disassociateMembers method

Future<DisassociateMembersResponse> disassociateMembers({
  1. required List<String> accountIds,
  2. required String detectorId,
})

Disassociates GuardDuty member accounts (to the current GuardDuty administrator account) specified by the account IDs.

May throw BadRequestException. May throw InternalServerErrorException.

Parameter accountIds : A list of account IDs of the GuardDuty member accounts that you want to disassociate from the administrator account.

Parameter detectorId : The unique ID of the detector of the GuardDuty account whose members you want to disassociate from the administrator account.

Implementation

Future<DisassociateMembersResponse> disassociateMembers({
  required List<String> accountIds,
  required String detectorId,
}) async {
  ArgumentError.checkNotNull(accountIds, 'accountIds');
  ArgumentError.checkNotNull(detectorId, 'detectorId');
  _s.validateStringLength(
    'detectorId',
    detectorId,
    1,
    300,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'accountIds': accountIds,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/detector/${Uri.encodeComponent(detectorId)}/member/disassociate',
    exceptionFnMap: _exceptionFns,
  );
  return DisassociateMembersResponse.fromJson(response);
}