deleteMembers method
Deletes GuardDuty member accounts (to the current GuardDuty administrator account) specified by the account IDs.
With autoEnableOrganizationMembers configuration for your
organization set to ALL, you'll receive an error if you
attempt to disable GuardDuty for a member account in your organization.
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.
To find the detectorId in the current Region, see the
Settings page in the GuardDuty console, or run the ListDetectors
API.
Implementation
Future<DeleteMembersResponse> deleteMembers({
required List<String> accountIds,
required String detectorId,
}) async {
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);
}