Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Returns a list of tasks. You can filter the results by cluster, task definition family, container instance, launch type, what IAM principal started the task, or by the desired status of the task.
Recently stopped tasks might appear in the returned results. Currently, stopped tasks appear in the returned results for at least one hour.
This operation returns paginated results.
Synopsis
- data ListTasks = ListTasks' {}
- newListTasks :: ListTasks
- listTasks_desiredStatus :: Lens' ListTasks (Maybe DesiredStatus)
- listTasks_cluster :: Lens' ListTasks (Maybe Text)
- listTasks_family :: Lens' ListTasks (Maybe Text)
- listTasks_nextToken :: Lens' ListTasks (Maybe Text)
- listTasks_startedBy :: Lens' ListTasks (Maybe Text)
- listTasks_serviceName :: Lens' ListTasks (Maybe Text)
- listTasks_launchType :: Lens' ListTasks (Maybe LaunchType)
- listTasks_containerInstance :: Lens' ListTasks (Maybe Text)
- listTasks_maxResults :: Lens' ListTasks (Maybe Int)
- data ListTasksResponse = ListTasksResponse' {}
- newListTasksResponse :: Int -> ListTasksResponse
- listTasksResponse_nextToken :: Lens' ListTasksResponse (Maybe Text)
- listTasksResponse_taskArns :: Lens' ListTasksResponse (Maybe [Text])
- listTasksResponse_httpStatus :: Lens' ListTasksResponse Int
Creating a Request
See: newListTasks
smart constructor.
ListTasks' | |
|
Instances
newListTasks :: ListTasks Source #
Create a value of ListTasks
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:desiredStatus:ListTasks'
, listTasks_desiredStatus
- The task desired status to use when filtering the ListTasks
results.
Specifying a desiredStatus
of STOPPED
limits the results to tasks
that Amazon ECS has set the desired status to STOPPED
. This can be
useful for debugging tasks that are not starting properly or have died
or finished. The default status filter is RUNNING
, which shows tasks
that Amazon ECS has set the desired status to RUNNING
.
Although you can filter results based on a desired status of PENDING
,
this does not return any results. Amazon ECS never sets the desired
status of a task to that value (only a task's lastStatus
may have a
value of PENDING
).
$sel:cluster:ListTasks'
, listTasks_cluster
- The short name or full Amazon Resource Name (ARN) of the cluster to use
when filtering the ListTasks
results. If you do not specify a cluster,
the default cluster is assumed.
$sel:family:ListTasks'
, listTasks_family
- The name of the task definition family to use when filtering the
ListTasks
results. Specifying a family
limits the results to tasks
that belong to that family.
$sel:nextToken:ListTasks'
, listTasks_nextToken
- The nextToken
value returned from a ListTasks
request indicating
that more results are available to fulfill the request and further calls
will be needed. If maxResults
was provided, it is possible the number
of results to be fewer than maxResults
.
This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
$sel:startedBy:ListTasks'
, listTasks_startedBy
- The startedBy
value with which to filter the task results. Specifying
a startedBy
value limits the results to tasks that were started with
that value.
$sel:serviceName:ListTasks'
, listTasks_serviceName
- The name of the service to use when filtering the ListTasks
results.
Specifying a serviceName
limits the results to tasks that belong to
that service.
$sel:launchType:ListTasks'
, listTasks_launchType
- The launch type to use when filtering the ListTasks
results.
$sel:containerInstance:ListTasks'
, listTasks_containerInstance
- The container instance ID or full ARN of the container instance to use
when filtering the ListTasks
results. Specifying a containerInstance
limits the results to tasks that belong to that container instance.
$sel:maxResults:ListTasks'
, listTasks_maxResults
- The maximum number of task results returned by ListTasks
in paginated
output. When this parameter is used, ListTasks
only returns
maxResults
results in a single page along with a nextToken
response
element. The remaining results of the initial request can be seen by
sending another ListTasks
request with the returned nextToken
value.
This value can be between 1 and 100. If this parameter is not used, then
ListTasks
returns up to 100 results and a nextToken
value if
applicable.
Request Lenses
listTasks_desiredStatus :: Lens' ListTasks (Maybe DesiredStatus) Source #
The task desired status to use when filtering the ListTasks
results.
Specifying a desiredStatus
of STOPPED
limits the results to tasks
that Amazon ECS has set the desired status to STOPPED
. This can be
useful for debugging tasks that are not starting properly or have died
or finished. The default status filter is RUNNING
, which shows tasks
that Amazon ECS has set the desired status to RUNNING
.
Although you can filter results based on a desired status of PENDING
,
this does not return any results. Amazon ECS never sets the desired
status of a task to that value (only a task's lastStatus
may have a
value of PENDING
).
listTasks_cluster :: Lens' ListTasks (Maybe Text) Source #
The short name or full Amazon Resource Name (ARN) of the cluster to use
when filtering the ListTasks
results. If you do not specify a cluster,
the default cluster is assumed.
listTasks_family :: Lens' ListTasks (Maybe Text) Source #
The name of the task definition family to use when filtering the
ListTasks
results. Specifying a family
limits the results to tasks
that belong to that family.
listTasks_nextToken :: Lens' ListTasks (Maybe Text) Source #
The nextToken
value returned from a ListTasks
request indicating
that more results are available to fulfill the request and further calls
will be needed. If maxResults
was provided, it is possible the number
of results to be fewer than maxResults
.
This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
listTasks_startedBy :: Lens' ListTasks (Maybe Text) Source #
The startedBy
value with which to filter the task results. Specifying
a startedBy
value limits the results to tasks that were started with
that value.
listTasks_serviceName :: Lens' ListTasks (Maybe Text) Source #
The name of the service to use when filtering the ListTasks
results.
Specifying a serviceName
limits the results to tasks that belong to
that service.
listTasks_launchType :: Lens' ListTasks (Maybe LaunchType) Source #
The launch type to use when filtering the ListTasks
results.
listTasks_containerInstance :: Lens' ListTasks (Maybe Text) Source #
The container instance ID or full ARN of the container instance to use
when filtering the ListTasks
results. Specifying a containerInstance
limits the results to tasks that belong to that container instance.
listTasks_maxResults :: Lens' ListTasks (Maybe Int) Source #
The maximum number of task results returned by ListTasks
in paginated
output. When this parameter is used, ListTasks
only returns
maxResults
results in a single page along with a nextToken
response
element. The remaining results of the initial request can be seen by
sending another ListTasks
request with the returned nextToken
value.
This value can be between 1 and 100. If this parameter is not used, then
ListTasks
returns up to 100 results and a nextToken
value if
applicable.
Destructuring the Response
data ListTasksResponse Source #
See: newListTasksResponse
smart constructor.
ListTasksResponse' | |
|
Instances
Create a value of ListTasksResponse
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:ListTasks'
, listTasksResponse_nextToken
- The nextToken
value to include in a future ListTasks
request. When
the results of a ListTasks
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:taskArns:ListTasksResponse'
, listTasksResponse_taskArns
- The list of task ARN entries for the ListTasks
request.
$sel:httpStatus:ListTasksResponse'
, listTasksResponse_httpStatus
- The response's http status code.
Response Lenses
listTasksResponse_nextToken :: Lens' ListTasksResponse (Maybe Text) Source #
The nextToken
value to include in a future ListTasks
request. When
the results of a ListTasks
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.
listTasksResponse_taskArns :: Lens' ListTasksResponse (Maybe [Text]) Source #
The list of task ARN entries for the ListTasks
request.
listTasksResponse_httpStatus :: Lens' ListTasksResponse Int Source #
The response's http status code.