:doc:`DeadlineCloud <../../deadline>` / Client / list_jobs

*********
list_jobs
*********



.. py:method:: DeadlineCloud.Client.list_jobs(**kwargs)

  

  Lists jobs.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/deadline-2023-10-12/ListJobs>`_  


  **Request Syntax**
  ::

    response = client.list_jobs(
        farmId='string',
        principalId='string',
        queueId='string',
        nextToken='string',
        maxResults=123
    )
    
  :type farmId: string
  :param farmId: **[REQUIRED]** 

    The farm ID for the jobs.

    

  
  :type principalId: string
  :param principalId: 

    The principal ID of the members on the jobs.

    

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

    The queue ID for the job.

    

  
  :type nextToken: string
  :param nextToken: 

    The token for the next set of results, or ``null`` to start from the beginning.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return. Use this parameter with ``NextToken`` to get results as a set of sequential pages.

    

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

    
    ::

      {
          'jobs': [
              {
                  'jobId': 'string',
                  'name': 'string',
                  'lifecycleStatus': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'UPLOAD_IN_PROGRESS'|'UPLOAD_FAILED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED'|'UPDATE_SUCCEEDED'|'ARCHIVED',
                  'lifecycleStatusMessage': 'string',
                  'priority': 123,
                  'createdAt': datetime(2015, 1, 1),
                  'createdBy': 'string',
                  'updatedAt': datetime(2015, 1, 1),
                  'updatedBy': 'string',
                  'startedAt': datetime(2015, 1, 1),
                  'endedAt': datetime(2015, 1, 1),
                  'taskRunStatus': 'PENDING'|'READY'|'ASSIGNED'|'STARTING'|'SCHEDULED'|'INTERRUPTING'|'RUNNING'|'SUSPENDED'|'CANCELED'|'FAILED'|'SUCCEEDED'|'NOT_COMPATIBLE',
                  'targetTaskRunStatus': 'READY'|'FAILED'|'SUCCEEDED'|'CANCELED'|'SUSPENDED'|'PENDING',
                  'taskRunStatusCounts': {
                      'string': 123
                  },
                  'taskFailureRetryCount': 123,
                  'maxFailedTasksCount': 123,
                  'maxRetriesPerTask': 123,
                  'maxWorkerCount': 123,
                  'sourceJobId': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **jobs** *(list) --* 

        The jobs on the list.

        
        

        - *(dict) --* 

          A summary of job details.

          
          

          - **jobId** *(string) --* 

            The job ID.

            
          

          - **name** *(string) --* 

            The job name.

            
          

          - **lifecycleStatus** *(string) --* 

            The life cycle status.

            
          

          - **lifecycleStatusMessage** *(string) --* 

            The life cycle status message.

            
          

          - **priority** *(integer) --* 

            The job priority.

            
          

          - **createdAt** *(datetime) --* 

            The date and time the resource was created.

            
          

          - **createdBy** *(string) --* 

            The user or system that created this resource.

            
          

          - **updatedAt** *(datetime) --* 

            The date and time the resource was updated.

            
          

          - **updatedBy** *(string) --* 

            The user or system that updated this resource.

            
          

          - **startedAt** *(datetime) --* 

            The date and time the resource started running.

            
          

          - **endedAt** *(datetime) --* 

            The date and time the resource ended running.

            
          

          - **taskRunStatus** *(string) --* 

            The task run status for the job.

             

            
            * ``PENDING``–pending and waiting for resources.
             
            * ``READY``–ready to be processed.
             
            * ``ASSIGNED``–assigned and will run next on a worker.
             
            * ``SCHEDULED``–scheduled to be run on a worker.
             
            * ``INTERRUPTING``–being interrupted.
             
            * ``RUNNING``–running on a worker.
             
            * ``SUSPENDED``–the task is suspended.
             
            * ``CANCELED``–the task has been canceled.
             
            * ``FAILED``–the task has failed.
             
            * ``SUCCEEDED``–the task has succeeded.
            

            
          

          - **targetTaskRunStatus** *(string) --* 

            The task status to update the job's tasks to.

            
          

          - **taskRunStatusCounts** *(dict) --* 

            The number of tasks running on the job.

            
            

            - *(string) --* 
              

              - *(integer) --* 
        
      
          

          - **taskFailureRetryCount** *(integer) --* 

            The total number of times tasks from the job failed and were retried.

            
          

          - **maxFailedTasksCount** *(integer) --* 

            The number of task failures before the job stops running and is marked as ``FAILED``.

            
          

          - **maxRetriesPerTask** *(integer) --* 

            The maximum number of retries for a job.

            
          

          - **maxWorkerCount** *(integer) --* 

            The maximum number of worker hosts that can concurrently process a job. When the ``maxWorkerCount`` is reached, no more workers will be assigned to process the job, even if the fleets assigned to the job's queue has available workers.

             

            You can't set the ``maxWorkerCount`` to 0. If you set it to -1, there is no maximum number of workers.

             

            If you don't specify the ``maxWorkerCount``, the default is -1.

            
          

          - **sourceJobId** *(string) --* 

            The job ID for the source job.

            
      
    
      

      - **nextToken** *(string) --* 

        If Deadline Cloud returns ``nextToken``, then there are more results available. The value of ``nextToken`` is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then ``nextToken`` is set to ``null``. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 ``ValidationException`` error.

        
  
  **Exceptions**
  
  *   :py:class:`DeadlineCloud.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ThrottlingException`

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

  