@SdkInternalApi
    final SendTaskHeartbeatResult executeSendTaskHeartbeat(SendTaskHeartbeatRequest sendTaskHeartbeatRequest) {

        ExecutionContext executionContext = createExecutionContext(sendTaskHeartbeatRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<SendTaskHeartbeatRequest> request = null;
        Response<SendTaskHeartbeatResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new SendTaskHeartbeatRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(sendTaskHeartbeatRequest));
                // 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, "SendTaskHeartbeat");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Used by activity workers and Task states using the <a
href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token"
>callback</a> pattern, and optionally Task states using the <a
href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync">job run</a>
pattern to report to Step Functions that the task represented by the specified <code>taskToken</code> is still
making progress. This action resets the <code>Heartbeat</code> clock. The <code>Heartbeat</code> threshold is
specified in the state machine's Amazon States Language definition (<code>HeartbeatSeconds</code>). This action
does not in itself create an event in the execution history. However, if the task times out, the execution
history contains an <code>ActivityTimedOut</code> entry for activities, or a <code>TaskTimedOut</code> entry for
tasks using the <a
href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync">job run</a> or
<a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">
callback</a> pattern.
</p>
<note>
<p>
The <code>Timeout</code> of a task, defined in the state machine's Amazon States Language definition, is its
maximum allowed duration, regardless of the number of <a>SendTaskHeartbeat</a> requests received. Use
<code>HeartbeatSeconds</code> to configure the timeout interval for heartbeats.
</p>
</note>

@param sendTaskHeartbeatRequest
@return Result of the SendTaskHeartbeat operation returned by the service.
@throws TaskDoesNotExistException
        The activity does not exist.
@throws InvalidTokenException
        The provided token is not valid.
@throws TaskTimedOutException
        The task token has either expired or the task associated with the token has already been closed.
@sample AWSStepFunctions.SendTaskHeartbeat
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskHeartbeat" target="_top">AWS API
     Documentation</a>
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/AWSStepFunctionsClient.java