Class CfnStateMachine
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,ITaggable,IStateMachineRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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;
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"))
.encryptionConfiguration(EncryptionConfigurationProperty.builder()
.type("type")
// the properties below are optional
.kmsDataKeyReusePeriodSeconds(123)
.kmsKeyId("kmsKeyId")
.build())
.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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnStateMachine.static interfaceDefines a CloudWatch log group.static interfaceSettings to configure server-side encryption for a state machine.static interfaceDefines a destination forLoggingConfiguration.static interfaceDefines what execution history events are logged and where they are logged.static interfaceDefines the S3 bucket location where a state machine definition is stored.static interfaceTheTagsEntryproperty specifies tags to identify a state machine.static interfaceSelects 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.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.stepfunctions.IStateMachineRef
IStateMachineRef.Jsii$Default, IStateMachineRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnStateMachine(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnStateMachine(software.amazon.jsii.JsiiObjectRef objRef) CfnStateMachine(software.constructs.Construct scope, String id, CfnStateMachineProps props) -
Method Summary
Modifier and TypeMethodDescriptionReturns the ARN of the resource.Returns the name of the state machine.Identifier for a state machine revision, which is an immutable, read-only snapshot of a state machine’s definition and configuration.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.Encryption configuration for the state machine.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.A reference to a StateMachine resource.Determines whether aSTANDARDorEXPRESSstate machine is created.getTags()Tag Manager which manages the tags for this resource.The list of tags to add to a resource.Selects whether or not the state machine's AWS X-Ray tracing is enabled.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDefinition(Object value) The Amazon States Language definition of the state machine.voidThe name of the S3 bucket where the state machine definition is stored.voidThe name of the S3 bucket where the state machine definition is stored.voidsetDefinitionString(String value) The Amazon States Language definition of the state machine.voidsetDefinitionSubstitutions(Map<String, String> value) A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.voidA map (string to string) that specifies the mappings for placeholder variables in the state machine definition.voidEncryption configuration for the state machine.voidEncryption configuration for the state machine.voidDefines what execution history events are logged and where they are logged.voidDefines what execution history events are logged and where they are logged.voidsetRoleArn(String value) The Amazon Resource Name (ARN) of the IAM role to use for this state machine.voidsetStateMachineName(String value) The name of the state machine.voidsetStateMachineType(String value) Determines whether aSTANDARDorEXPRESSstate machine is created.voidThe list of tags to add to a resource.voidSelects whether or not the state machine's AWS X-Ray tracing is enabled.voidSelects whether or not the state machine's AWS X-Ray tracing is enabled.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnStateMachineProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
Returns the ARN of the resource. -
getAttrName
Returns the name of the state machine. For example:.{ "Fn::GetAtt": ["MyStateMachine", "Name"] }Returns the name of your state machine:
HelloWorld-StateMachineIf you did not specify the name it will be similar to the following:
MyStateMachine-1234abcdefghFor more information about using
Fn::GetAtt, see Fn::GetAtt . -
getAttrStateMachineRevisionId
Identifier for a state machine revision, which is an immutable, read-only snapshot of a state machine’s definition and configuration. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getStateMachineRef
A reference to a StateMachine resource.- Specified by:
getStateMachineRefin interfaceIStateMachineRef
-
getTags
Tag Manager which manages the tags for this resource. -
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. -
getDefinition
The Amazon States Language definition of the state machine. -
setDefinition
The Amazon States Language definition of the state machine. -
getDefinitionS3Location
The name of the S3 bucket where the state machine definition is stored.Returns union: either
IResolvableorCfnStateMachine.S3LocationProperty -
setDefinitionS3Location
The name of the S3 bucket where the state machine definition is stored. -
setDefinitionS3Location
@Stability(Stable) public void setDefinitionS3Location(@Nullable CfnStateMachine.S3LocationProperty value) The name of the S3 bucket where the state machine definition is stored. -
getDefinitionString
The Amazon States Language definition of the state machine. -
setDefinitionString
The Amazon States Language definition of the state machine. -
getDefinitionSubstitutions
A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.Returns union: either Mapinvalid input: '<'String,
String> orIResolvable -
setDefinitionSubstitutions
A map (string to string) that specifies the mappings for placeholder variables in the state machine definition. -
setDefinitionSubstitutions
A map (string to string) that specifies the mappings for placeholder variables in the state machine definition. -
getEncryptionConfiguration
Encryption configuration for the state machine.Returns union: either
IResolvableorCfnStateMachine.EncryptionConfigurationProperty -
setEncryptionConfiguration
Encryption configuration for the state machine. -
setEncryptionConfiguration
@Stability(Stable) public void setEncryptionConfiguration(@Nullable CfnStateMachine.EncryptionConfigurationProperty value) Encryption configuration for the state machine. -
getLoggingConfiguration
Defines what execution history events are logged and where they are logged.Returns union: either
IResolvableorCfnStateMachine.LoggingConfigurationProperty -
setLoggingConfiguration
Defines what execution history events are logged and where they are logged. -
setLoggingConfiguration
@Stability(Stable) public void setLoggingConfiguration(@Nullable CfnStateMachine.LoggingConfigurationProperty value) Defines what execution history events are logged and where they are logged. -
getStateMachineName
The name of the state machine. -
setStateMachineName
The name of the state machine. -
getStateMachineType
Determines whether aSTANDARDorEXPRESSstate machine is created. -
setStateMachineType
Determines whether aSTANDARDorEXPRESSstate machine is created. -
getTagsRaw
The list of tags to add to a resource. -
setTagsRaw
The list of tags to add to a resource. -
getTracingConfiguration
Selects whether or not the state machine's AWS X-Ray tracing is enabled.Returns union: either
IResolvableorCfnStateMachine.TracingConfigurationProperty -
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.
-