:doc:`Glue <../../glue>` / Client / cancel_ml_task_run

******************
cancel_ml_task_run
******************



.. py:method:: Glue.Client.cancel_ml_task_run(**kwargs)

  

  Cancels (stops) a task run. Machine learning task runs are asynchronous tasks that Glue runs on your behalf as part of various machine learning workflows. You can cancel a machine learning task run at any time by calling ``CancelMLTaskRun`` with a task run's parent transform's ``TransformID`` and the task run's ``TaskRunId``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/CancelMLTaskRun>`_  


  **Request Syntax**
  ::

    response = client.cancel_ml_task_run(
        TransformId='string',
        TaskRunId='string'
    )
    
  :type TransformId: string
  :param TransformId: **[REQUIRED]** 

    The unique identifier of the machine learning transform.

    

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

    A unique identifier for the task run.

    

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

    
    ::

      {
          'TransformId': 'string',
          'TaskRunId': 'string',
          'Status': 'STARTING'|'RUNNING'|'STOPPING'|'STOPPED'|'SUCCEEDED'|'FAILED'|'TIMEOUT'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **TransformId** *(string) --* 

        The unique identifier of the machine learning transform.

        
      

      - **TaskRunId** *(string) --* 

        The unique identifier for the task run.

        
      

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

        The status for this run.

        
  
  **Exceptions**
  
  *   :py:class:`Glue.Client.exceptions.EntityNotFoundException`

  
  *   :py:class:`Glue.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Glue.Client.exceptions.OperationTimeoutException`

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

  