archiveFindings method

Future<void> archiveFindings({
  1. required String detectorId,
  2. required List<String> findingIds,
})

Archives GuardDuty findings that are specified by the list of finding IDs.

May throw BadRequestException. May throw InternalServerErrorException.

Parameter detectorId : The ID of the detector that specifies the GuardDuty service whose findings you want to archive.

To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

Parameter findingIds : The IDs of the findings that you want to archive.

Implementation

Future<void> archiveFindings({
  required String detectorId,
  required List<String> findingIds,
}) async {
  final $payload = <String, dynamic>{
    'findingIds': findingIds,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/detector/${Uri.encodeComponent(detectorId)}/findings/archive',
    exceptionFnMap: _exceptionFns,
  );
}