@SdkInternalApi
    final StopExecutionResult executeStopExecution(StopExecutionRequest stopExecutionRequest) {

        ExecutionContext executionContext = createExecutionContext(stopExecutionRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<StopExecutionRequest> request = null;
        Response<StopExecutionResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new StopExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopExecutionRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SFN");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopExecution");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            HttpResponseHandler<AmazonWebServiceResponse<StopExecutionResult>> responseHandler = protocolFactory.createResponseHandler(
                    new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopExecutionResultJsonUnmarshaller());
            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Stops an execution.
</p>
<p>
This API action is not supported by <code>EXPRESS</code> state machines.
</p>
<p>
For an execution with encryption enabled, Step Functions will encrypt the error and cause fields using the KMS
key for the execution role.
</p>
<p>
A caller can stop an execution without using any KMS permissions in the execution role if the caller provides a
null value for both <code>error</code> and <code>cause</code> fields because no data needs to be encrypted.
</p>

@param stopExecutionRequest
@return Result of the StopExecution operation returned by the service.
@throws ExecutionDoesNotExistException
        The specified execution does not exist.
@throws InvalidArnException
        The provided Amazon Resource Name (ARN) is not valid.
@throws ValidationException
        The input does not satisfy the constraints specified by an Amazon Web Services service.
@throws KmsAccessDeniedException
        Either your KMS key policy or API caller does not have the required permissions.
@throws KmsInvalidStateException
        The KMS key is not in valid state, for example: Disabled or Deleted.
@throws KmsThrottlingException
        Received when KMS returns <code>ThrottlingException</code> for a KMS call that Step Functions makes on
        behalf of the caller.
@sample AWSStepFunctions.StopExecution
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/StopExecution" target="_top">AWS API
     Documentation</a>
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/AWSStepFunctionsClient.java