search_jobs
Creates, updates, deletes, gets or lists a search_jobs resource.
Overview
| Name | search_jobs |
| Type | Resource |
| Id | aws.backupsearch.search_jobs |
Fields
The following fields are returned by SELECT queries:
- get_search_job
- list_search_jobs
| Name | Datatype | Description |
|---|---|---|
completion_time | string (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_time | string (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_progress | object | Returns numbers representing BackupsScannedCount, ItemsScanned, and ItemsMatched. |
encryption_key_arn | string | The encryption key for the specified search job. Example: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. |
item_filters | object | Item Filters represent all input item properties specified when the search was created. |
name | string | Returned name of the specified search job. |
search_job_arn | string | The unique string that identifies the Amazon Resource Name (ARN) of the specified search job. |
search_job_identifier | string | The unique string that identifies the specified search job. |
search_scope | object | The search scope is all backup properties input into a search. |
search_scope_summary | object | Returned 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. |
status | string | The 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_message | string | A 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. |
| Name | Datatype | Description |
|---|---|---|
completion_time | string (date-time) | This is the completion time of the search job. |
creation_time | string (date-time) | This is the creation time of the search job. |
name | string | This is the name of the search job. |
search_job_arn | string | The unique string that identifies the Amazon Resource Name (ARN) of the specified search job. |
search_job_identifier | string | The unique string that specifies the search job. |
search_scope_summary | object | Returned 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. |
status | string | This is the status of the search job. (RUNNING, COMPLETED, STOPPING, STOPPED, FAILED) |
status_message | string | A 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_search_job | select | search_job_identifier, region | This operation retrieves metadata of a search job, including its progress. | |
list_search_jobs | select | region | Status, NextToken, MaxResults | This operation returns a list of search jobs belonging to an account. |
start_search_result_export_job | exec | region, SearchJobIdentifier, ExportSpecification | This 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
search_job_identifier | string | Required unique string that specifies the search job. |
MaxResults | integer | The maximum number of resource list items to be returned. |
NextToken | string | The 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. |
Status | string | Include this parameter to filter list by search job status. |
SELECT examples
- get_search_job
- list_search_jobs
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
;
This operation returns a list of search jobs belonging to an account.
SELECT
completion_time,
creation_time,
name,
search_job_arn,
search_job_identifier,
search_scope_summary,
status,
status_message
FROM aws.backupsearch.search_jobs
WHERE region = '{{ region }}' -- required
AND Status = '{{ Status }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;
Lifecycle Methods
- start_search_result_export_job
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 }}"
}'
;