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

**********
update_job
**********



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

  

  Updates a job.

   

  When you change the status of the job to ``ARCHIVED``, the job can't be scheduled or archived.

   

  .. warning::

     

    An archived jobs and its steps and tasks are deleted after 120 days. The job can't be recovered.

    

  

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


  **Request Syntax**
  ::

    response = client.update_job(
        clientToken='string',
        targetTaskRunStatus='READY'|'FAILED'|'SUCCEEDED'|'CANCELED'|'SUSPENDED'|'PENDING',
        priority=123,
        maxFailedTasksCount=123,
        maxRetriesPerTask=123,
        lifecycleStatus='ARCHIVED',
        maxWorkerCount=123,
        name='string',
        description='string',
        farmId='string',
        queueId='string',
        jobId='string'
    )
    
  :type clientToken: string
  :param clientToken: 

    The unique token which the server uses to recognize retries of the same request.

    This field is autopopulated if not provided.

  
  :type targetTaskRunStatus: string
  :param targetTaskRunStatus: 

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

    

  
  :type priority: integer
  :param priority: 

    The updated job priority.

    

  
  :type maxFailedTasksCount: integer
  :param maxFailedTasksCount: 

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

    

  
  :type maxRetriesPerTask: integer
  :param maxRetriesPerTask: 

    The maximum number of retries for a job.

    

  
  :type lifecycleStatus: string
  :param lifecycleStatus: 

    The status of a job in its lifecycle. When you change the status of the job to ``ARCHIVED``, the job can't be scheduled or archived.

     

    .. warning::

       

      An archived jobs and its steps and tasks are deleted after 120 days. The job can't be recovered.

      

    

  
  :type maxWorkerCount: integer
  :param maxWorkerCount: 

    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.

     

    The maximum number of workers that can process tasks in the job.

    

  
  :type name: string
  :param name: 

    The updated job name.

    

  
  :type description: string
  :param description: 

    The updated job description.

    

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

    The farm ID of the job to update.

    

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

    The queue ID of the job to update.

    

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

    The job ID to update.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **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.ConflictException`

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

  