@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-06-22T23:27:55.764Z") public class CfnStateMachine extends CfnResource implements IInspectable
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; 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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnStateMachine.Builder
A fluent builder for
CfnStateMachine . |
static interface |
CfnStateMachine.CloudWatchLogsLogGroupProperty
Defines a CloudWatch log group.
|
static interface |
CfnStateMachine.LogDestinationProperty
Defines a destination for `LoggingConfiguration` .
|
static interface |
CfnStateMachine.LoggingConfigurationProperty
Defines what execution history events are logged and where they are logged.
|
static interface |
CfnStateMachine.S3LocationProperty
Defines the S3 bucket location where a state machine definition is stored.
|
static interface |
CfnStateMachine.TagsEntryProperty
The `TagsEntry` property specifies *tags* to identify a state machine.
|
static interface |
CfnStateMachine.TracingConfigurationProperty
Selects whether or not the state machine's AWS X-Ray tracing is enabled.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnStateMachine(Construct scope,
java.lang.String id,
CfnStateMachineProps props)
Create a new `AWS::StepFunctions::StateMachine`.
|
protected |
CfnStateMachine(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnStateMachine(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn() |
java.lang.String |
getAttrName()
Returns the name of the state machine.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getDefinition()
The Amazon States Language definition of the state machine.
|
java.lang.Object |
getDefinitionS3Location()
The name of the S3 bucket where the state machine definition is stored.
|
java.lang.String |
getDefinitionString()
The Amazon States Language definition of the state machine.
|
java.lang.Object |
getDefinitionSubstitutions()
A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.
|
java.lang.Object |
getLoggingConfiguration()
Defines what execution history events are logged and where they are logged.
|
java.lang.String |
getRoleArn()
The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
|
java.lang.String |
getStateMachineName()
The name of the state machine.
|
java.lang.String |
getStateMachineType()
Determines whether a `STANDARD` or `EXPRESS` state machine is created.
|
TagManager |
getTags()
The list of tags to add to a resource.
|
java.lang.Object |
getTracingConfiguration()
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.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setDefinition(java.lang.Object value)
The Amazon States Language definition of the state machine.
|
void |
setDefinitionS3Location(CfnStateMachine.S3LocationProperty value)
The name of the S3 bucket where the state machine definition is stored.
|
void |
setDefinitionS3Location(IResolvable value)
The name of the S3 bucket where the state machine definition is stored.
|
void |
setDefinitionString(java.lang.String value)
The Amazon States Language definition of the state machine.
|
void |
setDefinitionSubstitutions(IResolvable value)
A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.
|
void |
setDefinitionSubstitutions(java.util.Map<java.lang.String,java.lang.String> value)
A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.
|
void |
setLoggingConfiguration(CfnStateMachine.LoggingConfigurationProperty value)
Defines what execution history events are logged and where they are logged.
|
void |
setLoggingConfiguration(IResolvable value)
Defines what execution history events are logged and where they are logged.
|
void |
setRoleArn(java.lang.String value)
The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
|
void |
setStateMachineName(java.lang.String value)
The name of the state machine.
|
void |
setStateMachineType(java.lang.String value)
Determines whether a `STANDARD` or `EXPRESS` state machine is created.
|
void |
setTracingConfiguration(CfnStateMachine.TracingConfigurationProperty value)
Selects whether or not the state machine's AWS X-Ray tracing is enabled.
|
void |
setTracingConfiguration(IResolvable value)
Selects whether or not the state machine's AWS X-Ray tracing is enabled.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnStateMachine(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnStateMachine(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnStateMachine(Construct scope, java.lang.String id, CfnStateMachineProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrName()
{ "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 .
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @
.
public java.lang.Object getDefinition()
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 .
public void setDefinition(java.lang.Object value)
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 .
public java.lang.String getRoleArn()
public void setRoleArn(java.lang.String value)
public java.lang.Object getDefinitionS3Location()
The state machine definition must be a JSON or YAML file.
public void setDefinitionS3Location(IResolvable value)
The state machine definition must be a JSON or YAML file.
public void setDefinitionS3Location(CfnStateMachine.S3LocationProperty value)
The state machine definition must be a JSON or YAML file.
public java.lang.String getDefinitionString()
The state machine definition must be in JSON. See Amazon States Language .
public void setDefinitionString(java.lang.String value)
The state machine definition must be in JSON. See Amazon States Language .
public java.lang.Object getDefinitionSubstitutions()
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.
public void setDefinitionSubstitutions(IResolvable value)
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.
public void setDefinitionSubstitutions(java.util.Map<java.lang.String,java.lang.String> value)
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.
public java.lang.Object getLoggingConfiguration()
By default, the
level
is set toOFF
. For more information see Log Levels in the AWS Step Functions User Guide.
public void setLoggingConfiguration(IResolvable value)
By default, the
level
is set toOFF
. For more information see Log Levels in the AWS Step Functions User Guide.
public void setLoggingConfiguration(CfnStateMachine.LoggingConfigurationProperty value)
By default, the
level
is set toOFF
. For more information see Log Levels in the AWS Step Functions User Guide.
public java.lang.String getStateMachineName()
A name must not contain:
< > { } [ ]
? *
" # % \ ^ | ~
$ & , ; : /`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.
public void setStateMachineName(java.lang.String value)
A name must not contain:
< > { } [ ]
? *
" # % \ ^ | ~
$ & , ; : /`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.
public java.lang.String getStateMachineType()
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 in the AWS Step Functions Developer Guide.
public void setStateMachineType(java.lang.String value)
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 in the AWS Step Functions Developer Guide.
public java.lang.Object getTracingConfiguration()
public void setTracingConfiguration(IResolvable value)
public void setTracingConfiguration(CfnStateMachine.TracingConfigurationProperty value)