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.
Parameters:
-
detector_id
(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.
-
scan_resource_criteria
(Optional[ScanResourceCriteria], default:
None
)
–
Represents the criteria to be used in the filter for selecting resources to scan.
-
ebs_snapshot_preservation
(Optional[EbsSnapshotPreservation], default:
None
)
–
An enum value representing possible snapshot preservation settings.
Raises:
Source code in docs_src/capo_guardduty/_services/async_guard_duty.py
| async def update_malware_scan_settings(
self,
detector_id: "capo_guardduty.types.detector_id.DetectorId",
*,
config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
scan_resource_criteria: Optional[
"capo_guardduty.types.scan_resource_criteria.ScanResourceCriteria"
] = None,
ebs_snapshot_preservation: Optional[
"capo_guardduty.types.ebs_snapshot_preservation.EbsSnapshotPreservation"
] = None,
) -> "capo_guardduty.types.update_malware_scan_settings_response.UpdateMalwareScanSettingsResponse":
"""<p>Updates the malware scan settings.</p> <p>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 <a href="https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_regions.html">Regions and endpoints</a>.</p>
Args:
detector_id: <p>The unique ID of the detector that specifies the GuardDuty service where you want to update scan settings.</p> <p>To find the <code>detectorId</code> in the current Region, see the Settings page in the GuardDuty console, or run the <a href="https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html">ListDetectors</a> API.</p>
scan_resource_criteria: <p>Represents the criteria to be used in the filter for selecting resources to scan.</p>
ebs_snapshot_preservation: <p>An enum value representing possible snapshot preservation settings.</p>
Raises:
capo_guardduty.errors.bad_request_exception.BadRequestException: <p>A bad request exception object.</p>
capo_guardduty.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error exception object.</p>
capo_guardduty.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_guardduty.types.update_malware_scan_settings_request.UpdateMalwareScanSettingsRequest]",
) -> AsyncOperationResponse[
"capo_guardduty.types.update_malware_scan_settings_response.UpdateMalwareScanSettingsResponse"
]:
import capo_guardduty._operations.guard_duty_api_service.update_malware_scan_settings
(
output,
http_response,
) = await capo_guardduty._operations.guard_duty_api_service.update_malware_scan_settings.async_update_malware_scan_settings(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateMalwareScanSettings")
)
input_: capo_guardduty.types.update_malware_scan_settings_request.UpdateMalwareScanSettingsRequest = {
"detector_id": detector_id
}
if scan_resource_criteria is not None:
input_["scan_resource_criteria"] = scan_resource_criteria
if ebs_snapshot_preservation is not None:
input_["ebs_snapshot_preservation"] = ebs_snapshot_preservation
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|