amazonka-glacier-2.0: Amazon Glacier SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Glacier.ListJobs

Description

This 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.

This operation returns paginated results.

Synopsis

Creating a Request

data ListJobs Source #

Provides options for retrieving a job list for an Amazon S3 Glacier vault.

See: newListJobs smart constructor.

Constructors

ListJobs' 

Fields

  • completed :: Maybe Text

    The state of the jobs to return. You can specify true or false.

  • limit :: Maybe Text

    The 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.

  • marker :: Maybe Text

    An 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.

  • statuscode :: Maybe Text

    The type of job status to return. You can specify the following values: InProgress, Succeeded, or Failed.

  • accountId :: Text

    The 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 S3 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.

  • vaultName :: Text

    The name of the vault.

Instances

Instances details
ToHeaders ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

Methods

toHeaders :: ListJobs -> [Header] #

ToPath ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

ToQuery ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

AWSPager ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

AWSRequest ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

Associated Types

type AWSResponse ListJobs #

Generic ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

Associated Types

type Rep ListJobs :: Type -> Type #

Methods

from :: ListJobs -> Rep ListJobs x #

to :: Rep ListJobs x -> ListJobs #

Read ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

Show ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

NFData ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

Methods

rnf :: ListJobs -> () #

Eq ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

Hashable ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

Methods

hashWithSalt :: Int -> ListJobs -> Int #

hash :: ListJobs -> Int #

type AWSResponse ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

type Rep ListJobs Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

newListJobs Source #

Create a value of ListJobs with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

ListJobs, listJobs_completed - The state of the jobs to return. You can specify true or false.

ListJobs, listJobs_limit - The 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.

ListJobs, listJobs_marker - An 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.

$sel:statuscode:ListJobs', listJobs_statuscode - The type of job status to return. You can specify the following values: InProgress, Succeeded, or Failed.

$sel:accountId:ListJobs', listJobs_accountId - The 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 S3 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.

ListJobs, listJobs_vaultName - The name of the vault.

Request Lenses

listJobs_completed :: Lens' ListJobs (Maybe Text) Source #

The state of the jobs to return. You can specify true or false.

listJobs_limit :: Lens' ListJobs (Maybe Text) Source #

The 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.

listJobs_marker :: Lens' ListJobs (Maybe Text) Source #

An 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.

listJobs_statuscode :: Lens' ListJobs (Maybe Text) Source #

The type of job status to return. You can specify the following values: InProgress, Succeeded, or Failed.

listJobs_accountId :: Lens' ListJobs Text Source #

The 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 S3 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.

listJobs_vaultName :: Lens' ListJobs Text Source #

The name of the vault.

Destructuring the Response

data ListJobsResponse Source #

Contains the Amazon S3 Glacier response to your request.

See: newListJobsResponse smart constructor.

Constructors

ListJobsResponse' 

Fields

  • jobList :: Maybe [GlacierJobDescription]

    A list of job objects. Each job object contains metadata describing the job.

  • marker :: Maybe Text

    An opaque string used for pagination that specifies the job at which the listing of jobs should begin. You get the marker value from a previous List Jobs response. You only need to include the marker if you are continuing the pagination of the results started in a previous List Jobs request.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic ListJobsResponse Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

Associated Types

type Rep ListJobsResponse :: Type -> Type #

Read ListJobsResponse Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

Show ListJobsResponse Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

NFData ListJobsResponse Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

Methods

rnf :: ListJobsResponse -> () #

Eq ListJobsResponse Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

type Rep ListJobsResponse Source # 
Instance details

Defined in Amazonka.Glacier.ListJobs

type Rep ListJobsResponse = D1 ('MetaData "ListJobsResponse" "Amazonka.Glacier.ListJobs" "amazonka-glacier-2.0-17Kmjv8nUJeKOtbrjLyy76" 'False) (C1 ('MetaCons "ListJobsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "jobList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [GlacierJobDescription])) :*: (S1 ('MetaSel ('Just "marker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newListJobsResponse Source #

Create a value of ListJobsResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:jobList:ListJobsResponse', listJobsResponse_jobList - A list of job objects. Each job object contains metadata describing the job.

ListJobs, listJobsResponse_marker - An opaque string used for pagination that specifies the job at which the listing of jobs should begin. You get the marker value from a previous List Jobs response. You only need to include the marker if you are continuing the pagination of the results started in a previous List Jobs request.

$sel:httpStatus:ListJobsResponse', listJobsResponse_httpStatus - The response's http status code.

Response Lenses

listJobsResponse_jobList :: Lens' ListJobsResponse (Maybe [GlacierJobDescription]) Source #

A list of job objects. Each job object contains metadata describing the job.

listJobsResponse_marker :: Lens' ListJobsResponse (Maybe Text) Source #

An opaque string used for pagination that specifies the job at which the listing of jobs should begin. You get the marker value from a previous List Jobs response. You only need to include the marker if you are continuing the pagination of the results started in a previous List Jobs request.

listJobsResponse_httpStatus :: Lens' ListJobsResponse Int Source #

The response's http status code.