:doc:`EMRServerless <../../emr-serverless>` / Client / cancel_job_run

**************
cancel_job_run
**************



.. py:method:: EMRServerless.Client.cancel_job_run(**kwargs)

  

  Cancels a job run.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/emr-serverless-2021-07-13/CancelJobRun>`_  


  **Request Syntax**
  ::

    response = client.cancel_job_run(
        applicationId='string',
        jobRunId='string',
        shutdownGracePeriodInSeconds=123
    )
    
  :type applicationId: string
  :param applicationId: **[REQUIRED]** 

    The ID of the application on which the job run will be canceled.

    

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

    The ID of the job run to cancel.

    

  
  :type shutdownGracePeriodInSeconds: integer
  :param shutdownGracePeriodInSeconds: 

    The duration in seconds to wait before forcefully terminating the job after cancellation is requested.

    

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

    
    ::

      {
          'applicationId': 'string',
          'jobRunId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **applicationId** *(string) --* 

        The output contains the application ID on which the job run is cancelled.

        
      

      - **jobRunId** *(string) --* 

        The output contains the ID of the cancelled job run.

        
  
  **Exceptions**
  
  *   :py:class:`EMRServerless.Client.exceptions.ValidationException`

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

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

  