Skip to main content

scan_jobs

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

Overview

Namescan_jobs
TypeResource
Idaws.backup.scan_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringReturns the account ID that owns the scan job. Pattern: ^[0-9]{12}$
backup_vault_arnstringAn Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault
backup_vault_namestringThe name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created. Pattern: ^[a-zA-Z0-9-_.]{2,50}$
completion_datestring (date-time)The date and time that a backup index finished creation, in Unix format and Coordinated Universal Time (UTC). The value of CompletionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
continuous_scan_end_timestring (date-time)The point in time the scan job scanned up to for a continuous backup.
continuous_scan_start_timestring (date-time)The point in time the scan job started scan from for a continuous backup.
created_byobjectContains identifying information about the creation of a scan job, including the backup plan and rule that initiated the scan.
creation_datestring (date-time)The date and time that a backup index finished creation, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
iam_role_arnstringAn Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, arn:aws:iam::123456789012:role/S3Access.
malware_scannerstringThe scanning engine used for the corresponding scan job. Currently only GUARDUTY is supported. (GUARDDUTY)
recovery_point_arnstringAn ARN that uniquely identifies the target recovery point for scanning.; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
resource_arnstringAn ARN that uniquely identifies the source resource of the corresponding recovery point ARN.
resource_namestringThe non-unique name of the resource that belongs to the specified backup.
resource_typestringThe type of Amazon Web Services Resource to be backed up; for example, an Amazon Elastic Block Store (Amazon EBS) volume. Pattern: ^[a-zA-Z0-9-_.]{1,50}$ (EBS, EC2, S3)
scan_base_recovery_point_arnstringAn ARN that uniquely identifies the base recovery point for scanning. This field will only be populated when an incremental scan job has taken place.
scan_idstringThe scan ID generated by Amazon GuardDuty for the corresponding Scan Job ID request from Backup.
scan_job_idstringThe scan job ID that uniquely identified the request to Backup.
scan_modestringSpecifies the scan type used for the scan job. (FULL_SCAN, INCREMENTAL_SCAN)
scan_resultobjectContains the ScanResultsStatus for the scanning job and returns THREATS_FOUND or NO_THREATS_FOUND for completed jobs.
scanner_role_arnstringSpecifies the scanner IAM role ARN used to for the scan job.
statestringThe current state of a scan job. (CANCELED, COMPLETED, COMPLETED_WITH_ISSUES, CREATED, FAILED, RUNNING)
status_messagestringA detailed message explaining the status of the job to back up a resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_scan_jobselectscan_job_id, regionReturns scan job details for the specified ScanJobID.
list_scan_jobsselectregionByAccountId, ByBackupVaultName, ByCompleteAfter, ByCompleteBefore, ByMalwareScanner, ByRecoveryPointArn, ByResourceArn, ByResourceType, ByScanResultStatus, ByState, MaxResults, NextTokenReturns a list of existing scan jobs for an authenticated account for the last 30 days.

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
regionstringAWS region (default: us-east-1)
scan_job_idstringUniquely identifies a request to Backup to scan a resource.
ByAccountIdstringThe account ID to list the jobs from. Returns only backup jobs associated with the specified account ID. If used from an Amazon Web Services Organizations management account, passing * returns all jobs across the organization. Pattern: ^[0-9]{12}$
ByBackupVaultNamestringReturns only scan jobs that will be stored in the specified backup vault. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created. Pattern: ^[a-zA-Z0-9-_.]{2,50}$
ByCompleteAfterstring (date-time)Returns only scan jobs completed after a date expressed in Unix format and Coordinated Universal Time (UTC).
ByCompleteBeforestring (date-time)Returns only backup jobs completed before a date expressed in Unix format and Coordinated Universal Time (UTC).
ByMalwareScannerstringReturns only the scan jobs for the specified malware scanner. Currently only supports GUARDDUTY.
ByRecoveryPointArnstringReturns only the scan jobs that are ran against the specified recovery point.
ByResourceArnstringReturns only scan jobs that match the specified resource Amazon Resource Name (ARN).
ByResourceTypestringReturns restore testing selections by the specified restore testing plan name. EBSfor Amazon Elastic Block Store EC2for Amazon Elastic Compute Cloud S3for Amazon Simple Storage Service (Amazon S3) Pattern: ^[a-zA-Z0-9-_.]{1,50}$
ByScanResultStatusstringReturns only the scan jobs for the specified scan results: THREATS_FOUND NO_THREATS_FOUND
ByStatestringReturns only the scan jobs for the specified scanning job state.
MaxResultsintegerThe maximum number of items to be returned. Valid Range: Minimum value of 1. Maximum value of 1000.
NextTokenstringThe next item following a partial list of returned items. For example, if a request is made to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

SELECT examples

Returns scan job details for the specified ScanJobID.

SELECT
account_id,
backup_vault_arn,
backup_vault_name,
completion_date,
continuous_scan_end_time,
continuous_scan_start_time,
created_by,
creation_date,
iam_role_arn,
malware_scanner,
recovery_point_arn,
resource_arn,
resource_name,
resource_type,
scan_base_recovery_point_arn,
scan_id,
scan_job_id,
scan_mode,
scan_result,
scanner_role_arn,
state,
status_message
FROM aws.backup.scan_jobs
WHERE scan_job_id = '{{ scan_job_id }}' -- required
AND region = '{{ region }}' -- required
;