jobs
Creates, updates, deletes, gets or lists a jobs resource.
Overview
| Name | jobs |
| Type | Resource |
| Id | aws.importexport.jobs |
Fields
The following fields are returned by SELECT queries:
- list_jobs
| Name | Datatype | Description |
|---|---|---|
creation_date | string | Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z". |
is_canceled | boolean | Indicates whether the job was canceled. |
job_id | string | A unique identifier which refers to a particular job. |
job_type | string | Specifies whether the job to initiate is an import or export job. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_jobs | select | region | MaxJobs, Marker, APIVersion | This operation returns the jobs associated with the requester. AWS Import/Export lists the jobs in reverse chronological order based on the date of creation. For example if Job Test1 was created 2009Dec30 and Test2 was created 2010Feb05, the ListJobs operation would return Test2 followed by Test1. |
create_job | insert | JobType, Manifest, ValidateOnly, region | ManifestAddendum, APIVersion | This operation initiates the process of scheduling an upload or download of your data. You include in the request a manifest that describes the data transfer specifics. The response to the request includes a job ID, which you can use in other operations, a signature that you use to identify your storage device, and the address where you should ship your storage device. |
update_job | update | JobId, Manifest, JobType, ValidateOnly, region | APIVersion | You use this operation to change the parameters specified in the original manifest file by supplying a new manifest file. The manifest file attached to this request replaces the original manifest file. You can only use the operation after a CreateJob request but before the data transfer starts and you can only use it on jobs you own. |
cancel_job | exec | JobId, region | APIVersion | This operation cancels a specified job. Only the job owner can cancel it. The operation fails if the job has already started or is complete. |
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 |
|---|---|---|
JobId | string | |
JobType | string | |
Manifest | string | |
ValidateOnly | boolean | |
region | string | AWS region (default: us-east-1) |
APIVersion | string | |
ManifestAddendum | string | |
Marker | string | |
MaxJobs | integer |
SELECT examples
- list_jobs
This operation returns the jobs associated with the requester. AWS Import/Export lists the jobs in reverse chronological order based on the date of creation. For example if Job Test1 was created 2009Dec30 and Test2 was created 2010Feb05, the ListJobs operation would return Test2 followed by Test1.
SELECT
creation_date,
is_canceled,
job_id,
job_type
FROM aws.importexport.jobs
WHERE region = '{{ region }}' -- required
AND MaxJobs = '{{ MaxJobs }}'
AND Marker = '{{ Marker }}'
AND APIVersion = '{{ APIVersion }}'
;
INSERT examples
- create_job
- Manifest
This operation initiates the process of scheduling an upload or download of your data. You include in the request a manifest that describes the data transfer specifics. The response to the request includes a job ID, which you can use in other operations, a signature that you use to identify your storage device, and the address where you should ship your storage device.
INSERT INTO aws.importexport.jobs (
JobType,
Manifest,
ValidateOnly,
region,
ManifestAddendum,
APIVersion
)
SELECT
'{{ JobType }}',
'{{ Manifest }}',
'{{ ValidateOnly }}',
'{{ region }}',
'{{ ManifestAddendum }}',
'{{ APIVersion }}'
RETURNING
line_items
;
# Description fields are for documentation purposes
- name: jobs
props:
- name: JobType
value: "{{ JobType }}"
description: Required parameter for the jobs resource.
- name: Manifest
value: "{{ Manifest }}"
description: Required parameter for the jobs resource.
- name: ValidateOnly
value: {{ ValidateOnly }}
description: Required parameter for the jobs resource.
- name: region
value: "{{ region }}"
description: Required parameter for the jobs resource.
- name: ManifestAddendum
value: "{{ ManifestAddendum }}"
- name: APIVersion
value: "{{ APIVersion }}"
UPDATE examples
- update_job
You use this operation to change the parameters specified in the original manifest file by supplying a new manifest file. The manifest file attached to this request replaces the original manifest file. You can only use the operation after a CreateJob request but before the data transfer starts and you can only use it on jobs you own.
UPDATE aws.importexport.jobs
SET
-- No updatable properties
WHERE
JobId = '{{ JobId }}' --required
AND Manifest = '{{ Manifest }}' --required
AND JobType = '{{ JobType }}' --required
AND ValidateOnly = '{{ ValidateOnly }}' --required
AND region = '{{ region }}' --required
AND APIVersion = '{{ APIVersion}}'
RETURNING
line_items;
Lifecycle Methods
- cancel_job
This operation cancels a specified job. Only the job owner can cancel it. The operation fails if the job has already started or is complete.
EXEC aws.importexport.jobs.cancel_job
@JobId='{{ JobId }}' --required,
@region='{{ region }}' --required,
@APIVersion='{{ APIVersion }}'
;