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
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnStateMachine.static interfaceDefines a CloudWatch log group.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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnStateMachine(Construct scope, String id, CfnStateMachineProps props) Create a newAWS::StepFunctions::StateMachine.protectedCfnStateMachine(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnStateMachine(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 aSTANDARDorEXPRESSstate 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.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, Object> 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.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.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.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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:
inspectin 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:
renderPropertiesin 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-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
-
getCfnProperties
- Overrides:
getCfnPropertiesin 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
levelis 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
levelis 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
levelis 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 aSTANDARDorEXPRESSstate machine is created.The default is
STANDARD. You cannot update thetypeof a state machine once it has been created. For more information onSTANDARDandEXPRESSworkflows, see Standard Versus Express Workflows in the AWS Step Functions Developer Guide. -
setStateMachineType
Determines whether aSTANDARDorEXPRESSstate machine is created.The default is
STANDARD. You cannot update thetypeof a state machine once it has been created. For more information onSTANDARDandEXPRESSworkflows, 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.
-