SFN / Client / stop_execution

stop_execution#

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

Request Syntax

response = client.stop_execution(
    executionArn='string',
    error='string',
    cause='string'
)
Parameters:
  • executionArn (string) –

    [REQUIRED]

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

  • error (string) – The error code of the failure.

  • cause (string) – A more detailed explanation of the cause of the failure.

Return type:

dict

Returns:

Response Syntax

{
    'stopDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • stopDate (datetime) –

      The date the execution is stopped.

Exceptions

  • SFN.Client.exceptions.ExecutionDoesNotExist

  • SFN.Client.exceptions.InvalidArn

  • SFN.Client.exceptions.ValidationException

  • SFN.Client.exceptions.KmsAccessDeniedException

  • SFN.Client.exceptions.KmsInvalidStateException

  • SFN.Client.exceptions.KmsThrottlingException