archiveFindings method
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.
Parameter findingIds
:
The IDs of the findings that you want to archive.
Implementation
Future<void> archiveFindings({
required String detectorId,
required List<String> findingIds,
}) async {
ArgumentError.checkNotNull(detectorId, 'detectorId');
_s.validateStringLength(
'detectorId',
detectorId,
1,
300,
isRequired: true,
);
ArgumentError.checkNotNull(findingIds, 'findingIds');
final $payload = <String, dynamic>{
'findingIds': findingIds,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/detector/${Uri.encodeComponent(detectorId)}/findings/archive',
exceptionFnMap: _exceptionFns,
);
}