Skip to main content

malware_scans

Creates, updates, deletes, gets or lists a malware_scans resource.

Overview

Namemalware_scans
TypeResource
Idaws.guardduty.malware_scans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe ID for the account that belongs to the scan.
admin_detector_idstringThe unique detector ID of the administrator account that the request is associated with. If the account is an administrator, the AdminDetectorId will be the same as the one used for DetectorId. To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.
attached_volumesarrayList of volumes that were attached to the original instance to be scanned.
detector_idstringThe unique ID of the detector that is associated with the request. To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.
failure_reasonstringRepresents the reason for FAILED scan status.
file_countinteger (int64)Represents the number of files that were scanned.
resource_detailsobjectRepresents the resources that were scanned in the scan entry.
scan_end_timestring (date-time)The timestamp of when the scan was finished.
scan_idstringThe unique scan ID associated with a scan entry.
scan_result_detailsobjectRepresents the result of the scan.
scan_start_timestring (date-time)The timestamp of when the scan was triggered.
scan_statusstringAn enum value representing possible scan statuses. (RUNNING, COMPLETED, FAILED, SKIPPED)
scan_typestringSpecifies the scan type that invoked the malware scan. (GUARDDUTY_INITIATED, ON_DEMAND)
total_bytesinteger (int64)Represents total bytes that were scanned.
trigger_detailsobjectSpecifies the reason why the scan was initiated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_malware_scansselectdetector_id, regionReturns a list of malware scans. Each member account can view the malware scans for their own accounts. An administrator can view the malware scans for all the member accounts. 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.
get_malware_scanselectscan_id, regionRetrieves the detailed information for a specific malware scan. Each member account can view the malware scan details for their own account. An administrator can view malware scan details for all accounts in the organization. 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.
list_malware_scansselectregionmaxResults, nextTokenReturns a list of malware scans. Each member account can view the malware scans for their own accounts. An administrator can view the malware scans for all of its members' accounts.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
detector_idstringThe unique ID of the detector that the request is associated with. To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.
regionstringAWS region (default: us-east-1)
scan_idstringA unique identifier that gets generated when you invoke the API without any error. Each malware scan has a corresponding scan ID. Using this scan ID, you can monitor the status of your malware scan.
maxResultsintegerYou can use this parameter to indicate the maximum number of items that you want in the response. The default value is 50. The maximum value is 50.
nextTokenstringYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the list action. For subsequent calls to the action, fill nextToken in the request with the value of NextToken from the previous response to continue listing results.

SELECT examples

Returns a list of malware scans. Each member account can view the malware scans for their own accounts. An administrator can view the malware scans for all the member accounts. 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.

SELECT
account_id,
admin_detector_id,
attached_volumes,
detector_id,
failure_reason,
file_count,
resource_details,
scan_end_time,
scan_id,
scan_result_details,
scan_start_time,
scan_status,
scan_type,
total_bytes,
trigger_details
FROM aws.guardduty.malware_scans
WHERE detector_id = '{{ detector_id }}' -- required
AND region = '{{ region }}' -- required
;