Skip to main content

search_jobs

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

Overview

Namesearch_jobs
TypeResource
Idaws.backupsearch.search_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
completion_timestring (date-time)The date and time that a search job completed, in Unix format and Coordinated Universal Time (UTC). The value of CompletionTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
creation_timestring (date-time)The date and time that a search job was created, in Unix format and Coordinated Universal Time (UTC). The value of CompletionTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
current_search_progressobjectReturns numbers representing BackupsScannedCount, ItemsScanned, and ItemsMatched.
encryption_key_arnstringThe encryption key for the specified search job. Example: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
item_filtersobjectItem Filters represent all input item properties specified when the search was created.
namestringReturned name of the specified search job.
search_job_arnstringThe unique string that identifies the Amazon Resource Name (ARN) of the specified search job.
search_job_identifierstringThe unique string that identifies the specified search job.
search_scopeobjectThe search scope is all backup properties input into a search.
search_scope_summaryobjectReturned summary of the specified search job scope, including: TotalBackupsToScanCount, the number of recovery points returned by the search. TotalItemsToScanCount, the number of items returned by the search.
statusstringThe current status of the specified search job. A search job may have one of the following statuses: RUNNING; COMPLETED; STOPPED; FAILED; TIMED_OUT; or EXPIRED . (RUNNING, COMPLETED, STOPPING, STOPPED, FAILED)
status_messagestringA status message will be returned for either a earch job with a status of ERRORED or a status of COMPLETED jobs with issues. For example, a message may say that a search contained recovery points unable to be scanned because of a permissions issue.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_search_jobselectsearch_job_identifier, regionThis operation retrieves metadata of a search job, including its progress.
list_search_jobsselectregionStatus, NextToken, MaxResultsThis operation returns a list of search jobs belonging to an account.
start_search_result_export_jobexecregion, SearchJobIdentifier, ExportSpecificationThis operations starts a job to export the results of search job to a designated S3 bucket.

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)
search_job_identifierstringRequired unique string that specifies the search job.
MaxResultsintegerThe maximum number of resource list items to be returned.
NextTokenstringThe next item following a partial list of returned search jobs. For example, if a request is made to return MaxResults number of backups, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
StatusstringInclude this parameter to filter list by search job status.

SELECT examples

This operation retrieves metadata of a search job, including its progress.

SELECT
completion_time,
creation_time,
current_search_progress,
encryption_key_arn,
item_filters,
name,
search_job_arn,
search_job_identifier,
search_scope,
search_scope_summary,
status,
status_message
FROM aws.backupsearch.search_jobs
WHERE search_job_identifier = '{{ search_job_identifier }}' -- required
AND region = '{{ region }}' -- required
;

Lifecycle Methods

This operations starts a job to export the results of search job to a designated S3 bucket.

EXEC aws.backupsearch.search_jobs.start_search_result_export_job
@region='{{ region }}' --required
@@json=
'{
"SearchJobIdentifier": "{{ SearchJobIdentifier }}",
"ExportSpecification": "{{ ExportSpecification }}",
"ClientToken": "{{ ClientToken }}",
"Tags": "{{ Tags }}",
"RoleArn": "{{ RoleArn }}"
}'
;