:doc:`DataSync <../../datasync>` / Paginator / ListTasks

*********
ListTasks
*********



.. py:class:: DataSync.Paginator.ListTasks

  ::

    
    paginator = client.get_paginator('list_tasks')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`DataSync.Client.list_tasks`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTasks>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          Filters=[
              {
                  'Name': 'LocationId'|'CreationTime',
                  'Values': [
                      'string',
                  ],
                  'Operator': 'Equals'|'NotEquals'|'In'|'LessThanOrEqual'|'LessThan'|'GreaterThanOrEqual'|'GreaterThan'|'Contains'|'NotContains'|'BeginsWith'
              },
          ],
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type Filters: list
    :param Filters: 

      You can use API filters to narrow down the list of resources returned by ``ListTasks``. For example, to retrieve all tasks on a specific source location, you can use ``ListTasks`` with filter name ``LocationId`` and ``Operator Equals`` with the ARN for the location.

      

    
      - *(dict) --* 

        You can use API filters to narrow down the list of resources returned by ``ListTasks``. For example, to retrieve all tasks on a source location, you can use ``ListTasks`` with filter name ``LocationId`` and ``Operator Equals`` with the ARN for the location.

         

        For more information, see `filtering DataSync resources <https://docs.aws.amazon.com/datasync/latest/userguide/query-resources.html>`__.

        

      
        - **Name** *(string) --* **[REQUIRED]** 

          The name of the filter being used. Each API call supports a list of filters that are available for it. For example, ``LocationId`` for ``ListTasks``.

          

        
        - **Values** *(list) --* **[REQUIRED]** 

          The values that you want to filter for. For example, you might want to display only tasks for a specific destination location.

          

        
          - *(string) --* 

          
      
        - **Operator** *(string) --* **[REQUIRED]** 

          The operator that is used to compare filter values (for example, ``Equals`` or ``Contains``).

          

        
      
  
    :type PaginationConfig: dict
    :param PaginationConfig: 

      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 ``NextToken`` will 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 ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax**

      
      ::

        {
            'Tasks': [
                {
                    'TaskArn': 'string',
                    'Status': 'AVAILABLE'|'CREATING'|'QUEUED'|'RUNNING'|'UNAVAILABLE',
                    'Name': 'string',
                    'TaskMode': 'BASIC'|'ENHANCED'
                },
            ],
            
        }
        
      **Response Structure**

      

      - *(dict) --* 

        ListTasksResponse

        
        

        - **Tasks** *(list) --* 

          A list of all the tasks that are returned.

          
          

          - *(dict) --* 

            Represents a single entry in a list of tasks. ``TaskListEntry`` returns an array that contains a list of tasks when the `ListTasks <https://docs.aws.amazon.com/datasync/latest/userguide/API_ListTasks.html>`__ operation is called. A task includes the source and destination file systems to sync and the options to use for the tasks.

            
            

            - **TaskArn** *(string) --* 

              The Amazon Resource Name (ARN) of the task.

              
            

            - **Status** *(string) --* 

              The status of the task.

              
            

            - **Name** *(string) --* 

              The name of the task.

              
            

            - **TaskMode** *(string) --* 

              The task mode that you're using. For more information, see `Choosing a task mode for your data transfer <https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html>`__.

              
        
      
    