Class CfnStateMachine
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::StepFunctions::StateMachine
.
Provisions 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.stepfunctions.*; Object definition; Object definitionSubstitutions; CfnStateMachine cfnStateMachine = CfnStateMachine.Builder.create(this, "MyCfnStateMachine") .roleArn("roleArn") // the properties below are optional .definition(definition) .definitionS3Location(S3LocationProperty.builder() .bucket("bucket") .key("key") // the properties below are optional .version("version") .build()) .definitionString("definitionString") .definitionSubstitutions(Map.of( "definitionSubstitutionsKey", definitionSubstitutions)) .loggingConfiguration(LoggingConfigurationProperty.builder() .destinations(List.of(LogDestinationProperty.builder() .cloudWatchLogsLogGroup(CloudWatchLogsLogGroupProperty.builder() .logGroupArn("logGroupArn") .build()) .build())) .includeExecutionData(false) .level("level") .build()) .stateMachineName("stateMachineName") .stateMachineType("stateMachineType") .tags(List.of(TagsEntryProperty.builder() .key("key") .value("value") .build())) .tracingConfiguration(TracingConfigurationProperty.builder() .enabled(false) .build()) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnStateMachine
.static interface
Defines a CloudWatch log group.static interface
Defines a destination forLoggingConfiguration
.static interface
Defines what execution history events are logged and where they are logged.static interface
Defines the S3 bucket location where a state machine definition is stored.static interface
TheTagsEntry
property specifies tags to identify a state machine.static interface
Selects whether or not the state machine's AWS X-Ray tracing is enabled.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnStateMachine
(Construct scope, String id, CfnStateMachineProps props) Create a newAWS::StepFunctions::StateMachine
.protected
CfnStateMachine
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnStateMachine
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the state machine.The Amazon States Language definition of the state machine.The name of the S3 bucket where the state machine definition is stored.The Amazon States Language definition of the state machine.A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.Defines what execution history events are logged and where they are logged.The Amazon Resource Name (ARN) of the IAM role to use for this state machine.The name of the state machine.Determines whether aSTANDARD
orEXPRESS
state machine is created.getTags()
The list of tags to add to a resource.Selects whether or not the state machine's AWS X-Ray tracing is enabled.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDefinition
(Object value) The Amazon States Language definition of the state machine.void
The name of the S3 bucket where the state machine definition is stored.void
The name of the S3 bucket where the state machine definition is stored.void
setDefinitionString
(String value) The Amazon States Language definition of the state machine.void
setDefinitionSubstitutions
(Map<String, Object> value) A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.void
A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.void
Defines what execution history events are logged and where they are logged.void
Defines what execution history events are logged and where they are logged.void
setRoleArn
(String value) The Amazon Resource Name (ARN) of the IAM role to use for this state machine.void
setStateMachineName
(String value) The name of the state machine.void
setStateMachineType
(String value) Determines whether aSTANDARD
orEXPRESS
state machine is created.void
Selects whether or not the state machine's AWS X-Ray tracing is enabled.void
Selects whether or not the state machine's AWS X-Ray tracing is enabled.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnStateMachine
protected CfnStateMachine(software.amazon.jsii.JsiiObjectRef objRef) -
CfnStateMachine
protected CfnStateMachine(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnStateMachine
@Stability(Stable) public CfnStateMachine(@NotNull Construct scope, @NotNull String id, @NotNull CfnStateMachineProps props) Create a newAWS::StepFunctions::StateMachine
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
-
getAttrName
Returns the name of the state machine. For example:.{ "Fn::GetAtt": ["MyStateMachine", "Name"] }
Returns the name of your state machine:
HelloWorld-StateMachine
If you did not specify the name it will be similar to the following:
MyStateMachine-1234abcdefgh
For more information about using
Fn::GetAtt
, see Fn::GetAtt . -
getAttrStateMachineRevisionId
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
The list of tags to add to a resource.Tags may only contain Unicode letters, digits, white space, or these symbols:
_ . : / = + - @
. -
getDefinition
The 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 AWS Step Functions template file. See Amazon States Language .
-
setDefinition
The 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 AWS Step Functions template file. See Amazon States Language .
-
getRoleArn
The Amazon Resource Name (ARN) of the IAM role to use for this state machine. -
setRoleArn
The Amazon Resource Name (ARN) of the IAM role to use for this state machine. -
getDefinitionS3Location
The name of the S3 bucket where the state machine definition is stored.The state machine definition must be a JSON or YAML file.
-
setDefinitionS3Location
The name of the S3 bucket where the state machine definition is stored.The state machine definition must be a JSON or YAML file.
-
setDefinitionS3Location
@Stability(Stable) public void setDefinitionS3Location(@Nullable CfnStateMachine.S3LocationProperty value) The name of the S3 bucket where the state machine definition is stored.The state machine definition must be a JSON or YAML file.
-
getDefinitionString
The Amazon States Language definition of the state machine.The state machine definition must be in JSON. See Amazon States Language .
-
setDefinitionString
The Amazon States Language definition of the state machine.The state machine definition must be in JSON. See Amazon States Language .
-
getDefinitionSubstitutions
A 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.
-
setDefinitionSubstitutions
A 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.
-
setDefinitionSubstitutions
A 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.
-
getLoggingConfiguration
Defines what execution history events are logged and where they are logged.By default, the
level
is set toOFF
. For more information see Log Levels in the AWS Step Functions User Guide. -
setLoggingConfiguration
Defines what execution history events are logged and where they are logged.By default, the
level
is set toOFF
. For more information see Log Levels in the AWS Step Functions User Guide. -
setLoggingConfiguration
@Stability(Stable) public void setLoggingConfiguration(@Nullable CfnStateMachine.LoggingConfigurationProperty value) Defines what execution history events are logged and where they are logged.By default, the
level
is set toOFF
. For more information see Log Levels in the AWS Step Functions User Guide. -
getStateMachineName
The 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.
-
setStateMachineName
The 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.
-
getStateMachineType
Determines whether aSTANDARD
orEXPRESS
state machine is created.The default is
STANDARD
. You cannot update thetype
of a state machine once it has been created. For more information onSTANDARD
andEXPRESS
workflows, see Standard Versus Express Workflows in the AWS Step Functions Developer Guide. -
setStateMachineType
Determines whether aSTANDARD
orEXPRESS
state machine is created.The default is
STANDARD
. You cannot update thetype
of a state machine once it has been created. For more information onSTANDARD
andEXPRESS
workflows, see Standard Versus Express Workflows in the AWS Step Functions Developer Guide. -
getTracingConfiguration
Selects whether or not the state machine's AWS X-Ray tracing is enabled. -
setTracingConfiguration
Selects whether or not the state machine's AWS X-Ray tracing is enabled. -
setTracingConfiguration
@Stability(Stable) public void setTracingConfiguration(@Nullable CfnStateMachine.TracingConfigurationProperty value) Selects whether or not the state machine's AWS X-Ray tracing is enabled.
-