:doc:`MWAAServerless <../../mwaa-serverless>` / Client / list_task_instances

*******************
list_task_instances
*******************



.. py:method:: MWAAServerless.Client.list_task_instances(**kwargs)

  

  Lists all task instances for a specific workflow run, with optional pagination support.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mwaa-serverless-2024-07-26/ListTaskInstances>`_  


  **Request Syntax**
  ::

    response = client.list_task_instances(
        WorkflowArn='string',
        RunId='string',
        MaxResults=123,
        NextToken='string'
    )
    
  :type WorkflowArn: string
  :param WorkflowArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the workflow that contains the run.

    

  
  :type RunId: string
  :param RunId: **[REQUIRED]** 

    The unique identifier of the workflow run for which you want a list of task instances.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of task instances to return in a single response.

    

  
  :type NextToken: string
  :param NextToken: 

    The pagination token you need to use to retrieve the next set of results. This value is returned from a previous call to ``ListTaskInstances``.

    

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

    
    ::

      {
          'TaskInstances': [
              {
                  'WorkflowArn': 'string',
                  'WorkflowVersion': 'string',
                  'RunId': 'string',
                  'TaskInstanceId': 'string',
                  'Status': 'QUEUED'|'FAILED'|'SCHEDULED'|'RUNNING'|'SUCCESS'|'UP_FOR_RESCHEDULE'|'UP_FOR_RETRY'|'UPSTREAM_FAILED'|'REMOVED'|'RESTARTING'|'DEFERRED'|'NONE'|'CANCELLED'|'TIMEOUT',
                  'DurationInSeconds': 123,
                  'OperatorName': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **TaskInstances** *(list) --* 

        A list of task instance summaries for the specified workflow run.

        
        

        - *(dict) --* 

          Summary information about a task instance within a workflow run, including its status and execution details.

          
          

          - **WorkflowArn** *(string) --* 

            The Amazon Resource Name (ARN) of the workflow that contains this task instance.

            
          

          - **WorkflowVersion** *(string) --* 

            The version of the workflow that contains this task instance.

            
          

          - **RunId** *(string) --* 

            The unique identifier of the workflow run that contains this task instance.

            
          

          - **TaskInstanceId** *(string) --* 

            The unique identifier of this task instance.

            
          

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

            The current status of the task instance.

            
          

          - **DurationInSeconds** *(integer) --* 

            The duration of the task instance execution in seconds. This value is null if the task is not complete.

            
          

          - **OperatorName** *(string) --* 

            The name of the Apache Airflow operator used for this task instance.

            
      
    
      

      - **NextToken** *(string) --* 

        The pagination token you need to use to retrieve the next set of results. This value is null if there are no more results.

        
  
  **Exceptions**
  
  *   :py:class:`MWAAServerless.Client.exceptions.ThrottlingException`

  
  *   :py:class:`MWAAServerless.Client.exceptions.ValidationException`

  
  *   :py:class:`MWAAServerless.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`MWAAServerless.Client.exceptions.InternalServerException`

  
  *   :py:class:`MWAAServerless.Client.exceptions.OperationTimeoutException`

  