libZSservicesZSamazonka-batchZSamazonka-batch
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Batch.ListJobs

Description

Returns a list of Batch jobs.

You must specify only one of the following items:

  • A job queue ID to return a list of jobs in that job queue
  • A multi-node parallel job ID to return a list of nodes for that job
  • An array job ID to return a list of the children for that job

You can filter the results by job status with the jobStatus parameter. If you don't specify a status, only RUNNING jobs are returned.

This operation returns paginated results.

Synopsis

Creating a Request

data ListJobs Source #

Contains the parameters for ListJobs.

See: newListJobs smart constructor.

Constructors

ListJobs' 

Fields

  • filters :: Maybe [KeyValuesPair]

    The filter to apply to the query. Only one filter can be used at a time. When the filter is used, jobStatus is ignored. The filter doesn't apply to child jobs in an array or multi-node parallel (MNP) jobs. The results are sorted by the createdAt field, with the most recent jobs being first.

    JOB_NAME
    The value of the filter is a case-insensitive match for the job name. If the value ends with an asterisk (*), the filter will match any job name that begins with the string before the '*'. This corresponds to the jobName value. For example, test1 matches both Test1 and test1, and test1* matches both test1 and Test10. When the JOB_NAME filter is used, the results are grouped by the job name and version.
    JOB_DEFINITION
    The value for the filter is the name or Amazon Resource Name (ARN) of the job definition. This corresponds to the jobDefinition value. The value is case sensitive. When the value for the filter is the job definition name, the results include all the jobs that used any revision of that job definition name. If the value ends with an asterisk (*), the filter will match any job definition name that begins with the string before the '*'. For example, jd1 matches only jd1, and jd1* matches both jd1 and jd1A. The version of the job definition that's used doesn't affect the sort order. When the JOB_DEFINITION filter is used and the ARN is used (which is in the form arn:${Partition}:batch:${Region}:${Account}:job-definition/${JobDefinitionName}:${Revision}), the results include jobs that used the specified revision of the job definition. Asterisk (*) is not supported when the ARN is used.
    BEFORE_CREATED_AT
    The value for the filter is the time that's before the job was created. This corresponds to the createdAt value. The value is a string representation of the number of seconds since 00:00:00 UTC (midnight) on January 1, 1970.
    AFTER_CREATED_AT
    The value for the filter is the time that's after the job was created. This corresponds to the createdAt value. The value is a string representation of the number of seconds since 00:00:00 UTC (midnight) on January 1, 1970.
  • nextToken :: Maybe Text

    The nextToken value returned from a previous paginated ListJobs request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.

    This token should be treated as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.

  • multiNodeJobId :: Maybe Text

    The job ID for a multi-node parallel job. Specifying a multi-node parallel job ID with this parameter lists all nodes that are associated with the specified job.

  • jobStatus :: Maybe JobStatus

    The job status used to filter jobs in the specified queue. If the filters parameter is specified, the jobStatus parameter is ignored and jobs with any status are returned. If you don't specify a status, only RUNNING jobs are returned.

  • arrayJobId :: Maybe Text

    The job ID for an array job. Specifying an array job ID with this parameter lists all child jobs from within the specified array.

  • jobQueue :: Maybe Text

    The name or full Amazon Resource Name (ARN) of the job queue used to list jobs.

  • maxResults :: Maybe Int

    The maximum number of results returned by ListJobs in paginated output. When this parameter is used, ListJobs only returns maxResults results in a single page and a nextToken response element. The remaining results of the initial request can be seen by sending another ListJobs request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then ListJobs returns up to 100 results and a nextToken value if applicable.

Instances

Instances details
Eq ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Read ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Show ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Generic ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Associated Types

type Rep ListJobs :: Type -> Type #

Methods

from :: ListJobs -> Rep ListJobs x #

to :: Rep ListJobs x -> ListJobs #

NFData ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Methods

rnf :: ListJobs -> () #

Hashable ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Methods

hashWithSalt :: Int -> ListJobs -> Int #

hash :: ListJobs -> Int #

ToJSON ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

AWSPager ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

AWSRequest ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Associated Types

type AWSResponse ListJobs #

ToHeaders ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Methods

toHeaders :: ListJobs -> [Header] #

ToPath ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

ToQuery ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

type Rep ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

type AWSResponse ListJobs Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

newListJobs :: ListJobs 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:

$sel:filters:ListJobs', listJobs_filters - The filter to apply to the query. Only one filter can be used at a time. When the filter is used, jobStatus is ignored. The filter doesn't apply to child jobs in an array or multi-node parallel (MNP) jobs. The results are sorted by the createdAt field, with the most recent jobs being first.

JOB_NAME
The value of the filter is a case-insensitive match for the job name. If the value ends with an asterisk (*), the filter will match any job name that begins with the string before the '*'. This corresponds to the jobName value. For example, test1 matches both Test1 and test1, and test1* matches both test1 and Test10. When the JOB_NAME filter is used, the results are grouped by the job name and version.
JOB_DEFINITION
The value for the filter is the name or Amazon Resource Name (ARN) of the job definition. This corresponds to the jobDefinition value. The value is case sensitive. When the value for the filter is the job definition name, the results include all the jobs that used any revision of that job definition name. If the value ends with an asterisk (*), the filter will match any job definition name that begins with the string before the '*'. For example, jd1 matches only jd1, and jd1* matches both jd1 and jd1A. The version of the job definition that's used doesn't affect the sort order. When the JOB_DEFINITION filter is used and the ARN is used (which is in the form arn:${Partition}:batch:${Region}:${Account}:job-definition/${JobDefinitionName}:${Revision}), the results include jobs that used the specified revision of the job definition. Asterisk (*) is not supported when the ARN is used.
BEFORE_CREATED_AT
The value for the filter is the time that's before the job was created. This corresponds to the createdAt value. The value is a string representation of the number of seconds since 00:00:00 UTC (midnight) on January 1, 1970.
AFTER_CREATED_AT
The value for the filter is the time that's after the job was created. This corresponds to the createdAt value. The value is a string representation of the number of seconds since 00:00:00 UTC (midnight) on January 1, 1970.

$sel:nextToken:ListJobs', listJobs_nextToken - The nextToken value returned from a previous paginated ListJobs request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.

This token should be treated as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.

$sel:multiNodeJobId:ListJobs', listJobs_multiNodeJobId - The job ID for a multi-node parallel job. Specifying a multi-node parallel job ID with this parameter lists all nodes that are associated with the specified job.

$sel:jobStatus:ListJobs', listJobs_jobStatus - The job status used to filter jobs in the specified queue. If the filters parameter is specified, the jobStatus parameter is ignored and jobs with any status are returned. If you don't specify a status, only RUNNING jobs are returned.

$sel:arrayJobId:ListJobs', listJobs_arrayJobId - The job ID for an array job. Specifying an array job ID with this parameter lists all child jobs from within the specified array.

$sel:jobQueue:ListJobs', listJobs_jobQueue - The name or full Amazon Resource Name (ARN) of the job queue used to list jobs.

$sel:maxResults:ListJobs', listJobs_maxResults - The maximum number of results returned by ListJobs in paginated output. When this parameter is used, ListJobs only returns maxResults results in a single page and a nextToken response element. The remaining results of the initial request can be seen by sending another ListJobs request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then ListJobs returns up to 100 results and a nextToken value if applicable.

Request Lenses

listJobs_filters :: Lens' ListJobs (Maybe [KeyValuesPair]) Source #

The filter to apply to the query. Only one filter can be used at a time. When the filter is used, jobStatus is ignored. The filter doesn't apply to child jobs in an array or multi-node parallel (MNP) jobs. The results are sorted by the createdAt field, with the most recent jobs being first.

JOB_NAME
The value of the filter is a case-insensitive match for the job name. If the value ends with an asterisk (*), the filter will match any job name that begins with the string before the '*'. This corresponds to the jobName value. For example, test1 matches both Test1 and test1, and test1* matches both test1 and Test10. When the JOB_NAME filter is used, the results are grouped by the job name and version.
JOB_DEFINITION
The value for the filter is the name or Amazon Resource Name (ARN) of the job definition. This corresponds to the jobDefinition value. The value is case sensitive. When the value for the filter is the job definition name, the results include all the jobs that used any revision of that job definition name. If the value ends with an asterisk (*), the filter will match any job definition name that begins with the string before the '*'. For example, jd1 matches only jd1, and jd1* matches both jd1 and jd1A. The version of the job definition that's used doesn't affect the sort order. When the JOB_DEFINITION filter is used and the ARN is used (which is in the form arn:${Partition}:batch:${Region}:${Account}:job-definition/${JobDefinitionName}:${Revision}), the results include jobs that used the specified revision of the job definition. Asterisk (*) is not supported when the ARN is used.
BEFORE_CREATED_AT
The value for the filter is the time that's before the job was created. This corresponds to the createdAt value. The value is a string representation of the number of seconds since 00:00:00 UTC (midnight) on January 1, 1970.
AFTER_CREATED_AT
The value for the filter is the time that's after the job was created. This corresponds to the createdAt value. The value is a string representation of the number of seconds since 00:00:00 UTC (midnight) on January 1, 1970.

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

The nextToken value returned from a previous paginated ListJobs request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.

This token should be treated as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.

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

The job ID for a multi-node parallel job. Specifying a multi-node parallel job ID with this parameter lists all nodes that are associated with the specified job.

listJobs_jobStatus :: Lens' ListJobs (Maybe JobStatus) Source #

The job status used to filter jobs in the specified queue. If the filters parameter is specified, the jobStatus parameter is ignored and jobs with any status are returned. If you don't specify a status, only RUNNING jobs are returned.

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

The job ID for an array job. Specifying an array job ID with this parameter lists all child jobs from within the specified array.

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

The name or full Amazon Resource Name (ARN) of the job queue used to list jobs.

listJobs_maxResults :: Lens' ListJobs (Maybe Int) Source #

The maximum number of results returned by ListJobs in paginated output. When this parameter is used, ListJobs only returns maxResults results in a single page and a nextToken response element. The remaining results of the initial request can be seen by sending another ListJobs request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then ListJobs returns up to 100 results and a nextToken value if applicable.

Destructuring the Response

data ListJobsResponse Source #

See: newListJobsResponse smart constructor.

Constructors

ListJobsResponse' 

Fields

  • nextToken :: Maybe Text

    The nextToken value to include in a future ListJobs request. When the results of a ListJobs request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

  • httpStatus :: Int

    The response's http status code.

  • jobSummaryList :: [JobSummary]

    A list of job summaries that match the request.

Instances

Instances details
Eq ListJobsResponse Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Read ListJobsResponse Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Show ListJobsResponse Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Generic ListJobsResponse Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Associated Types

type Rep ListJobsResponse :: Type -> Type #

NFData ListJobsResponse Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

Methods

rnf :: ListJobsResponse -> () #

type Rep ListJobsResponse Source # 
Instance details

Defined in Amazonka.Batch.ListJobs

type Rep ListJobsResponse = D1 ('MetaData "ListJobsResponse" "Amazonka.Batch.ListJobs" "libZSservicesZSamazonka-batchZSamazonka-batch" 'False) (C1 ('MetaCons "ListJobsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "jobSummaryList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [JobSummary]))))

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:nextToken:ListJobs', listJobsResponse_nextToken - The nextToken value to include in a future ListJobs request. When the results of a ListJobs request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

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

$sel:jobSummaryList:ListJobsResponse', listJobsResponse_jobSummaryList - A list of job summaries that match the request.

Response Lenses

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

The nextToken value to include in a future ListJobs request. When the results of a ListJobs request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

listJobsResponse_httpStatus :: Lens' ListJobsResponse Int Source #

The response's http status code.

listJobsResponse_jobSummaryList :: Lens' ListJobsResponse [JobSummary] Source #

A list of job summaries that match the request.