ECS / Paginator / ListTasks
ListTasks#
- class ECS.Paginator.ListTasks#
paginator = client.get_paginator('list_tasks')
- paginate(**kwargs)#
Creates an iterator that will paginate through responses from
ECS.Client.list_tasks().See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate( cluster='string', containerInstance='string', family='string', startedBy='string', serviceName='string', desiredStatus='RUNNING'|'PENDING'|'STOPPED', launchType='EC2'|'FARGATE'|'EXTERNAL', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } )
- Parameters:
cluster (string) – The short name or full Amazon Resource Name (ARN) of the cluster to use when filtering the
ListTasksresults. If you do not specify a cluster, the default cluster is assumed.containerInstance (string) – The container instance ID or full ARN of the container instance to use when filtering the
ListTasksresults. Specifying acontainerInstancelimits the results to tasks that belong to that container instance.family (string) – The name of the task definition family to use when filtering the
ListTasksresults. Specifying afamilylimits the results to tasks that belong to that family.startedBy (string) –
The
startedByvalue to filter the task results with. Specifying astartedByvalue limits the results to tasks that were started with that value.When you specify
startedByas the filter, it must be the only filter that you use.serviceName (string) – The name of the service to use when filtering the
ListTasksresults. Specifying aserviceNamelimits the results to tasks that belong to that service.desiredStatus (string) –
The task desired status to use when filtering the
ListTasksresults. Specifying adesiredStatusofSTOPPEDlimits the results to tasks that Amazon ECS has set the desired status toSTOPPED. This can be useful for debugging tasks that aren’t starting properly or have died or finished. The default status filter isRUNNING, which shows tasks that Amazon ECS has set the desired status toRUNNING.Note
Although you can filter results based on a desired status of
PENDING, this doesn’t return any results. Amazon ECS never sets the desired status of a task to that value (only a task’slastStatusmay have a value ofPENDING).launchType (string) – The launch type to use when filtering the
ListTasksresults.PaginationConfig (dict) –
A dictionary that provides parameters to control pagination.
MaxItems (integer) –
The total number of items to return. If the total number of items available is more than the value specified in max-items then a
NextTokenwill be provided in the output that you can use to resume pagination.PageSize (integer) –
The size of each page.
StartingToken (string) –
A token to specify where to start paginating. This is the
NextTokenfrom a previous response.
- Return type:
dict
- Returns:
Response Syntax
{ 'taskArns': [ 'string', ], 'NextToken': 'string' }
Response Structure
(dict) –
taskArns (list) –
The list of task ARN entries for the
ListTasksrequest.(string) –
NextToken (string) –
A token to resume pagination.