'Returns a list of tasks for a specified cluster. You can
filter the results by family name or by a particular container
instance with the `family` and `containerInstance` parameters.
:type cluster: string
:param cluster: The short name or full Amazon Resource Name (ARN) of
the cluster that hosts the tasks you want to list. If you do not
specify a cluster, the default cluster is assumed..
:type container_instance: string
:param container_instance: The container instance UUID or full Amazon
Resource Name (ARN) of the container instance that you want to
filter the `ListTasks` results with. Specifying a
`containerInstance` will limit the results to tasks that belong to
that container instance.
:type family: string
:param family: The name of the family that you want to filter the
`ListTasks` results with. Specifying a `family` will limit the
results to tasks that belong to that family.
:type next_token: string
:param next_token: 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. This value is `null` when there are no more results to
return.
:type max_results: integer
:param max_results: 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.'

def list_tasks(self, cluster=None, container_instance=None, family=None, next_token=None, max_results=None):

    params = {}
    if (cluster is not None):
        params['cluster'] = cluster
    if (container_instance is not None):
        params['containerInstance'] = container_instance
    if (family is not None):
        params['family'] = family
    if (next_token is not None):
        params['nextToken'] = next_token
    if (max_results is not None):
        params['maxResults'] = max_results
    return self._make_request(action='ListTasks', verb='POST', path='/', params=params)
