GuardDuty / Client / get_malware_scan
get_malware_scan¶
- GuardDuty.Client.get_malware_scan(**kwargs)¶
Retrieves 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.
See also: AWS API Documentation
Request Syntax
response = client.get_malware_scan( ScanId='string' )
- Parameters:
ScanId (string) –
[REQUIRED]
A 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.
- Return type:
dict
- Returns:
Response Syntax
{ 'ScanId': 'string', 'DetectorId': 'string', 'AdminDetectorId': 'string', 'ResourceArn': 'string', 'ResourceType': 'EBS_RECOVERY_POINT'|'EBS_SNAPSHOT'|'EBS_VOLUME'|'EC2_AMI'|'EC2_INSTANCE'|'EC2_RECOVERY_POINT'|'S3_RECOVERY_POINT'|'S3_BUCKET', 'ScannedResourcesCount': 123, 'SkippedResourcesCount': 123, 'FailedResourcesCount': 123, 'ScannedResources': [ { 'ScannedResourceArn': 'string', 'ScannedResourceType': 'EBS_RECOVERY_POINT'|'EBS_SNAPSHOT'|'EBS_VOLUME'|'EC2_AMI'|'EC2_INSTANCE'|'EC2_RECOVERY_POINT'|'S3_RECOVERY_POINT'|'S3_BUCKET', 'ScannedResourceStatus': 'RUNNING'|'COMPLETED'|'COMPLETED_WITH_ISSUES'|'FAILED'|'SKIPPED', 'ScanStatusReason': 'ACCESS_DENIED'|'RESOURCE_NOT_FOUND'|'SNAPSHOT_SIZE_LIMIT_EXCEEDED'|'RESOURCE_UNAVAILABLE'|'INCONSISTENT_SOURCE'|'INCREMENTAL_NO_DIFFERENCE'|'NO_EBS_VOLUMES_FOUND'|'UNSUPPORTED_PRODUCT_CODE_TYPE'|'AMI_SNAPSHOT_LIMIT_EXCEEDED'|'UNRELATED_RESOURCES'|'BASE_RESOURCE_NOT_SCANNED'|'BASE_CREATED_AFTER_TARGET'|'UNSUPPORTED_FOR_INCREMENTAL'|'UNSUPPORTED_AMI'|'UNSUPPORTED_SNAPSHOT'|'UNSUPPORTED_COMPOSITE_RECOVERY_POINT', 'ResourceDetails': { 'EbsVolume': { 'VolumeArn': 'string', 'VolumeType': 'string', 'DeviceName': 'string', 'VolumeSizeInGB': 123, 'EncryptionType': 'string', 'SnapshotArn': 'string', 'KmsKeyArn': 'string' }, 'EbsSnapshot': { 'DeviceName': 'string' } } }, ], 'ScanConfiguration': { 'Role': 'string', 'TriggerDetails': { 'GuardDutyFindingId': 'string', 'Description': 'string', 'TriggerType': 'BACKUP'|'GUARDDUTY' }, 'IncrementalScanDetails': { 'BaselineResourceArn': 'string' }, 'RecoveryPoint': { 'BackupVaultName': 'string' } }, 'ScanCategory': 'FULL_SCAN'|'INCREMENTAL_SCAN', 'ScanStatus': 'RUNNING'|'COMPLETED'|'COMPLETED_WITH_ISSUES'|'FAILED'|'SKIPPED', 'ScanStatusReason': 'ACCESS_DENIED'|'RESOURCE_NOT_FOUND'|'SNAPSHOT_SIZE_LIMIT_EXCEEDED'|'RESOURCE_UNAVAILABLE'|'INCONSISTENT_SOURCE'|'INCREMENTAL_NO_DIFFERENCE'|'NO_EBS_VOLUMES_FOUND'|'UNSUPPORTED_PRODUCT_CODE_TYPE'|'AMI_SNAPSHOT_LIMIT_EXCEEDED'|'UNRELATED_RESOURCES'|'BASE_RESOURCE_NOT_SCANNED'|'BASE_CREATED_AFTER_TARGET'|'UNSUPPORTED_FOR_INCREMENTAL'|'UNSUPPORTED_AMI'|'UNSUPPORTED_SNAPSHOT'|'UNSUPPORTED_COMPOSITE_RECOVERY_POINT', 'ScanType': 'BACKUP_INITIATED'|'ON_DEMAND'|'GUARDDUTY_INITIATED', 'ScanStartedAt': datetime(2015, 1, 1), 'ScanCompletedAt': datetime(2015, 1, 1), 'ScanResultDetails': { 'ScanResultStatus': 'NO_THREATS_FOUND'|'THREATS_FOUND', 'SkippedFileCount': 123, 'FailedFileCount': 123, 'ThreatFoundFileCount': 123, 'TotalFileCount': 123, 'TotalBytes': 123, 'UniqueThreatCount': 123, 'Threats': [ { 'Name': 'string', 'Source': 'AMAZON'|'BITDEFENDER', 'Count': 123, 'Hash': 'string', 'ItemDetails': [ { 'ResourceArn': 'string', 'ItemPath': 'string', 'Hash': 'string', 'AdditionalInfo': { 'VersionId': 'string', 'DeviceName': 'string' } }, ] }, ] } }
Response Structure
(dict) –
ScanId (string) –
A unique identifier associated with the malware scan. Each malware scan has a corresponding scan ID. Using this scan ID, you can monitor the status of your malware scan.
DetectorId (string) –
The unique ID of the detector that is associated with the request, if it belongs to an account which is a GuardDuty customer.
To find the
detectorIdin the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.AdminDetectorId (string) –
The unique detector ID of the administrator account that the request is associated with. If the account is an administrator, the
AdminDetectorIdwill be the same as the one used forDetectorId. If the customer is not a GuardDuty customer, this field will not be present..To find the
detectorIdin the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.ResourceArn (string) –
Amazon Resource Name (ARN) of the resource on which a malware scan was invoked.
ResourceType (string) –
The type of resource that was scanned for malware.
ScannedResourcesCount (integer) –
The total number of resources that were successfully scanned. This is dependent on the resource type.
SkippedResourcesCount (integer) –
The total number of resources that were skipped during the scan.
FailedResourcesCount (integer) –
The total number of resources that failed to be scanned.
ScannedResources (list) –
A list of resources along with their metadata that were scanned as part of the malware scan operation.
(dict) –
Contains information about a resource that was scanned as part of the malware scan operation.
ScannedResourceArn (string) –
Amazon Resource Name (ARN) of the scanned resource.
ScannedResourceType (string) –
The resource type of the scanned resource.
ScannedResourceStatus (string) –
The status of the scanned resource.
ScanStatusReason (string) –
The reason for the scan status of this particular resource, if applicable.
ResourceDetails (dict) –
Information about the scanned resource.
EbsVolume (dict) –
Contains information about the EBS volume that was scanned.
VolumeArn (string) –
EBS volume ARN information.
VolumeType (string) –
The EBS volume type.
DeviceName (string) –
The device name for the EBS volume.
VolumeSizeInGB (integer) –
EBS volume size in GB.
EncryptionType (string) –
EBS volume encryption type.
SnapshotArn (string) –
Snapshot ARN of the EBS volume.
KmsKeyArn (string) –
KMS key ARN used to encrypt the EBS volume.
EbsSnapshot (dict) –
Contains information about the EBS snapshot that was scanned.
DeviceName (string) –
The device name of the EBS snapshot that was scanned.
ScanConfiguration (dict) –
Information about the scan configuration used for the malware scan.
Role (string) –
Amazon Resource Name (ARN) of the IAM role that should contain the required permissions for the scan.
TriggerDetails (dict) –
Information about the entity that triggered the malware scan.
GuardDutyFindingId (string) –
The ID of the GuardDuty finding that triggered the malware scan.
Description (string) –
The description of the scan trigger.
TriggerType (string) –
Specifies the trigger type that started the malware scan.
IncrementalScanDetails (dict) –
Information about the incremental scan configuration, if applicable.
BaselineResourceArn (string) –
Amazon Resource Name (ARN) of the baseline resource used for incremental scanning. The scan will only process changes since this baseline resource was created.
RecoveryPoint (dict) –
Information about the recovery point configuration used for the scan, if applicable.
BackupVaultName (string) –
The name of the Amazon Web Services Backup vault that contains the recovery point for the scanned.
ScanCategory (string) –
The category of the malware scan, indicating the type of scan performed.
ScanStatus (string) –
A value representing the current status of the malware scan.
ScanStatusReason (string) –
Represents the reason for the current scan status, if applicable.
ScanType (string) –
A value representing the initiator of the scan.
ScanStartedAt (datetime) –
The timestamp representing when the malware scan was started.
ScanCompletedAt (datetime) –
The timestamp representing when the malware scan was completed.
ScanResultDetails (dict) –
Detailed information about the results of the malware scan, if the scan completed.
ScanResultStatus (string) –
Status indicating whether threats were found for a completed scan.
SkippedFileCount (integer) –
The total number of files that were skipped during the scan.
FailedFileCount (integer) –
The total number of files that failed to be scanned.
ThreatFoundFileCount (integer) –
The total number of files in which threats were detected.
TotalFileCount (integer) –
The total number of files that were processed during the scan.
TotalBytes (integer) –
The total number of bytes that were scanned.
UniqueThreatCount (integer) –
The total number of unique threats that were detected during the scan.
Threats (list) –
The threats that were detected during the malware scan.
(dict) –
Contains information about a specific threat that was detected during the malware scan.
Name (string) –
The name of the detected threat.
Source (string) –
The source that detected this threat.
Count (integer) –
The number of instances of this threat that were detected.
Hash (string) –
The hash value associated with the detected threat.
ItemDetails (list) –
Additional information about where this threat was detected.
(dict) –
Contains detailed information about where a threat was detected.
ResourceArn (string) –
Amazon Resource Name (ARN) of the resource where the threat was detected.
ItemPath (string) –
The path where the threat was detected.
Hash (string) –
The hash value of the infected item.
AdditionalInfo (dict) –
Additional information about the detected threat item.
VersionId (string) –
The version ID of the S3 object, if applicable.
DeviceName (string) –
The device name of the EBS volume, if applicable.
Exceptions
GuardDuty.Client.exceptions.BadRequestExceptionGuardDuty.Client.exceptions.InternalServerErrorExceptionGuardDuty.Client.exceptions.ResourceNotFoundException