Class: AWS.StepFunctions
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.StepFunctions
- Identifier:
- stepfunctions
- API Version:
- 2016-11-23
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
Step Functions coordinates the components of distributed applications and microservices using visual workflows.
You can use Step Functions to build applications from individual components, each of which performs a discrete function, or task, allowing you to scale and change applications quickly. Step Functions provides a console that helps visualize the components of your application as a series of steps. Step Functions automatically triggers and tracks each step, and retries steps when there are errors, so your application executes predictably and in the right order every time. Step Functions logs the state of each step, so you can quickly diagnose and debug any issues.
Step Functions manages operations and underlying infrastructure to ensure your application is available at any scale. You can run tasks on Amazon Web Services, your own servers, or any system that has access to Amazon Web Services. You can access and use Step Functions using the console, the Amazon Web Services SDKs, or an HTTP API. For more information about Step Functions, see the Step Functions Developer Guide .
If you use the Step Functions API actions using Amazon Web Services SDK integrations, make sure the API actions are in camel case and parameter names are in Pascal case. For example, you could use Step Functions API action startSyncExecution and specify its parameter as StateMachineArn.
Sending a Request Using StepFunctions
var stepfunctions = new AWS.StepFunctions();
stepfunctions.createActivity(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the StepFunctions object uses this specific API, you can
construct the object by passing the apiVersion option to the constructor:
var stepfunctions = new AWS.StepFunctions({apiVersion: '2016-11-23'});
You can also set the API version globally in AWS.config.apiVersions using
the stepfunctions service identifier:
AWS.config.apiVersions = {
stepfunctions: '2016-11-23',
// other service API versions
};
var stepfunctions = new AWS.StepFunctions();
Constructor Summary collapse
-
new AWS.StepFunctions(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
createActivity(params = {}, callback) ⇒ AWS.Request
Creates an activity.
-
createStateMachine(params = {}, callback) ⇒ AWS.Request
Creates a state machine.
- createStateMachineAlias(params = {}, callback) ⇒ AWS.Request
-
deleteActivity(params = {}, callback) ⇒ AWS.Request
Deletes an activity.
.
-
deleteStateMachine(params = {}, callback) ⇒ AWS.Request
Deletes a state machine.
-
deleteStateMachineAlias(params = {}, callback) ⇒ AWS.Request
Deletes a state machine alias.
After you delete a state machine alias, you can't use it to start executions.
-
deleteStateMachineVersion(params = {}, callback) ⇒ AWS.Request
Deletes a state machine version.
-
describeActivity(params = {}, callback) ⇒ AWS.Request
Describes an activity.
Note: This operation is eventually consistent.- describeExecution(params = {}, callback) ⇒ AWS.Request
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.
- describeMapRun(params = {}, callback) ⇒ AWS.Request
Provides information about a Map Run's configuration, progress, and results.
- describeStateMachine(params = {}, callback) ⇒ AWS.Request
Provides information about a state machine's definition, its IAM role Amazon Resource Name (ARN), and configuration.
A qualified state machine ARN can either refer to a Distributed Map state defined within a state machine, a version ARN, or an alias ARN.
The following are some examples of qualified and unqualified state machine ARNs:
-
The following qualified state machine ARN refers to a Distributed Map state with a label
mapStateLabelin a state machine namedmyStateMachine.arn:partition:states:region:account-id:stateMachine:myStateMachine/mapStateLabelNote: If you provide a qualified state machine ARN that refers to a Distributed Map state, the request fails withValidationException. - describeStateMachineAlias(params = {}, callback) ⇒ AWS.Request
-
describeStateMachineForExecution(params = {}, callback) ⇒ AWS.Request
Provides information about a state machine's definition, its execution role ARN, and configuration.
-
getActivityTask(params = {}, callback) ⇒ AWS.Request
Used by workers to retrieve a task (with the specified activity ARN) which has been scheduled for execution by a running state machine.
-
getExecutionHistory(params = {}, callback) ⇒ AWS.Request
Returns the history of the specified execution as a list of events.
-
listActivities(params = {}, callback) ⇒ AWS.Request
Lists the existing activities.
If
nextTokenis returned, there are more results available. -
listExecutions(params = {}, callback) ⇒ AWS.Request
Lists all executions of a state machine or a Map Run.
-
listMapRuns(params = {}, callback) ⇒ AWS.Request
Lists all Map Runs that were started by a given state machine execution.
-
listStateMachineAliases(params = {}, callback) ⇒ AWS.Request
Lists aliases for a specified state machine ARN.
-
listStateMachines(params = {}, callback) ⇒ AWS.Request
Lists the existing state machines.
If
nextTokenis returned, there are more results available. -
listStateMachineVersions(params = {}, callback) ⇒ AWS.Request
Lists versions for the specified state machine Amazon Resource Name (ARN).
The results are sorted in descending order of the version creation time.
If
nextTokenis returned, there are more results available. -
listTagsForResource(params = {}, callback) ⇒ AWS.Request
List tags for a given resource.
Tags may only contain Unicode letters, digits, white space, or these symbols:
_ . -
publishStateMachineVersion(params = {}, callback) ⇒ AWS.Request
Creates a version from the current revision of a state machine.
-
redriveExecution(params = {}, callback) ⇒ AWS.Request
Restarts unsuccessful executions of Standard workflows that didn't complete successfully in the last 14 days.
-
sendTaskFailure(params = {}, callback) ⇒ AWS.Request
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.For an execution with encryption enabled, Step Functions will encrypt the error and cause fields using the KMS key for the execution role.
A caller can mark a task as fail without using any KMS permissions in the execution role if the caller provides a null value for both
.errorandcausefields because no data needs to be encrypted. - sendTaskHeartbeat(params = {}, callback) ⇒ AWS.Request
- sendTaskSuccess(params = {}, callback) ⇒ AWS.Request
-
startExecution(params = {}, callback) ⇒ AWS.Request
Starts a state machine execution.
A qualified state machine ARN can either refer to a Distributed Map state defined within a state machine, a version ARN, or an alias ARN.
The following are some examples of qualified and unqualified state machine ARNs:
-
The following qualified state machine ARN refers to a Distributed Map state with a label
mapStateLabelin a state machine namedmyStateMachine.arn:partition:states:region:account-id:stateMachine:myStateMachine/mapStateLabelNote: If you provide a qualified state machine ARN that refers to a Distributed Map state, the request fails withValidationException. -
startSyncExecution(params = {}, callback) ⇒ AWS.Request
Starts a Synchronous Express state machine execution.
-
stopExecution(params = {}, callback) ⇒ AWS.Request
Stops an execution.
This API action is not supported by
EXPRESSstate machines.For an execution with encryption enabled, Step Functions will encrypt the error and cause fields using the KMS key for the execution role.
A caller can stop an execution without using any KMS permissions in the execution role if the caller provides a null value for both
.errorandcausefields because no data needs to be encrypted. -
tagResource(params = {}, callback) ⇒ AWS.Request
Add a tag to a Step Functions resource.
An array of key-value pairs.
-
testState(params = {}, callback) ⇒ AWS.Request
Accepts the definition of a single state and executes it.
-
untagResource(params = {}, callback) ⇒ AWS.Request
Remove a tag from a Step Functions resource
.
-
updateMapRun(params = {}, callback) ⇒ AWS.Request
Updates an in-progress Map Run's configuration to include changes to the settings that control maximum concurrency and Map Run failure.
.
-
updateStateMachine(params = {}, callback) ⇒ AWS.Request
Updates an existing state machine by modifying its
definition,roleArn,loggingConfiguration, orEncryptionConfiguration. -
updateStateMachineAlias(params = {}, callback) ⇒ AWS.Request
Updates the configuration of an existing state machine alias by modifying its
descriptionorroutingConfiguration.You must specify at least one of the
descriptionorroutingConfigurationparameters to update a state machine alias.Note:UpdateStateMachineAliasis an idempotent API.- validateStateMachineDefinition(params = {}, callback) ⇒ AWS.Request
Validates the syntax of a state machine definition.
You can validate that a state machine definition is correct without creating a state machine resource.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.StepFunctions(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
Method Details
createActivity(params = {}, callback) ⇒ AWS.Request
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.Note: This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.Note:CreateActivityis an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created.CreateActivity's idempotency check is based on the activityname. If a following request has differenttagsvalues, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case,tagswill not be updated, even if they are different.createStateMachine(params = {}, callback) ⇒ AWS.Request
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.If you set the
publishparameter of this API action totrue, it publishes version1as the first revision of the state machine.For additional control over security, you can encrypt your data using a customer-managed key for Step Functions state machines. You can configure a symmetric KMS key and data key reuse period when creating or updating a State Machine. The execution history and state machine definition will be encrypted with the key applied to the State Machine.
Note: This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.Note:CreateStateMachineis an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created.CreateStateMachine's idempotency check is based on the state machinename,definition,type,LoggingConfiguration,TracingConfiguration, andEncryptionConfigurationThe check is also based on thepublishandversionDescriptionparameters. If a following request has a differentroleArnortags, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case,roleArnandtagswill not be updated, even if they are different.createStateMachineAlias(params = {}, callback) ⇒ AWS.Request
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.
You can also map an alias to split StartExecution requests between two versions of a state machine. To do this, add a second
RoutingConfigobject in theroutingConfigurationparameter. You must also specify the percentage of execution run requests each version should receive in bothRoutingConfigobjects. Step Functions randomly chooses which version runs a given execution based on the percentage you specify.To create an alias that points to a single version, specify a single
RoutingConfigobject with aweightset to 100.You can create up to 100 aliases for each state machine. You must delete unused aliases using the DeleteStateMachineAlias API action.
CreateStateMachineAliasis an idempotent API. Step Functions bases the idempotency check on thestateMachineArn,description,name, androutingConfigurationparameters. Requests that contain the same values for these parameters return a successful idempotent response without creating a duplicate resource.Related operations:
- validateStateMachineDefinition(params = {}, callback) ⇒ AWS.Request
-
- describeExecution(params = {}, callback) ⇒ AWS.Request