Skip to main content

jobs

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

Overview

Namejobs
TypeResource
Idaws.s3control.jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
confirmation_requiredbooleanIndicates whether confirmation is required before Amazon S3 begins running the specified job. Confirmation is required only for jobs created through the Amazon S3 console.
creation_timestringA timestamp indicating when this job was created.
descriptionstringThe description for this job, if one was provided in this job's Create Job request.
failure_reasonsstringIf the specified job failed, this field contains information describing the failure.
generated_manifest_descriptorstringThe attribute of the JobDescriptor containing details about the job's generated manifest.
job_arnstringThe Amazon Resource Name (ARN) for this job.
job_idstringThe ID for the specified job.
manifeststringThe configuration information for the specified job's manifest object.
manifest_generatorstringThe manifest generator that was used to generate a job manifest for this job.
operationstringThe operation that the specified job is configured to run on the objects listed in the manifest.
priorityintegerThe priority of the specified job.
progress_summarystringDescribes the total number of tasks that the specified job has run, the number of tasks that succeeded, and the number of tasks that failed.
reportstringContains the configuration information for the job-completion report if you requested one in the Create Job request.
role_arnstringThe Amazon Resource Name (ARN) for the Identity and Access Management (IAM) role assigned to run the tasks for this job.
statusstringThe current status of the specified job.
status_update_reasonstringThe reason for updating the job.
suspended_causestringThe reason why the specified job was suspended. A job is only suspended if you create it through the Amazon S3 console. When you create the job, it enters the Suspended state to await confirmation before running. After you confirm the job, it automatically exits the Suspended state.
suspended_datestringThe timestamp when this job was suspended, if it has been suspended.
termination_datestringA timestamp indicating when this job terminated. A job's termination date is the date and time when it succeeded, failed, or was canceled.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_jobselectx-amz-account-id, id, regionRetrieves the configuration parameters and status for a Batch Operations job. For more information, see S3 Batch Operations in the Amazon S3 User Guide. Permissions To use the DescribeJob operation, you must have permission to perform the s3:DescribeJob action. Related actions include: CreateJob ListJobs UpdateJobPriority UpdateJobStatus
list_jobsselectx-amz-account-id, regionjobStatuses, nextToken, maxResultsLists current S3 Batch Operations jobs as well as the jobs that have ended within the last 90 days for the Amazon Web Services account making the request. For more information, see S3 Batch Operations in the Amazon S3 User Guide. Permissions To use the ListJobs operation, you must have permission to perform the s3:ListJobs action. Related actions include: CreateJob DescribeJob UpdateJobPriority UpdateJobStatus
create_jobinsertx-amz-account-id, region, ClientRequestToken, RoleArnThis operation creates an S3 Batch Operations job. You can use S3 Batch Operations to perform large-scale batch actions on Amazon S3 objects. Batch Operations can run a single action on lists of Amazon S3 objects that you specify. For more information, see S3 Batch Operations in the Amazon S3 User Guide. Permissions For information about permissions required to use the Batch Operations, see Granting permissions for S3 Batch Operations in the Amazon S3 User Guide. Related actions include: DescribeJob ListJobs UpdateJobPriority UpdateJobStatus JobOperation
update_job_priorityupdatex-amz-account-id, id, priority, regionUpdates an existing S3 Batch Operations job's priority. For more information, see S3 Batch Operations in the Amazon S3 User Guide. Permissions To use the UpdateJobPriority operation, you must have permission to perform the s3:UpdateJobPriority action. Related actions include: CreateJob ListJobs DescribeJob UpdateJobStatus
update_job_statusupdatex-amz-account-id, id, requestedJobStatus, regionstatusUpdateReasonUpdates the status for the specified job. Use this operation to confirm that you want to run a job or to cancel an existing job. For more information, see S3 Batch Operations in the Amazon S3 User Guide. Permissions To use the UpdateJobStatus operation, you must have permission to perform the s3:UpdateJobStatus action. Related actions include: CreateJob ListJobs DescribeJob UpdateJobStatus

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
idstringThe ID of the job whose status you want to update.
priorityintegerThe priority you want to assign to this job.
regionstringAWS region (default: us-east-1)
requestedJobStatusstringThe status that you want to move the specified job to.
x-amz-account-idstringThe Amazon Web Services account ID associated with the S3 Batch Operations job.
jobStatusesarrayThe List Jobs request returns jobs that match the statuses listed in this element.
maxResultsintegerThe maximum number of jobs that Amazon S3 will include in the List Jobs response. If there are more jobs than this number, the response will include a pagination token in the NextToken field to enable you to retrieve the next page of results.
nextTokenstringA pagination token to request the next page of results. Use the token that Amazon S3 returned in the NextToken element of the ListJobsResult from the previous List Jobs request.
statusUpdateReasonstringA description of the reason why you want to change the specified job's status. This field can be any string up to the maximum length.

SELECT examples

Retrieves the configuration parameters and status for a Batch Operations job. For more information, see S3 Batch Operations in the Amazon S3 User Guide. Permissions To use the DescribeJob operation, you must have permission to perform the s3:DescribeJob action. Related actions include: CreateJob ListJobs UpdateJobPriority UpdateJobStatus

SELECT
confirmation_required,
creation_time,
description,
failure_reasons,
generated_manifest_descriptor,
job_arn,
job_id,
manifest,
manifest_generator,
operation,
priority,
progress_summary,
report,
role_arn,
status,
status_update_reason,
suspended_cause,
suspended_date,
termination_date
FROM aws.s3control.jobs
WHERE `x-amz-account-id` = '{{ x-amz-account-id }}' -- required
AND id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

This operation creates an S3 Batch Operations job. You can use S3 Batch Operations to perform large-scale batch actions on Amazon S3 objects. Batch Operations can run a single action on lists of Amazon S3 objects that you specify. For more information, see S3 Batch Operations in the Amazon S3 User Guide. Permissions For information about permissions required to use the Batch Operations, see Granting permissions for S3 Batch Operations in the Amazon S3 User Guide. Related actions include: DescribeJob ListJobs UpdateJobPriority UpdateJobStatus JobOperation

INSERT INTO aws.s3control.jobs (
ConfirmationRequired,
Operation,
Report,
ClientRequestToken,
Manifest,
Description,
Priority,
RoleArn,
Tags,
ManifestGenerator,
`x-amz-account-id`,
region
)
SELECT
{{ ConfirmationRequired }},
'{{ Operation }}',
'{{ Report }}',
'{{ ClientRequestToken }}' /* required */,
'{{ Manifest }}',
'{{ Description }}',
{{ Priority }},
'{{ RoleArn }}' /* required */,
'{{ Tags }}',
'{{ ManifestGenerator }}',
'{{ x-amz-account-id }}',
'{{ region }}'
RETURNING
job_id
;

UPDATE examples

Updates an existing S3 Batch Operations job's priority. For more information, see S3 Batch Operations in the Amazon S3 User Guide. Permissions To use the UpdateJobPriority operation, you must have permission to perform the s3:UpdateJobPriority action. Related actions include: CreateJob ListJobs DescribeJob UpdateJobStatus

UPDATE aws.s3control.jobs
SET
-- No updatable properties
WHERE
`x-amz-account-id` = '{{ x-amz-account-id }}' --required
AND id = '{{ id }}' --required
AND priority = '{{ priority }}' --required
AND region = '{{ region }}' --required
RETURNING
job_id,
priority;