:doc:`ImportExport <../../importexport>` / Client / cancel_job

**********
cancel_job
**********



.. py:method:: ImportExport.Client.cancel_job(**kwargs)

  This operation cancels a specified job. Only the job owner can cancel it. The operation fails if the job has already started or is complete.

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/importexport-2010-06-01/CancelJob>`_  


  **Request Syntax**
  ::

    response = client.cancel_job(
        JobId='string',
        APIVersion='string'
    )
    
  :type JobId: string
  :param JobId: **[REQUIRED]** A unique identifier which refers to a particular job.

  
  :type APIVersion: string
  :param APIVersion: Specifies the version of the client tool.

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

    
    ::

      {
          'Success': True|False
      }
      
    **Response Structure**

    

    - *(dict) --* Output structure for the CancelJob operation.
      

      - **Success** *(boolean) --* Specifies whether (true) or not (false) AWS Import/Export updated your job.
  
  **Exceptions**
  
  *   :py:class:`ImportExport.Client.exceptions.InvalidJobIdException`

  
  *   :py:class:`ImportExport.Client.exceptions.ExpiredJobIdException`

  
  *   :py:class:`ImportExport.Client.exceptions.CanceledJobIdException`

  
  *   :py:class:`ImportExport.Client.exceptions.UnableToCancelJobIdException`

  
  *   :py:class:`ImportExport.Client.exceptions.InvalidAccessKeyIdException`

  
  *   :py:class:`ImportExport.Client.exceptions.InvalidVersionException`

  