:doc:`SFN <../../stepfunctions>` / Client / send_task_success

*****************
send_task_success
*****************



.. py:method:: SFN.Client.send_task_success(**kwargs)

  

  Used by activity workers, Task states using the `callback <https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token>`__ pattern, and optionally Task states using the `job run <https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync>`__ pattern to report that the task identified by the ``taskToken`` completed successfully.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskSuccess>`_  


  **Request Syntax**
  ::

    response = client.send_task_success(
        taskToken='string',
        output='string'
    )
    
  :type taskToken: string
  :param taskToken: **[REQUIRED]** 

    The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the `context object <https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html>`__ when a workflow enters a task state. See  GetActivityTaskOutput$taskToken.

    

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

    The JSON output of the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`SFN.Client.exceptions.TaskDoesNotExist`

  
  *   :py:class:`SFN.Client.exceptions.InvalidOutput`

  
  *   :py:class:`SFN.Client.exceptions.InvalidToken`

  
  *   :py:class:`SFN.Client.exceptions.TaskTimedOut`

  
  *   :py:class:`SFN.Client.exceptions.KmsAccessDeniedException`

  
  *   :py:class:`SFN.Client.exceptions.KmsInvalidStateException`

  
  *   :py:class:`SFN.Client.exceptions.KmsThrottlingException`

  