updateMalwareScanSettings method
- required String detectorId,
- EbsSnapshotPreservation? ebsSnapshotPreservation,
- ScanResourceCriteria? scanResourceCriteria,
Updates the malware scan settings.
There might be regional differences because some data sources might not be available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints.
May throw BadRequestException.
May throw InternalServerErrorException.
Parameter detectorId :
The unique ID of the detector that specifies the GuardDuty service where
you want to update scan settings.
To find the detectorId in the current Region, see the
Settings page in the GuardDuty console, or run the ListDetectors
API.
Parameter ebsSnapshotPreservation :
An enum value representing possible snapshot preservation settings.
Parameter scanResourceCriteria :
Represents the criteria to be used in the filter for selecting resources
to scan.
Implementation
Future<void> updateMalwareScanSettings({
required String detectorId,
EbsSnapshotPreservation? ebsSnapshotPreservation,
ScanResourceCriteria? scanResourceCriteria,
}) async {
final $payload = <String, dynamic>{
if (ebsSnapshotPreservation != null)
'ebsSnapshotPreservation': ebsSnapshotPreservation.value,
if (scanResourceCriteria != null)
'scanResourceCriteria': scanResourceCriteria,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/detector/${Uri.encodeComponent(detectorId)}/malware-scan-settings',
exceptionFnMap: _exceptionFns,
);
}