Skip to main content

jobs

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

Overview

Namejobs
TypeResource
Idaws.dataexchange.jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN for the job.
asset_configurationobjectThe configuration for the asset, including tags applied to assets created by the job.
created_atstring (date-time)The date and time that the job was created, in ISO 8601 format.
detailsobjectDetails about the job.
errorsarrayThe errors associated with jobs.
idstringThe unique identifier for the job. (pattern: <code>[a-zA-Z0-9]{30,40}</code>)
statestringThe state of the job. (WAITING, IN_PROGRESS, ERROR, COMPLETED, CANCELLED, TIMED_OUT)
typestringThe job type. (IMPORT_ASSETS_FROM_S3, IMPORT_ASSET_FROM_SIGNED_URL, EXPORT_ASSETS_TO_S3, EXPORT_ASSET_TO_SIGNED_URL, EXPORT_REVISIONS_TO_S3, IMPORT_ASSETS_FROM_REDSHIFT_DATA_SHARES, IMPORT_ASSET_FROM_API_GATEWAY_API, CREATE_S3_DATA_ACCESS_FROM_S3_BUCKET, IMPORT_ASSETS_FROM_LAKE_FORMATION_TAG_POLICY)
updated_atstring (date-time)The date and time that the job was last updated, in ISO 8601 format.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_jobselectjob_id, regionThis operation returns information about a job.
list_jobsselectregiondataSetId, maxResults, nextToken, revisionIdThis operation lists your jobs sorted by CreatedAt in descending order.
create_jobinsertregionThis operation creates a job.
cancel_jobexecjob_id, regionThis operation cancels a job. Jobs can be cancelled only when they are in the WAITING state.
start_jobexecjob_id, regionThis operation starts a job.

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
job_idstringThe unique identifier for a job.
regionstringAWS region (default: us-east-1)
dataSetIdstringThe unique identifier for a data set.
maxResultsintegerThe maximum number of results returned by a single call.
nextTokenstringThe token value retrieved from a previous call to access the next page of results.
revisionIdstringThe unique identifier for a revision.

SELECT examples

This operation returns information about a job.

SELECT
arn,
asset_configuration,
created_at,
details,
errors,
id,
state,
type,
updated_at
FROM aws.dataexchange.jobs
WHERE job_id = '{{ job_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

This operation creates a job.

INSERT INTO aws.dataexchange.jobs (
AssetConfiguration,
Details,
Type,
region
)
SELECT
'{{ AssetConfiguration }}',
'{{ Details }}',
'{{ Type }}',
'{{ region }}'
RETURNING
arn,
asset_configuration,
created_at,
details,
errors,
id,
state,
type,
updated_at
;

Lifecycle Methods

This operation cancels a job. Jobs can be cancelled only when they are in the WAITING state.

EXEC aws.dataexchange.jobs.cancel_job
@job_id='{{ job_id }}' --required,
@region='{{ region }}' --required
;