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

**************
stop_execution
**************



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

  

  Stops an execution.

   

  This API action is not supported by ``EXPRESS`` state machines.

   

  For an execution with encryption enabled, Step Functions will encrypt the error and cause fields using the KMS key for the execution role.

   

  A caller can stop an execution without using any KMS permissions in the execution role if the caller provides a null value for both ``error`` and ``cause`` fields because no data needs to be encrypted.

  

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


  **Request Syntax**
  ::

    response = client.stop_execution(
        executionArn='string',
        error='string',
        cause='string'
    )
    
  :type executionArn: string
  :param executionArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the execution to stop.

    

  
  :type error: string
  :param error: 

    The error code of the failure.

    

  
  :type cause: string
  :param cause: 

    A more detailed explanation of the cause of the failure.

    

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

    
    ::

      {
          'stopDate': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **stopDate** *(datetime) --* 

        The date the execution is stopped.

        
  
  **Exceptions**
  
  *   :py:class:`SFN.Client.exceptions.ExecutionDoesNotExist`

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

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

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

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

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

  