AWS::StepFunctions::StateMachineProvisions 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.
import { CfnStateMachine } from 'aws-cdk-lib/aws-stepfunctions';Or use the module namespace:
import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';
// stepfunctions.CfnStateMachineConfiguration passed to the constructor as CfnStateMachineProps.
roleArnRequiredstring | IRoleRefThe Amazon Resource Name (ARN) of the IAM role to use for this state machine.
definitionOptionalanyThe Amazon States Language definition of the state machine. The state machine definition must be in JSON or YAML, and the format of the object must match the format of your CloudFormation template file. See [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) .
definitionS3LocationOptionalIResolvable | S3LocationPropertyThe name of the S3 bucket where the state machine definition is stored. The state machine definition must be a JSON or YAML file.
definitionStringOptionalstring | ITableRef | ITaskDefinitionRef | IFunctionRef | IVersionRef | ITopicRef | IQueueRefThe Amazon States Language definition of the state machine. The state machine definition must be in JSON. See [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) .
definitionSubstitutionsOptional{ [key: string]: string } | IResolvableA map (string to string) that specifies the mappings for placeholder variables in the state machine definition. This enables the customer to inject values obtained at runtime, for example from intrinsic functions, in the state machine definition. Variables can be template parameter names, resource logical IDs, resource attributes, or a variable in a key-value map. Substitutions must follow the syntax: `${key_name}` or `${variable_1,variable_2,...}` .
encryptionConfigurationOptionalIResolvable | EncryptionConfigurationPropertyEncryption configuration for the state machine.
loggingConfigurationOptionalIResolvable | LoggingConfigurationPropertyDefines what execution history events are logged and where they are logged. > By default, the `level` is set to `OFF` . For more information see [Log Levels](https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html) in the AWS Step Functions User Guide.
stateMachineNameOptionalstringThe name of the state machine. A name must *not* contain: - white space - brackets `< > { } [ ]` - wildcard characters `? *` - special characters `" # % \ ^ | ~ ` $ & , ; : /` - control characters ( `U+0000-001F` , `U+007F-009F` ) > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
stateMachineTypeOptionalstringDetermines whether a `STANDARD` or `EXPRESS` state machine is created. The default is `STANDARD` . You cannot update the `type` of a state machine once it has been created. For more information on `STANDARD` and `EXPRESS` workflows, see [Standard Versus Express Workflows](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-standard-vs-express.html) in the AWS Step Functions Developer Guide.
tagsOptionalTagsEntryProperty[]The list of tags to add to a resource. Tags may only contain Unicode letters, digits, white space, or these symbols: `_ . : / = + -
tracingConfigurationOptionalIResolvable | TracingConfigurationPropertySelects whether or not the state machine's AWS X-Ray tracing is enabled.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about AWS Step Functions on one page. HD quality, print-friendly.
Download Free Infographicaws-stepfunctionsAWS::StepFunctions::StateMachine