| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
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
- data ListJobs = ListJobs' {}
- newListJobs :: ListJobs
- listJobs_arrayJobId :: Lens' ListJobs (Maybe Text)
- listJobs_filters :: Lens' ListJobs (Maybe [KeyValuesPair])
- listJobs_jobQueue :: Lens' ListJobs (Maybe Text)
- listJobs_jobStatus :: Lens' ListJobs (Maybe JobStatus)
- listJobs_maxResults :: Lens' ListJobs (Maybe Int)
- listJobs_multiNodeJobId :: Lens' ListJobs (Maybe Text)
- listJobs_nextToken :: Lens' ListJobs (Maybe Text)
- data ListJobsResponse = ListJobsResponse' {
- nextToken :: Maybe Text
- httpStatus :: Int
- jobSummaryList :: [JobSummary]
- newListJobsResponse :: Int -> ListJobsResponse
- listJobsResponse_nextToken :: Lens' ListJobsResponse (Maybe Text)
- listJobsResponse_httpStatus :: Lens' ListJobsResponse Int
- listJobsResponse_jobSummaryList :: Lens' ListJobsResponse [JobSummary]
Creating a Request
Contains the parameters for ListJobs.
See: newListJobs smart constructor.
Constructors
| ListJobs' | |
Fields
| |
Instances
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: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: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 matches any
job name that begins with the string before the '*'. This
corresponds to the
jobNamevalue. For example,test1matches bothTest1andtest1, andtest1*matches bothtest1andTest10. When theJOB_NAMEfilter 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
jobDefinitionvalue. 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 matches any job definition name that begins with the string before the '*'. For example,jd1matches onlyjd1, andjd1*matches bothjd1andjd1A. The version of the job definition that's used doesn't affect the sort order. When theJOB_DEFINITIONfilter is used and the ARN is used (which is in the formarn:${Partition}:batch:${Region}:${Account}:job-definition/${JobDefinitionName}:${Revision}), the results include jobs that used the specified revision of the job definition. Asterisk (*) isn't 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
createdAtvalue. The value is a string representation of the number of milliseconds 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
createdAtvalue. The value is a string representation of the number of milliseconds since 00:00:00 UTC (midnight) on January 1, 1970.
ListJobs, listJobs_jobQueue - The name or full Amazon Resource Name (ARN) of the job queue used to
list jobs.
$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: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.
$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.
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.
Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.
Request Lenses
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_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 matches any
job name that begins with the string before the '*'. This
corresponds to the
jobNamevalue. For example,test1matches bothTest1andtest1, andtest1*matches bothtest1andTest10. When theJOB_NAMEfilter 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
jobDefinitionvalue. 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 matches any job definition name that begins with the string before the '*'. For example,jd1matches onlyjd1, andjd1*matches bothjd1andjd1A. The version of the job definition that's used doesn't affect the sort order. When theJOB_DEFINITIONfilter is used and the ARN is used (which is in the formarn:${Partition}:batch:${Region}:${Account}:job-definition/${JobDefinitionName}:${Revision}), the results include jobs that used the specified revision of the job definition. Asterisk (*) isn't 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
createdAtvalue. The value is a string representation of the number of milliseconds 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
createdAtvalue. The value is a string representation of the number of milliseconds since 00:00:00 UTC (midnight) on January 1, 1970.
listJobs_jobQueue :: Lens' ListJobs (Maybe Text) Source #
The name or full Amazon Resource Name (ARN) of the job queue used to list jobs.
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_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.
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_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.
Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.
Destructuring the Response
data ListJobsResponse Source #
See: newListJobsResponse smart constructor.
Constructors
| ListJobsResponse' | |
Fields
| |
Instances
Arguments
| :: Int | |
| -> ListJobsResponse |
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:
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.