:doc:`S3Control <../../s3control>` / Client / update_job_status

*****************
update_job_status
*****************



.. py:method:: S3Control.Client.update_job_status(**kwargs)

  

  Updates the status for the specified job. Use this operation to confirm that you want to run a job or to cancel an existing job. For more information, see `S3 Batch Operations <https://docs.aws.amazon.com/AmazonS3/latest/userguide/batch-ops.html>`__ in the *Amazon S3 User Guide*.

    Permissions  

  To use the ``UpdateJobStatus`` operation, you must have permission to perform the ``s3:UpdateJobStatus`` action.

     

  Related actions include:

   

  
  * `CreateJob <https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateJob.html>`__
   
  * `ListJobs <https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_ListJobs.html>`__
   
  * `DescribeJob <https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DescribeJob.html>`__
   
  * `UpdateJobStatus <https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_UpdateJobStatus.html>`__
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/UpdateJobStatus>`_  


  **Request Syntax**
  ::

    response = client.update_job_status(
        AccountId='string',
        JobId='string',
        RequestedJobStatus='Cancelled'|'Ready',
        StatusUpdateReason='string'
    )
    
  :type AccountId: string
  :param AccountId: **[REQUIRED]** 

    The Amazon Web Services account ID associated with the S3 Batch Operations job.

    

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

    The ID of the job whose status you want to update.

    

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

    The status that you want to move the specified job to.

    

  
  :type StatusUpdateReason: string
  :param StatusUpdateReason: 

    A description of the reason why you want to change the specified job's status. This field can be any string up to the maximum length.

    

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

    
    ::

      {
          'JobId': 'string',
          'Status': 'Active'|'Cancelled'|'Cancelling'|'Complete'|'Completing'|'Failed'|'Failing'|'New'|'Paused'|'Pausing'|'Preparing'|'Ready'|'Suspended',
          'StatusUpdateReason': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **JobId** *(string) --* 

        The ID for the job whose status was updated.

        
      

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

        The current status for the specified job.

        
      

      - **StatusUpdateReason** *(string) --* 

        The reason that the specified job's status was updated.

        
  
  **Exceptions**
  
  *   :py:class:`S3Control.Client.exceptions.BadRequestException`

  
  *   :py:class:`S3Control.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`S3Control.Client.exceptions.NotFoundException`

  
  *   :py:class:`S3Control.Client.exceptions.JobStatusException`

  
  *   :py:class:`S3Control.Client.exceptions.InternalServiceException`

  