deleteMembers method

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

Deletes 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 delete.

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

Implementation

Future<DeleteMembersResponse> deleteMembers({
  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/delete',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteMembersResponse.fromJson(response);
}