Sfn class
With Step Functions, you can create workflows, also called state machines, to build distributed applications, automate processes, orchestrate microservices, and create data and machine learning pipelines.
Constructors
- Sfn({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
createActivity(
{required String name, EncryptionConfiguration? encryptionConfiguration, List< Tag> ? tags}) → Future<CreateActivityOutput> -
Creates an activity. An activity is a task that you write in any
programming language and host on any machine that has access to Step
Functions. Activities must poll Step Functions using the
GetActivityTaskAPI action and respond usingSendTask*API actions. This function lets Step Functions know the existence of your activity and returns an identifier for use in a state machine and when polling from the activity. -
createStateMachine(
{required String definition, required String name, required String roleArn, EncryptionConfiguration? encryptionConfiguration, LoggingConfiguration? loggingConfiguration, bool? publish, List< Tag> ? tags, TracingConfiguration? tracingConfiguration, StateMachineType? type, String? versionDescription}) → Future<CreateStateMachineOutput> -
Creates a state machine. A state machine consists of a collection of
states that can do work (
Taskstates), determine to which states to transition next (Choicestates), stop an execution with an error (Failstates), and so on. State machines are specified using a JSON-based, structured language. For more information, see Amazon States Language in the Step Functions User Guide. -
createStateMachineAlias(
{required String name, required List< RoutingConfigurationListItem> routingConfiguration, String? description}) → Future<CreateStateMachineAliasOutput> - Creates an alias for a state machine that points to one or two versions of the same state machine. You can set your application to call StartExecution with an alias and update the version the alias uses without changing the client's code.
-
deleteActivity(
{required String activityArn}) → Future< void> - Deletes an activity.
-
deleteStateMachine(
{required String stateMachineArn}) → Future< void> -
Deletes a state machine. This is an asynchronous operation. It sets the
state machine's status to
DELETINGand begins the deletion process. A state machine is deleted only when all its executions are completed. On the next state transition, the state machine's executions are terminated. -
deleteStateMachineAlias(
{required String stateMachineAliasArn}) → Future< void> - Deletes a state machine alias.
-
deleteStateMachineVersion(
{required String stateMachineVersionArn}) → Future< void> - Deletes a state machine version. After you delete a version, you can't call StartExecution using that version's ARN or use the version with a state machine alias. Related operations:
-
describeActivity(
{required String activityArn}) → Future< DescribeActivityOutput> - Describes an activity.
-
describeExecution(
{required String executionArn, IncludedData? includedData}) → Future< DescribeExecutionOutput> - Provides information about a state machine execution, such as the state machine associated with the execution, the execution input and output, and relevant execution metadata. If you've redriven an execution, you can use this API action to return information about the redrives of that execution. In addition, you can use this API action to return the Map Run Amazon Resource Name (ARN) if the execution was dispatched by a Map Run.
-
describeMapRun(
{required String mapRunArn}) → Future< DescribeMapRunOutput> - Provides information about a Map Run's configuration, progress, and results. If you've redriven a Map Run, this API action also returns information about the redrives of that Map Run. For more information, see Examining Map Run in the Step Functions Developer Guide.
-
describeStateMachine(
{required String stateMachineArn, IncludedData? includedData}) → Future< DescribeStateMachineOutput> - Provides information about a state machine's definition, its IAM role Amazon Resource Name (ARN), and configuration.
-
describeStateMachineAlias(
{required String stateMachineAliasArn}) → Future< DescribeStateMachineAliasOutput> - Returns details about a state machine alias.
-
describeStateMachineForExecution(
{required String executionArn, IncludedData? includedData}) → Future< DescribeStateMachineForExecutionOutput> -
Provides information about a state machine's definition, its execution
role ARN, and configuration. If a Map Run dispatched the execution, this
action returns the Map Run Amazon Resource Name (ARN) in the response. The
state machine returned is the state machine associated with the Map Run.
This API action is not supported by
EXPRESSstate machines. -
getActivityTask(
{required String activityArn, String? workerName}) → Future< GetActivityTaskOutput> -
Used by workers to retrieve a task (with the specified activity ARN) which
has been 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 returns a
taskTokenwith a null string. -
getExecutionHistory(
{required String executionArn, bool? includeExecutionData, int? maxResults, String? nextToken, bool? reverseOrder}) → Future< GetExecutionHistoryOutput> -
Returns the history of the specified execution as a list of events. By
default, the results are returned in ascending order of the
timeStampof the events. Use thereverseOrderparameter to get the latest events first. -
listActivities(
{int? maxResults, String? nextToken}) → Future< ListActivitiesOutput> - Lists the existing activities.
-
listExecutions(
{String? mapRunArn, int? maxResults, String? nextToken, ExecutionRedriveFilter? redriveFilter, String? stateMachineArn, ExecutionStatus? statusFilter}) → Future< ListExecutionsOutput> - Lists all executions of a state machine or a Map Run. You can list all executions related to a state machine by specifying a state machine Amazon Resource Name (ARN), or those related to a Map Run by specifying a Map Run ARN. Using this API action, you can also list all redriven executions.
-
listMapRuns(
{required String executionArn, int? maxResults, String? nextToken}) → Future< ListMapRunsOutput> -
Lists all Map Runs that were started by a given state machine execution.
Use this API action to obtain Map Run ARNs, and then call
DescribeMapRunto obtain more information, if needed. -
listStateMachineAliases(
{required String stateMachineArn, int? maxResults, String? nextToken}) → Future< ListStateMachineAliasesOutput> - Lists aliases for a specified state machine ARN. Results are sorted by time, with the most recently created aliases listed first.
-
listStateMachines(
{int? maxResults, String? nextToken}) → Future< ListStateMachinesOutput> - Lists the existing state machines.
-
listStateMachineVersions(
{required String stateMachineArn, int? maxResults, String? nextToken}) → Future< ListStateMachineVersionsOutput> - Lists versions for the specified state machine Amazon Resource Name (ARN).
-
listTagsForResource(
{required String resourceArn}) → Future< ListTagsForResourceOutput> - List tags for a given resource.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
publishStateMachineVersion(
{required String stateMachineArn, String? description, String? revisionId}) → Future< PublishStateMachineVersionOutput> - Creates a version from the current revision of a state machine. Use versions to create immutable snapshots of your state machine. You can start executions from versions either directly or with an alias. To create an alias, use CreateStateMachineAlias.
-
redriveExecution(
{required String executionArn, String? clientToken}) → Future< RedriveExecutionOutput> - Restarts unsuccessful executions of Standard workflows that didn't complete successfully in the last 14 days. These include failed, aborted, or timed out executions. When you redrive an execution, it continues the failed execution from the unsuccessful step and uses the same input. Step Functions preserves the results and execution history of the successful steps, and doesn't rerun these steps when you redrive an execution. Redriven executions use the same state machine definition and execution ARN as the original execution attempt.
-
sendTaskFailure(
{required String taskToken, String? cause, String? error}) → Future< void> -
Used by activity workers, Task states using the callback
pattern, and optionally Task states using the job
run pattern to report that the task identified by the
taskTokenfailed. -
sendTaskHeartbeat(
{required String taskToken}) → Future< void> -
Used by activity workers and Task states using the callback
pattern, and optionally Task states using the job
run pattern to report to Step Functions that the task represented by
the specified
taskTokenis still making progress. This action resets theHeartbeatclock. TheHeartbeatthreshold is specified in the state machine's Amazon States Language definition (HeartbeatSeconds). This action does not in itself create an event in the execution history. However, if the task times out, the execution history contains anActivityTimedOutentry for activities, or aTaskTimedOutentry for tasks using the job run or callback pattern. -
sendTaskSuccess(
{required String output, required String taskToken}) → Future< void> -
Used by activity workers, Task states using the callback
pattern, and optionally Task states using the job
run pattern to report that the task identified by the
taskTokencompleted successfully. -
startExecution(
{required String stateMachineArn, String? input, String? name, String? traceHeader}) → Future< StartExecutionOutput> - Starts a state machine execution.
-
startSyncExecution(
{required String stateMachineArn, IncludedData? includedData, String? input, String? name, String? traceHeader}) → Future< StartSyncExecutionOutput> -
Starts a Synchronous Express state machine execution.
StartSyncExecutionis not available forSTANDARDworkflows. -
stopExecution(
{required String executionArn, String? cause, String? error}) → Future< StopExecutionOutput> - Stops an execution.
-
tagResource(
{required String resourceArn, required List< Tag> tags}) → Future<void> - Add a tag to a Step Functions resource.
-
testState(
{required String definition, String? context, String? input, InspectionLevel? inspectionLevel, MockInput? mock, bool? revealSecrets, String? roleArn, TestStateConfiguration? stateConfiguration, String? stateName, String? variables}) → Future< TestStateOutput> - Accepts the definition of a single state and executes it. You can test a state without creating a state machine or updating an existing state machine. Using this API, you can test the following:
-
toString(
) → String -
A string representation of this object.
inherited
-
untagResource(
{required String resourceArn, required List< String> tagKeys}) → Future<void> - Remove a tag from a Step Functions resource
-
updateMapRun(
{required String mapRunArn, int? maxConcurrency, int? toleratedFailureCount, double? toleratedFailurePercentage}) → Future< void> - Updates an in-progress Map Run's configuration to include changes to the settings that control maximum concurrency and Map Run failure.
-
updateStateMachine(
{required String stateMachineArn, String? definition, EncryptionConfiguration? encryptionConfiguration, LoggingConfiguration? loggingConfiguration, bool? publish, String? roleArn, TracingConfiguration? tracingConfiguration, String? versionDescription}) → Future< UpdateStateMachineOutput> -
Updates an existing state machine by modifying its
definition,roleArn,loggingConfiguration, orEncryptionConfiguration. Running executions will continue to use the previousdefinitionandroleArn. You must include at least one ofdefinitionorroleArnor you will receive aMissingRequiredParametererror. -
updateStateMachineAlias(
{required String stateMachineAliasArn, String? description, List< RoutingConfigurationListItem> ? routingConfiguration}) → Future<UpdateStateMachineAliasOutput> -
Updates the configuration of an existing state machine alias
by modifying its
descriptionorroutingConfiguration. -
validateStateMachineDefinition(
{required String definition, int? maxResults, ValidateStateMachineDefinitionSeverity? severity, StateMachineType? type}) → Future< ValidateStateMachineDefinitionOutput> - Validates the syntax of a state machine definition specified in Amazon States Language (ASL), a JSON-based, structured language.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited