:doc:`DataPipeline <../../datapipeline>` / Client / set_task_status

***************
set_task_status
***************



.. py:method:: DataPipeline.Client.set_task_status(**kwargs)

  

  Task runners call ``SetTaskStatus`` to notify AWS Data Pipeline that a task is completed and provide information about the final status. A task runner makes this call regardless of whether the task was sucessful. A task runner does not need to call ``SetTaskStatus`` for tasks that are canceled by the web service during a call to  ReportTaskProgress.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/SetTaskStatus>`_  


  **Request Syntax**
  ::

    response = client.set_task_status(
        taskId='string',
        taskStatus='FINISHED'|'FAILED'|'FALSE',
        errorId='string',
        errorMessage='string',
        errorStackTrace='string'
    )
    
  :type taskId: string
  :param taskId: **[REQUIRED]** 

    The ID of the task assigned to the task runner. This value is provided in the response for  PollForTask.

    

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

    If ``FINISHED``, the task successfully completed. If ``FAILED``, the task ended unsuccessfully. Preconditions use false.

    

  
  :type errorId: string
  :param errorId: 

    If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.

    

  
  :type errorMessage: string
  :param errorMessage: 

    If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.

    

  
  :type errorStackTrace: string
  :param errorStackTrace: 

    If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 

      Contains the output of SetTaskStatus.

      
  
  **Exceptions**
  
  *   :py:class:`DataPipeline.Client.exceptions.InternalServiceError`

  
  *   :py:class:`DataPipeline.Client.exceptions.TaskNotFoundException`

  
  *   :py:class:`DataPipeline.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`DataPipeline.Client.exceptions.PipelineNotFoundException`

  
  *   :py:class:`DataPipeline.Client.exceptions.PipelineDeletedException`

  