jobs
Creates, updates, deletes, gets or lists a jobs resource.
Overview
| Name | jobs |
| Type | Resource |
| Id | aws.drs.jobs |
Fields
The following fields are returned by SELECT queries:
- describe_jobs
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of a Job. (pattern: <code>arn:.{16,2044}</code>) |
creation_date_time | string | The 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_time | string | The 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_by | string | A 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_id | string | The ID of the Job. (pattern: <code>drsjob-[0-9a-zA-Z]{17}</code>) |
participating_resources | array | A list of resources that the Job is acting upon. |
participating_servers | array | A list of servers that the Job is acting upon. |
status | string | The status of the Job. (PENDING, STARTED, COMPLETED) |
tags | object | A list of tags associated with the Job. |
type_ | string | The type of the Job. (LAUNCH, TERMINATE, CREATE_CONVERTED_SNAPSHOT) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_jobs | select | region | 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. | |
delete_job | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_jobs
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
- delete_job
Deletes a single Job by ID.
DELETE FROM aws.drs.jobs
WHERE region = '{{ region }}' --required
;