Skip to main content

jobs

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

Overview

Namejobs
TypeResource
Idaws.glacier.jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
actionstringThe job type. This value is either ArchiveRetrieval, InventoryRetrieval, or Select. (ArchiveRetrieval, InventoryRetrieval, Select)
archive_idstringThe archive ID requested for a select job or archive retrieval. Otherwise, this field is null.
archive_sha256_tree_hashstringThe SHA256 tree hash of the entire archive for an archive retrieval. For inventory retrieval or select jobs, this field is null.
archive_size_in_bytesinteger (int64)For an archive retrieval job, this value is the size in bytes of the archive being requested for download. For an inventory retrieval or select job, this value is null.
completedbooleanThe job status. When a job is completed, you get the job's output using Get Job Output (GET output).
completion_datestringThe UTC time that the job request completed. While the job is in progress, the value is null.
creation_datestringThe UTC date when the job was created. This value is a string representation of ISO 8601 date format, for example "2012-03-20T17:03:43.221Z".
inventory_retrieval_parametersobjectParameters used for range inventory retrieval.
inventory_size_in_bytesinteger (int64)For an inventory retrieval job, this value is the size in bytes of the inventory requested for download. For an archive retrieval or select job, this value is null.
job_descriptionstringThe job description provided when initiating the job.
job_idstringAn opaque string that identifies an Amazon S3 Glacier job.
job_output_pathstringContains the job output location.
output_locationobjectContains the location where the data from the select job is stored.
retrieval_byte_rangestringThe retrieved byte range for archive retrieval jobs in the form StartByteValue-EndByteValue. If no range was specified in the archive retrieval, then the whole archive is retrieved. In this case, StartByteValue equals 0 and EndByteValue equals the size of the archive minus 1. For inventory retrieval or select jobs, this field is null.
sha256_tree_hashstringFor an archive retrieval job, this value is the checksum of the archive. Otherwise, this value is null. The SHA256 tree hash value for the requested range of an archive. If the InitiateJob request for an archive specified a tree-hash aligned range, then this field returns a value. If the whole archive is retrieved, this value is the same as the ArchiveSHA256TreeHash value. This field is null for the following: Archive retrieval jobs that specify a range that is not tree-hash aligned Archival jobs that specify a range that is equal to the whole archive, when the job status is InProgress Inventory jobs Select jobs
sns_topicstringAn Amazon SNS topic that receives notification.
select_parametersobjectContains the parameters used for a select.
status_codestringThe status code can be InProgress, Succeeded, or Failed, and indicates the status of the job. (InProgress, Succeeded, Failed)
status_messagestringA friendly message that describes the job status.
tierstringThe tier to use for a select or an archive retrieval. Valid values are Expedited, Standard, or Bulk. Standard is the default.
vault_arnstringThe Amazon Resource Name (ARN) of the vault from which an archive retrieval was requested.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_jobselectaccount_id, vault_name, job_id, regionThis operation returns information about a job you previously initiated, including the job initiation date, the user who initiated the job, the job status code/message and the Amazon SNS topic to notify after Amazon Glacier (Glacier) completes the job. For more information about initiating a job, see InitiateJob. This operation enables you to check the status of your job. However, it is strongly recommended that you set up an Amazon SNS topic and specify it in your initiate job request so that Glacier can notify the topic after it completes the job. A job ID will not expire for at least 24 hours after Glacier completes the job. An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see Access Control Using AWS Identity and Access Management (IAM). For more information about using this operation, see the documentation for the underlying REST API Describe Job in the Amazon Glacier Developer Guide.
list_jobsselectaccount_id, vault_name, regionlimit, marker, statuscode, completedThis operation lists jobs for a vault, including jobs that are in-progress and jobs that have recently finished. The List Job operation returns a list of these jobs sorted by job initiation time. Amazon Glacier retains recently completed jobs for a period before deleting them; however, it eventually removes completed jobs. The output of completed jobs can be retrieved. Retaining completed jobs for a period of time after they have completed enables you to get a job output in the event you miss the job completion notification or your first attempt to download it fails. For example, suppose you start an archive retrieval job to download an archive. After the job completes, you start to download the archive but encounter a network error. In this scenario, you can retry and download the archive while the job exists. The List Jobs operation supports pagination. You should always check the response Marker field. If there are no more jobs to list, the Marker field is set to null. If there are more jobs to list, the Marker field is set to a non-null value, which you can use to continue the pagination of the list. To return a list of jobs that begins at a specific job, set the marker request parameter to the Marker value for that job that you obtained from a previous List Jobs request. You can set a maximum limit for the number of jobs returned in the response by specifying the limit parameter in the request. The default limit is 50. The number of jobs returned might be fewer than the limit, but the number of returned jobs never exceeds the limit. Additionally, you can filter the jobs list returned by specifying the optional statuscode parameter or completed parameter, or both. Using the statuscode parameter, you can specify to return only jobs that match either the InProgress, Succeeded, or Failed status. Using the completed parameter, you can specify to return only jobs that were completed (true) or jobs that were not completed (false). For more information about using this operation, see the documentation for the underlying REST API List Jobs.

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
account_idstringThe AccountId value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '-' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.
job_idstringThe ID of the job to describe.
regionstringAWS region (default: us-east-1)
vault_namestringThe name of the vault.
completedstringThe state of the jobs to return. You can specify true or false.
limitstringThe maximum number of jobs to be returned. The default limit is 50. The number of jobs returned might be fewer than the specified limit, but the number of returned jobs never exceeds the limit.
markerstringAn opaque string used for pagination. This value specifies the job at which the listing of jobs should begin. Get the marker value from a previous List Jobs response. You only need to include the marker if you are continuing the pagination of results started in a previous List Jobs request.
statuscodestringThe type of job status to return. You can specify the following values: InProgress, Succeeded, or Failed.

SELECT examples

This operation returns information about a job you previously initiated, including the job initiation date, the user who initiated the job, the job status code/message and the Amazon SNS topic to notify after Amazon Glacier (Glacier) completes the job. For more information about initiating a job, see InitiateJob. This operation enables you to check the status of your job. However, it is strongly recommended that you set up an Amazon SNS topic and specify it in your initiate job request so that Glacier can notify the topic after it completes the job. A job ID will not expire for at least 24 hours after Glacier completes the job. An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see Access Control Using AWS Identity and Access Management (IAM). For more information about using this operation, see the documentation for the underlying REST API Describe Job in the Amazon Glacier Developer Guide.

SELECT
action,
archive_id,
archive_sha256_tree_hash,
archive_size_in_bytes,
completed,
completion_date,
creation_date,
inventory_retrieval_parameters,
inventory_size_in_bytes,
job_description,
job_id,
job_output_path,
output_location,
retrieval_byte_range,
sha256_tree_hash,
sns_topic,
select_parameters,
status_code,
status_message,
tier,
vault_arn
FROM aws.glacier.jobs
WHERE account_id = '{{ account_id }}' -- required
AND vault_name = '{{ vault_name }}' -- required
AND job_id = '{{ job_id }}' -- required
AND region = '{{ region }}' -- required
;