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 GetActivityTask API action and respond using SendTask* 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 (Task states), determine to which states to transition next (Choice states), stop an execution with an error (Fail states), 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 DELETING and 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 EXPRESS state 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 taskToken with 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 timeStamp of the events. Use the reverseOrder parameter 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 DescribeMapRun to 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 taskToken failed.
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 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 (HeartbeatSeconds). This action does not in itself create an event in the execution history. However, if the task times out, the execution history contains an ActivityTimedOut entry for activities, or a TaskTimedOut entry 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 taskToken completed 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. StartSyncExecution is not available for STANDARD workflows.
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, or EncryptionConfiguration. Running executions will continue to use the previous definition and roleArn. You must include at least one of definition or roleArn or you will receive a MissingRequiredParameter error.
updateStateMachineAlias({required String stateMachineAliasArn, String? description, List<RoutingConfigurationListItem>? routingConfiguration}) Future<UpdateStateMachineAliasOutput>
Updates the configuration of an existing state machine alias by modifying its description or routingConfiguration.
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