jobs
Creates, updates, deletes, gets or lists a jobs resource.
Overview
| Name | jobs |
| Type | Resource |
| Id | aws.mgn.jobs |
Fields
The following fields are returned by SELECT queries:
- describe_jobs
| Name | Datatype | Description |
|---|---|---|
arn | string | the ARN of the specific Job. |
creation_date_time | string | Job creation time. (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 | Job end time. (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 | Job initiated by field. (START_TEST, START_CUTOVER, DIAGNOSTIC, TERMINATE) |
job_id | string | Job ID. (pattern: <code>mgnjob-[0-9a-zA-Z]{17}</code>) |
participating_servers | array | Servers participating in a specific Job. |
status | string | Job status. (PENDING, STARTED, COMPLETED) |
tags | object | Tags associated with specific Job. |
type_ | string | Job type. (LAUNCH, TERMINATE) |
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 toData filters to limit which jobs are returned. The response is sorted by creationDataTime - latest date first. Jobs are normally created by the StartTest, StartCutover, and TerminateTargetInstances 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 toData filters to limit which jobs are returned. The response is sorted by creationDataTime - latest date first. Jobs are normally created by the StartTest, StartCutover, and TerminateTargetInstances 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_servers,
status,
tags,
type_
FROM aws.mgn.jobs
WHERE region = '{{ region }}' -- required
;
DELETE examples
- delete_job
Deletes a single Job by ID.
DELETE FROM aws.mgn.jobs
WHERE region = '{{ region }}' --required
;