| Copyright | (c) 2013-2018 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 |
| Language | Haskell2010 |
Network.AWS.ECS.ListTasks
Description
Returns a list of tasks for a specified cluster. You can filter the results by family name, by a particular container instance, or by the desired status of the task with the family , containerInstance , and desiredStatus parameters.
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.
- listTasks :: ListTasks
- data ListTasks
- ltDesiredStatus :: Lens' ListTasks (Maybe DesiredStatus)
- ltCluster :: Lens' ListTasks (Maybe Text)
- ltFamily :: Lens' ListTasks (Maybe Text)
- ltNextToken :: Lens' ListTasks (Maybe Text)
- ltStartedBy :: Lens' ListTasks (Maybe Text)
- ltServiceName :: Lens' ListTasks (Maybe Text)
- ltLaunchType :: Lens' ListTasks (Maybe LaunchType)
- ltContainerInstance :: Lens' ListTasks (Maybe Text)
- ltMaxResults :: Lens' ListTasks (Maybe Int)
- listTasksResponse :: Int -> ListTasksResponse
- data ListTasksResponse
- ltrsNextToken :: Lens' ListTasksResponse (Maybe Text)
- ltrsTaskARNs :: Lens' ListTasksResponse [Text]
- ltrsResponseStatus :: Lens' ListTasksResponse Int
Creating a Request
listTasks :: ListTasks Source #
Creates a value of ListTasks with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ltDesiredStatus- The task desired status with which to filter theListTasksresults. Specifying adesiredStatusofSTOPPEDlimits the results to tasks that Amazon ECS has set the desired status toSTOPPED, which can be useful for debugging tasks that are not starting properly or have died or finished. The default status filter isRUNNING, which shows tasks that Amazon ECS has set the desired status toRUNNING.ltCluster- The short name or full Amazon Resource Name (ARN) of the cluster that hosts the tasks to list. If you do not specify a cluster, the default cluster is assumed.ltFamily- The name of the family with which to filter theListTasksresults. Specifying afamilylimits the results to tasks that belong to that family.ltNextToken- ThenextTokenvalue returned from a previous paginatedListTasksrequest wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue.ltStartedBy- ThestartedByvalue with which to filter the task results. Specifying astartedByvalue limits the results to tasks that were started with that value.ltServiceName- The name of the service with which to filter theListTasksresults. Specifying aserviceNamelimits the results to tasks that belong to that service.ltLaunchType- The launch type for services you want to list.ltContainerInstance- The container instance ID or full ARN of the container instance with which to filter theListTasksresults. Specifying acontainerInstancelimits the results to tasks that belong to that container instance.ltMaxResults- The maximum number of task results returned byListTasksin paginated output. When this parameter is used,ListTasksonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListTasksrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter is not used, thenListTasksreturns up to 100 results and anextTokenvalue if applicable.
See: listTasks smart constructor.
Instances
Request Lenses
ltDesiredStatus :: Lens' ListTasks (Maybe DesiredStatus) Source #
The task desired status with which to filter the ListTasks results. Specifying a desiredStatus of STOPPED limits the results to tasks that Amazon ECS has set the desired status to STOPPED , which 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 .
ltCluster :: Lens' ListTasks (Maybe Text) Source #
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the tasks to list. If you do not specify a cluster, the default cluster is assumed.
ltFamily :: Lens' ListTasks (Maybe Text) Source #
The name of the family with which to filter the ListTasks results. Specifying a family limits the results to tasks that belong to that family.
ltNextToken :: Lens' ListTasks (Maybe Text) Source #
The nextToken value returned from a previous paginated ListTasks 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.
ltStartedBy :: 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.
ltServiceName :: Lens' ListTasks (Maybe Text) Source #
The name of the service with which to filter the ListTasks results. Specifying a serviceName limits the results to tasks that belong to that service.
ltLaunchType :: Lens' ListTasks (Maybe LaunchType) Source #
The launch type for services you want to list.
ltContainerInstance :: Lens' ListTasks (Maybe Text) Source #
The container instance ID or full ARN of the container instance with which to filter the ListTasks results. Specifying a containerInstance limits the results to tasks that belong to that container instance.
ltMaxResults :: 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
Arguments
| :: Int | |
| -> ListTasksResponse |
Creates a value of ListTasksResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ltrsNextToken- ThenextTokenvalue to include in a futureListTasksrequest. When the results of aListTasksrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.ltrsTaskARNs- The list of task ARN entries for theListTasksrequest.ltrsResponseStatus- -- | The response status code.
data ListTasksResponse Source #
See: listTasksResponse smart constructor.
Response Lenses
ltrsNextToken :: 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.
ltrsTaskARNs :: Lens' ListTasksResponse [Text] Source #
The list of task ARN entries for the ListTasks request.
ltrsResponseStatus :: Lens' ListTasksResponse Int Source #
- - | The response status code.