list_tasks

DataSync.Client.list_tasks(**kwargs)

Returns a list of the DataSync tasks you created.

See also: AWS API Documentation

Request Syntax

response = client.list_tasks(
    MaxResults=123,
    NextToken='string',
    Filters=[
        {
            'Name': 'LocationId'|'CreationTime',
            'Values': [
                'string',
            ],
            'Operator': 'Equals'|'NotEquals'|'In'|'LessThanOrEqual'|'LessThan'|'GreaterThanOrEqual'|'GreaterThan'|'Contains'|'NotContains'|'BeginsWith'
        },
    ]
)
Parameters
  • MaxResults (integer) -- The maximum number of tasks to return.
  • NextToken (string) -- An opaque string that indicates the position at which to begin the next list of tasks.
  • Filters (list) --

    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.

      • 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 ).

Return type

dict

Returns

Response Syntax

{
    'Tasks': [
        {
            'TaskArn': 'string',
            'Status': 'AVAILABLE'|'CREATING'|'QUEUED'|'RUNNING'|'UNAVAILABLE',
            'Name': 'string'
        },
    ],
    'NextToken': 'string'
}

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 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.

    • NextToken (string) --

      An opaque string that indicates the position at which to begin returning the next list of tasks.

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException