scan_jobs
Creates, updates, deletes, gets or lists a scan_jobs resource.
Overview
| Name | scan_jobs |
| Type | Resource |
| Id | aws.backup.scan_jobs |
Fields
The following fields are returned by SELECT queries:
- describe_scan_job
- list_scan_jobs
| Name | Datatype | Description |
|---|---|---|
account_id | string | Returns the account ID that owns the scan job. Pattern: ^[0-9]{12}$ |
backup_vault_arn | string | An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault |
backup_vault_name | string | The 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_date | string (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_time | string (date-time) | The point in time the scan job scanned up to for a continuous backup. |
continuous_scan_start_time | string (date-time) | The point in time the scan job started scan from for a continuous backup. |
created_by | object | Contains identifying information about the creation of a scan job, including the backup plan and rule that initiated the scan. |
creation_date | string (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_arn | string | An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, arn:aws:iam::123456789012:role/S3Access. |
malware_scanner | string | The scanning engine used for the corresponding scan job. Currently only GUARDUTY is supported. (GUARDDUTY) |
recovery_point_arn | string | An 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_arn | string | An ARN that uniquely identifies the source resource of the corresponding recovery point ARN. |
resource_name | string | The non-unique name of the resource that belongs to the specified backup. |
resource_type | string | The 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_arn | string | An 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_id | string | The scan ID generated by Amazon GuardDuty for the corresponding Scan Job ID request from Backup. |
scan_job_id | string | The scan job ID that uniquely identified the request to Backup. |
scan_mode | string | Specifies the scan type used for the scan job. (FULL_SCAN, INCREMENTAL_SCAN) |
scan_result | object | Contains the ScanResultsStatus for the scanning job and returns THREATS_FOUND or NO_THREATS_FOUND for completed jobs. |
scanner_role_arn | string | Specifies the scanner IAM role ARN used to for the scan job. |
state | string | The current state of a scan job. (CANCELED, COMPLETED, COMPLETED_WITH_ISSUES, CREATED, FAILED, RUNNING) |
status_message | string | A detailed message explaining the status of the job to back up a resource. |
| Name | Datatype | Description |
|---|---|---|
account_id | string | The account ID that owns the scan job. |
backup_vault_arn | string | An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault. |
backup_vault_name | string | The 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. |
completion_date | string (date-time) | The date and time that a scan job is completed, 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_time | string (date-time) | The point in time the scan job scanned up to for a continuous backup. |
continuous_scan_start_time | string (date-time) | The point in time the scan job started scan from for a continuous backup. |
created_by | object | Contains identifying information about the creation of a scan job, including the backup plan and rule that initiated the scan. |
creation_date | string (date-time) | The date and time that a scan job is created, 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_arn | string | Specifies the IAM role ARN used to create the scan job; for example, arn:aws:iam::123456789012:role/S3Access. |
malware_scanner | string | The scanning engine used for the scan job. Currently only GUARDDUTY is supported. (GUARDDUTY) |
recovery_point_arn | string | An ARN that uniquely identifies the recovery point being scanned; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. |
resource_arn | string | An ARN that uniquely identifies the source resource of the recovery point being scanned. |
resource_name | string | The non-unique name of the resource that belongs to the specified backup. |
resource_type | string | The type of Amazon Web Services resource being scanned; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database. (EBS, EC2, S3) |
scan_base_recovery_point_arn | string | An ARN that uniquely identifies the base recovery point for scanning. This field is populated when an incremental scan job has taken place. |
scan_id | string | The scan ID generated by the malware scanner for the corresponding scan job. |
scan_job_id | string | The unique identifier that identifies the scan job request to Backup. |
scan_mode | string | Specifies the scan type use for the scan job. Includes: FULL_SCAN will scan the entire data lineage within the backup. INCREMENTAL_SCAN will scan the data difference between the target recovery point and base recovery point ARN. (FULL_SCAN, INCREMENTAL_SCAN) |
scan_result | object | Contains the scan results information, including the status of threats found during scanning. |
scanner_role_arn | string | Specifies the scanner IAM role ARN used for the scan job. |
state | string | The current state of the scan job. Valid values: CREATED | RUNNING | COMPLETED | COMPLETED_WITH_ISSUES | FAILED | CANCELED. (CANCELED, COMPLETED, COMPLETED_WITH_ISSUES, CREATED, FAILED, RUNNING) |
status_message | string | A detailed message explaining the status of the scan job. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_scan_job | select | scan_job_id, region | Returns scan job details for the specified ScanJobID. | |
list_scan_jobs | select | region | ByAccountId, ByBackupVaultName, ByCompleteAfter, ByCompleteBefore, ByMalwareScanner, ByRecoveryPointArn, ByResourceArn, ByResourceType, ByScanResultStatus, ByState, MaxResults, NextToken | Returns 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
scan_job_id | string | Uniquely identifies a request to Backup to scan a resource. |
ByAccountId | string | The 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}$ |
ByBackupVaultName | string | Returns 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}$ |
ByCompleteAfter | string (date-time) | Returns only scan jobs completed after a date expressed in Unix format and Coordinated Universal Time (UTC). |
ByCompleteBefore | string (date-time) | Returns only backup jobs completed before a date expressed in Unix format and Coordinated Universal Time (UTC). |
ByMalwareScanner | string | Returns only the scan jobs for the specified malware scanner. Currently only supports GUARDDUTY. |
ByRecoveryPointArn | string | Returns only the scan jobs that are ran against the specified recovery point. |
ByResourceArn | string | Returns only scan jobs that match the specified resource Amazon Resource Name (ARN). |
ByResourceType | string | Returns 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}$ |
ByScanResultStatus | string | Returns only the scan jobs for the specified scan results: THREATS_FOUND NO_THREATS_FOUND |
ByState | string | Returns only the scan jobs for the specified scanning job state. |
MaxResults | integer | The maximum number of items to be returned. Valid Range: Minimum value of 1. Maximum value of 1000. |
NextToken | string | The 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
- describe_scan_job
- list_scan_jobs
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
;
Returns a list of existing scan jobs for an authenticated account for the last 30 days.
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 region = '{{ region }}' -- required
AND ByAccountId = '{{ ByAccountId }}'
AND ByBackupVaultName = '{{ ByBackupVaultName }}'
AND ByCompleteAfter = '{{ ByCompleteAfter }}'
AND ByCompleteBefore = '{{ ByCompleteBefore }}'
AND ByMalwareScanner = '{{ ByMalwareScanner }}'
AND ByRecoveryPointArn = '{{ ByRecoveryPointArn }}'
AND ByResourceArn = '{{ ByResourceArn }}'
AND ByResourceType = '{{ ByResourceType }}'
AND ByScanResultStatus = '{{ ByScanResultStatus }}'
AND ByState = '{{ ByState }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;