AutoCloseable
@Generated("software.amazon.awssdk:codegen") public interface SFNClient extends AutoCloseable
builder()
method.
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).
Modifier and Type | Field | Description |
---|---|---|
static String |
SERVICE_NAME |
Modifier and Type | Method | Description |
---|---|---|
static SFNClientBuilder |
builder() |
Create a builder that can be used to configure and create a
SFNClient . |
static SFNClient |
create() |
Create a
SFNClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider . |
default CreateActivityResponse |
createActivity(CreateActivityRequest createActivityRequest) |
Creates an activity.
|
default CreateStateMachineResponse |
createStateMachine(CreateStateMachineRequest createStateMachineRequest) |
Creates a state machine.
|
default DeleteActivityResponse |
deleteActivity(DeleteActivityRequest deleteActivityRequest) |
Deletes an activity.
|
default DeleteStateMachineResponse |
deleteStateMachine(DeleteStateMachineRequest deleteStateMachineRequest) |
Deletes a state machine.
|
default DescribeActivityResponse |
describeActivity(DescribeActivityRequest describeActivityRequest) |
Describes an activity.
|
default DescribeExecutionResponse |
describeExecution(DescribeExecutionRequest describeExecutionRequest) |
Describes an execution.
|
default DescribeStateMachineResponse |
describeStateMachine(DescribeStateMachineRequest describeStateMachineRequest) |
Describes a state machine.
|
default GetActivityTaskResponse |
getActivityTask(GetActivityTaskRequest getActivityTaskRequest) |
Used by workers to retrieve a task (with the specified activity ARN) scheduled for execution by a running state
machine.
|
default GetExecutionHistoryResponse |
getExecutionHistory(GetExecutionHistoryRequest getExecutionHistoryRequest) |
Returns the history of the specified execution as a list of events.
|
default ListActivitiesResponse |
listActivities(ListActivitiesRequest listActivitiesRequest) |
Lists the existing activities.
|
default ListExecutionsResponse |
listExecutions(ListExecutionsRequest listExecutionsRequest) |
Lists the executions of a state machine that meet the filtering criteria.
|
default ListStateMachinesResponse |
listStateMachines(ListStateMachinesRequest listStateMachinesRequest) |
Lists the existing state machines.
|
default SendTaskFailureResponse |
sendTaskFailure(SendTaskFailureRequest sendTaskFailureRequest) |
Used by workers to report that the task identified by the
taskToken failed. |
default SendTaskHeartbeatResponse |
sendTaskHeartbeat(SendTaskHeartbeatRequest sendTaskHeartbeatRequest) |
Used by workers to report to the service that the task represented by the specified
taskToken is
still making progress. |
default SendTaskSuccessResponse |
sendTaskSuccess(SendTaskSuccessRequest sendTaskSuccessRequest) |
Used by workers to report that the task identified by the
taskToken completed successfully. |
static ServiceMetadata |
serviceMetadata() |
|
default StartExecutionResponse |
startExecution(StartExecutionRequest startExecutionRequest) |
Starts a state machine execution.
|
default StopExecutionResponse |
stopExecution(StopExecutionRequest stopExecutionRequest) |
Stops an execution.
|
close
static final String SERVICE_NAME
static SFNClient create()
SFNClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static SFNClientBuilder builder()
SFNClient
.default CreateActivityResponse createActivity(CreateActivityRequest createActivityRequest) throws ActivityLimitExceededException, InvalidNameException, SdkBaseException, SdkClientException, SFNException
Creates an activity.
createActivityRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault CreateStateMachineResponse createStateMachine(CreateStateMachineRequest createStateMachineRequest) throws InvalidArnException, InvalidDefinitionException, InvalidNameException, StateMachineAlreadyExistsException, StateMachineDeletingException, StateMachineLimitExceededException, SdkBaseException, SdkClientException, SFNException
Creates a state machine.
createStateMachineRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault DeleteActivityResponse deleteActivity(DeleteActivityRequest deleteActivityRequest) throws InvalidArnException, SdkBaseException, SdkClientException, SFNException
Deletes an activity.
deleteActivityRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault DeleteStateMachineResponse deleteStateMachine(DeleteStateMachineRequest deleteStateMachineRequest) throws InvalidArnException, SdkBaseException, SdkClientException, SFNException
Deletes a state machine. This is an asynchronous operation-- it sets the state machine's status to "DELETING" and begins the delete process.
deleteStateMachineRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault DescribeActivityResponse describeActivity(DescribeActivityRequest describeActivityRequest) throws ActivityDoesNotExistException, InvalidArnException, SdkBaseException, SdkClientException, SFNException
Describes an activity.
describeActivityRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault DescribeExecutionResponse describeExecution(DescribeExecutionRequest describeExecutionRequest) throws ExecutionDoesNotExistException, InvalidArnException, SdkBaseException, SdkClientException, SFNException
Describes an execution.
describeExecutionRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault DescribeStateMachineResponse describeStateMachine(DescribeStateMachineRequest describeStateMachineRequest) throws InvalidArnException, StateMachineDoesNotExistException, SdkBaseException, SdkClientException, SFNException
Describes a state machine.
describeStateMachineRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault GetActivityTaskResponse getActivityTask(GetActivityTaskRequest getActivityTaskRequest) throws ActivityDoesNotExistException, ActivityWorkerLimitExceededException, InvalidArnException, SdkBaseException, SdkClientException, SFNException
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).
getActivityTaskRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault GetExecutionHistoryResponse getExecutionHistory(GetExecutionHistoryRequest getExecutionHistoryRequest) throws ExecutionDoesNotExistException, InvalidArnException, InvalidTokenException, SdkBaseException, SdkClientException, SFNException
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.
getExecutionHistoryRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault ListActivitiesResponse listActivities(ListActivitiesRequest listActivitiesRequest) throws InvalidTokenException, SdkBaseException, SdkClientException, SFNException
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.
listActivitiesRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault ListExecutionsResponse listExecutions(ListExecutionsRequest listExecutionsRequest) throws InvalidArnException, InvalidTokenException, StateMachineDoesNotExistException, SdkBaseException, SdkClientException, SFNException
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.
listExecutionsRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault ListStateMachinesResponse listStateMachines(ListStateMachinesRequest listStateMachinesRequest) throws InvalidTokenException, SdkBaseException, SdkClientException, SFNException
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.
listStateMachinesRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault SendTaskFailureResponse sendTaskFailure(SendTaskFailureRequest sendTaskFailureRequest) throws TaskDoesNotExistException, InvalidTokenException, TaskTimedOutException, SdkBaseException, SdkClientException, SFNException
Used by workers to report that the task identified by the taskToken
failed.
sendTaskFailureRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault SendTaskHeartbeatResponse sendTaskHeartbeat(SendTaskHeartbeatRequest sendTaskHeartbeatRequest) throws TaskDoesNotExistException, InvalidTokenException, TaskTimedOutException, SdkBaseException, SdkClientException, SFNException
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.
sendTaskHeartbeatRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault SendTaskSuccessResponse sendTaskSuccess(SendTaskSuccessRequest sendTaskSuccessRequest) throws TaskDoesNotExistException, InvalidOutputException, InvalidTokenException, TaskTimedOutException, SdkBaseException, SdkClientException, SFNException
Used by workers to report that the task identified by the taskToken
completed successfully.
sendTaskSuccessRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault StartExecutionResponse startExecution(StartExecutionRequest startExecutionRequest) throws ExecutionLimitExceededException, ExecutionAlreadyExistsException, InvalidArnException, InvalidExecutionInputException, InvalidNameException, StateMachineDoesNotExistException, StateMachineDeletingException, SdkBaseException, SdkClientException, SFNException
Starts a state machine execution.
startExecutionRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault StopExecutionResponse stopExecution(StopExecutionRequest stopExecutionRequest) throws ExecutionDoesNotExistException, InvalidArnException, SdkBaseException, SdkClientException, SFNException
Stops an execution.
stopExecutionRequest
- 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 exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typestatic ServiceMetadata serviceMetadata()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.