Skip to main content

jobs

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

Overview

Namejobs
TypeResource
Idaws.drs.jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN of a Job. (pattern: <code>arn:.{16,2044}</code>)
creation_date_timestringThe date and time of when the Job was created. (pattern: <code>[1-9][0-9]*-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](.[0-9]+)?Z</code>)
end_date_timestringThe date and time of when the Job ended. (pattern: <code>[1-9][0-9]*-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](.[0-9]+)?Z</code>)
initiated_bystringA string representing who initiated the Job. (START_RECOVERY, START_DRILL, FAILBACK, DIAGNOSTIC, TERMINATE_RECOVERY_INSTANCES, TARGET_ACCOUNT, CREATE_NETWORK_RECOVERY, UPDATE_NETWORK_RECOVERY, ASSOCIATE_NETWORK_RECOVERY)
job_idstringThe ID of the Job. (pattern: <code>drsjob-[0-9a-zA-Z]{17}</code>)
participating_resourcesarrayA list of resources that the Job is acting upon.
participating_serversarrayA list of servers that the Job is acting upon.
statusstringThe status of the Job. (PENDING, STARTED, COMPLETED)
tagsobjectA list of tags associated with the Job.
type_stringThe type of the Job. (LAUNCH, TERMINATE, CREATE_CONVERTED_SNAPSHOT)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_jobsselectregionReturns a list of Jobs. Use the JobsID and fromDate and toDate filters to limit which jobs are returned. The response is sorted by creationDataTime - latest date first. Jobs are created by the StartRecovery, TerminateRecoveryInstances and StartFailbackLaunch APIs. Jobs are also created by DiagnosticLaunch and TerminateDiagnosticInstances, which are APIs available only to Support and only used in response to relevant support tickets.
delete_jobdeleteregionDeletes a single Job by ID.

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)

SELECT examples

Returns a list of Jobs. Use the JobsID and fromDate and toDate filters to limit which jobs are returned. The response is sorted by creationDataTime - latest date first. Jobs are created by the StartRecovery, TerminateRecoveryInstances and StartFailbackLaunch APIs. Jobs are also created by DiagnosticLaunch and TerminateDiagnosticInstances, which are APIs available only to Support and only used in response to relevant support tickets.

SELECT
arn,
creation_date_time,
end_date_time,
initiated_by,
job_id,
participating_resources,
participating_servers,
status,
tags,
type_
FROM aws.drs.jobs
WHERE region = '{{ region }}' -- required
;

DELETE examples

Deletes a single Job by ID.

DELETE FROM aws.drs.jobs
WHERE region = '{{ region }}' --required
;