software.amazon.awssdk.services.sfn.SFNAsyncClient Maven / Gradle / Ivy
Show all versions of stepfunctions Show documentation
/*
* Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.sfn;
import java.util.concurrent.CompletableFuture;
import javax.annotation.Generated;
import software.amazon.awssdk.services.sfn.model.CreateActivityRequest;
import software.amazon.awssdk.services.sfn.model.CreateActivityResponse;
import software.amazon.awssdk.services.sfn.model.CreateStateMachineRequest;
import software.amazon.awssdk.services.sfn.model.CreateStateMachineResponse;
import software.amazon.awssdk.services.sfn.model.DeleteActivityRequest;
import software.amazon.awssdk.services.sfn.model.DeleteActivityResponse;
import software.amazon.awssdk.services.sfn.model.DeleteStateMachineRequest;
import software.amazon.awssdk.services.sfn.model.DeleteStateMachineResponse;
import software.amazon.awssdk.services.sfn.model.DescribeActivityRequest;
import software.amazon.awssdk.services.sfn.model.DescribeActivityResponse;
import software.amazon.awssdk.services.sfn.model.DescribeExecutionRequest;
import software.amazon.awssdk.services.sfn.model.DescribeExecutionResponse;
import software.amazon.awssdk.services.sfn.model.DescribeStateMachineRequest;
import software.amazon.awssdk.services.sfn.model.DescribeStateMachineResponse;
import software.amazon.awssdk.services.sfn.model.GetActivityTaskRequest;
import software.amazon.awssdk.services.sfn.model.GetActivityTaskResponse;
import software.amazon.awssdk.services.sfn.model.GetExecutionHistoryRequest;
import software.amazon.awssdk.services.sfn.model.GetExecutionHistoryResponse;
import software.amazon.awssdk.services.sfn.model.ListActivitiesRequest;
import software.amazon.awssdk.services.sfn.model.ListActivitiesResponse;
import software.amazon.awssdk.services.sfn.model.ListExecutionsRequest;
import software.amazon.awssdk.services.sfn.model.ListExecutionsResponse;
import software.amazon.awssdk.services.sfn.model.ListStateMachinesRequest;
import software.amazon.awssdk.services.sfn.model.ListStateMachinesResponse;
import software.amazon.awssdk.services.sfn.model.SendTaskFailureRequest;
import software.amazon.awssdk.services.sfn.model.SendTaskFailureResponse;
import software.amazon.awssdk.services.sfn.model.SendTaskHeartbeatRequest;
import software.amazon.awssdk.services.sfn.model.SendTaskHeartbeatResponse;
import software.amazon.awssdk.services.sfn.model.SendTaskSuccessRequest;
import software.amazon.awssdk.services.sfn.model.SendTaskSuccessResponse;
import software.amazon.awssdk.services.sfn.model.StartExecutionRequest;
import software.amazon.awssdk.services.sfn.model.StartExecutionResponse;
import software.amazon.awssdk.services.sfn.model.StopExecutionRequest;
import software.amazon.awssdk.services.sfn.model.StopExecutionResponse;
/**
* Service client for accessing AWS SFN asynchronously. This can be created using the static {@link #builder()} method.
*
* AWS Step Functions
*
* AWS Step Functions is a web service that enables you to coordinate the components of distributed applications and
* microservices using visual workflows. You build applications from individual components that each perform a discrete
* function, or task, allowing you to scale and change applications quickly. Step Functions provides a graphical
* console to visualize the components of your application as a series of steps. It automatically triggers and tracks
* each step, and retries when there are errors, so your application executes in order and as expected, every time. Step
* Functions logs the state of each step, so when things do go wrong, you can diagnose and debug problems quickly.
*
*
* Step Functions manages the operations and underlying infrastructure for you to ensure your application is available
* at any scale. You can run tasks on the AWS cloud, on your own servers, or an any system that has access to AWS. Step
* Functions can be accessed and used with the Step Functions console, the AWS SDKs (included with your Beta release
* invitation email), or an HTTP API (the subject of this document).
*
*/
@Generated("software.amazon.awssdk:codegen")
public interface SFNAsyncClient extends AutoCloseable {
/**
* Create a {@link SFNAsyncClient} with the region loaded from the
* {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the
* {@link software.amazon.awssdk.auth.DefaultCredentialsProvider}.
*/
static SFNAsyncClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link SFNAsyncClient}.
*/
static SFNAsyncClientBuilder builder() {
return new DefaultSFNAsyncClientBuilder();
}
/**
*
* Creates an activity.
*
*
* @param createActivityRequest
* @return A Java Future containing the result of the CreateActivity operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ActivityLimitExceededException The maximum number of activities has been reached. Existing activities
* must be deleted before a new activity can be created.
* - InvalidNameException The provided name is invalid.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.CreateActivity
* @see AWS API
* Documentation
*/
default CompletableFuture createActivity(CreateActivityRequest createActivityRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Creates a state machine.
*
*
* @param createStateMachineRequest
* @return A Java Future containing the result of the CreateStateMachine operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidArnException The provided Amazon Resource Name (ARN) is invalid.
* - InvalidDefinitionException The provided Amazon States Language definition is invalid.
* - InvalidNameException The provided name is invalid.
* - StateMachineAlreadyExistsException A state machine with the same name but a different definition or
* role ARN already exists.
* - StateMachineDeletingException The specified state machine is being deleted.
* - StateMachineLimitExceededException The maximum number of state machines has been reached. Existing
* state machines must be deleted before a new state machine can be created.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.CreateStateMachine
* @see AWS API
* Documentation
*/
default CompletableFuture createStateMachine(CreateStateMachineRequest createStateMachineRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Deletes an activity.
*
*
* @param deleteActivityRequest
* @return A Java Future containing the result of the DeleteActivity operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidArnException The provided Amazon Resource Name (ARN) is invalid.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.DeleteActivity
* @see AWS API
* Documentation
*/
default CompletableFuture deleteActivity(DeleteActivityRequest deleteActivityRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Deletes a state machine. This is an asynchronous operation-- it sets the state machine's status to "DELETING" and
* begins the delete process.
*
*
* @param deleteStateMachineRequest
* @return A Java Future containing the result of the DeleteStateMachine operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidArnException The provided Amazon Resource Name (ARN) is invalid.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.DeleteStateMachine
* @see AWS API
* Documentation
*/
default CompletableFuture deleteStateMachine(DeleteStateMachineRequest deleteStateMachineRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Describes an activity.
*
*
* @param describeActivityRequest
* @return A Java Future containing the result of the DescribeActivity operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ActivityDoesNotExistException The specified activity does not exist.
* - InvalidArnException The provided Amazon Resource Name (ARN) is invalid.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.DescribeActivity
* @see AWS API
* Documentation
*/
default CompletableFuture describeActivity(DescribeActivityRequest describeActivityRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Describes an execution.
*
*
* @param describeExecutionRequest
* @return A Java Future containing the result of the DescribeExecution operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ExecutionDoesNotExistException The specified execution does not exist.
* - InvalidArnException The provided Amazon Resource Name (ARN) is invalid.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.DescribeExecution
* @see AWS API
* Documentation
*/
default CompletableFuture describeExecution(DescribeExecutionRequest describeExecutionRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Describes a state machine.
*
*
* @param describeStateMachineRequest
* @return A Java Future containing the result of the DescribeStateMachine operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidArnException The provided Amazon Resource Name (ARN) is invalid.
* - StateMachineDoesNotExistException The specified state machine does not exist.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.DescribeStateMachine
* @see AWS
* API Documentation
*/
default CompletableFuture describeStateMachine(
DescribeStateMachineRequest describeStateMachineRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Used by workers to retrieve a task (with the specified activity ARN) scheduled for execution by a running state
* machine. This initiates a long poll, where the service holds the HTTP connection open and responds as soon as a
* task becomes available (i.e. an execution of a task of this type is needed.) The maximum time the service holds
* on to the request before responding is 60 seconds. If no task is available within 60 seconds, the poll will
* return an empty result, that is, the taskToken
returned is an empty string.
*
*
*
* Workers should set their client side socket timeout to at least 65 seconds (5 seconds higher than the maximum
* time the service may hold the poll request).
*
*
*
* @param getActivityTaskRequest
* @return A Java Future containing the result of the GetActivityTask operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ActivityDoesNotExistException The specified activity does not exist.
* - ActivityWorkerLimitExceededException The maximum number of workers concurrently polling for activity
* tasks has been reached.
* - InvalidArnException The provided Amazon Resource Name (ARN) is invalid.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.GetActivityTask
* @see AWS API
* Documentation
*/
default CompletableFuture getActivityTask(GetActivityTaskRequest getActivityTaskRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Returns the history of the specified execution as a list of events. By default, the results are returned in
* ascending order of the timeStamp
of the events. Use the reverseOrder
parameter to get
* the latest events first. The results may be split into multiple pages. To retrieve subsequent pages, make the
* call again using the nextToken
returned by the previous call.
*
*
* @param getExecutionHistoryRequest
* @return A Java Future containing the result of the GetExecutionHistory operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ExecutionDoesNotExistException The specified execution does not exist.
* - InvalidArnException The provided Amazon Resource Name (ARN) is invalid.
* - InvalidTokenException The provided token is invalid.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.GetExecutionHistory
* @see AWS API
* Documentation
*/
default CompletableFuture getExecutionHistory(
GetExecutionHistoryRequest getExecutionHistoryRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Lists the existing activities. The results may be split into multiple pages. To retrieve subsequent pages, make
* the call again using the nextToken
returned by the previous call.
*
*
* @param listActivitiesRequest
* @return A Java Future containing the result of the ListActivities operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidTokenException The provided token is invalid.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.ListActivities
* @see AWS API
* Documentation
*/
default CompletableFuture listActivities(ListActivitiesRequest listActivitiesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Lists the executions of a state machine that meet the filtering criteria. The results may be split into multiple
* pages. To retrieve subsequent pages, make the call again using the nextToken
returned by the
* previous call.
*
*
* @param listExecutionsRequest
* @return A Java Future containing the result of the ListExecutions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidArnException The provided Amazon Resource Name (ARN) is invalid.
* - InvalidTokenException The provided token is invalid.
* - StateMachineDoesNotExistException The specified state machine does not exist.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.ListExecutions
* @see AWS API
* Documentation
*/
default CompletableFuture listExecutions(ListExecutionsRequest listExecutionsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Lists the existing state machines. The results may be split into multiple pages. To retrieve subsequent pages,
* make the call again using the nextToken
returned by the previous call.
*
*
* @param listStateMachinesRequest
* @return A Java Future containing the result of the ListStateMachines operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidTokenException The provided token is invalid.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.ListStateMachines
* @see AWS API
* Documentation
*/
default CompletableFuture listStateMachines(ListStateMachinesRequest listStateMachinesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Used by workers to report that the task identified by the taskToken
failed.
*
*
* @param sendTaskFailureRequest
* @return A Java Future containing the result of the SendTaskFailure operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TaskDoesNotExistException
* - InvalidTokenException The provided token is invalid.
* - TaskTimedOutException
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.SendTaskFailure
* @see AWS API
* Documentation
*/
default CompletableFuture sendTaskFailure(SendTaskFailureRequest sendTaskFailureRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Used by workers to report to the service that the task represented by the specified taskToken
is
* still making progress. This action resets the Heartbeat
clock. The Heartbeat
threshold
* is specified in the state machine's Amazon States Language definition. This action does not in itself create an
* event in the execution history. However, if the task times out, the execution history will contain an
* ActivityTimedOut
event.
*
*
*
* The Timeout
of a task, defined in the state machine's Amazon States Language definition, is its
* maximum allowed duration, regardless of the number of SendTaskHeartbeat requests received.
*
*
*
* This operation is only useful for long-lived tasks to report the liveliness of the task.
*
*
*
* @param sendTaskHeartbeatRequest
* @return A Java Future containing the result of the SendTaskHeartbeat operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TaskDoesNotExistException
* - InvalidTokenException The provided token is invalid.
* - TaskTimedOutException
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.SendTaskHeartbeat
* @see AWS API
* Documentation
*/
default CompletableFuture sendTaskHeartbeat(SendTaskHeartbeatRequest sendTaskHeartbeatRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Used by workers to report that the task identified by the taskToken
completed successfully.
*
*
* @param sendTaskSuccessRequest
* @return A Java Future containing the result of the SendTaskSuccess operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TaskDoesNotExistException
* - InvalidOutputException The provided JSON output data is invalid.
* - InvalidTokenException The provided token is invalid.
* - TaskTimedOutException
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.SendTaskSuccess
* @see AWS API
* Documentation
*/
default CompletableFuture sendTaskSuccess(SendTaskSuccessRequest sendTaskSuccessRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Starts a state machine execution.
*
*
* @param startExecutionRequest
* @return A Java Future containing the result of the StartExecution operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ExecutionLimitExceededException The maximum number of running executions has been reached. Running
* executions must end or be stopped before a new execution can be started.
* - ExecutionAlreadyExistsException An execution with the same name already exists.
* - InvalidArnException The provided Amazon Resource Name (ARN) is invalid.
* - InvalidExecutionInputException The provided JSON input data is invalid.
* - InvalidNameException The provided name is invalid.
* - StateMachineDoesNotExistException The specified state machine does not exist.
* - StateMachineDeletingException The specified state machine is being deleted.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.StartExecution
* @see AWS API
* Documentation
*/
default CompletableFuture startExecution(StartExecutionRequest startExecutionRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Stops an execution.
*
*
* @param stopExecutionRequest
* @return A Java Future containing the result of the StopExecution operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ExecutionDoesNotExistException The specified execution does not exist.
* - InvalidArnException The provided Amazon Resource Name (ARN) is invalid.
* - SdkBaseException Base class for all exceptions that can be thrown by the SDK (both service and
* client). Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc
* - SFNException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this
*
* @sample SFNAsyncClient.StopExecution
* @see AWS API
* Documentation
*/
default CompletableFuture stopExecution(StopExecutionRequest stopExecutionRequest) {
throw new UnsupportedOperationException();
}
}