@Generated(value="jsii-pacmak/1.54.0 (build b1b977a)", date="2022-02-19T00:19:34.271Z") @Stability(value=Stable) 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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnStateMachine(Construct scope,
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 |
|---|---|
String |
getAttrArn() |
String |
getAttrName()
Returns the name of the state machine.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getDefinition()
The Amazon States Language definition of the state machine.
|
Object |
getDefinitionS3Location()
The name of the S3 bucket where the state machine definition is stored.
|
String |
getDefinitionString()
The Amazon States Language definition of the state machine.
|
Object |
getDefinitionSubstitutions()
A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.
|
Object |
getLoggingConfiguration()
Defines what execution history events are logged and where they are logged.
|
String |
getRoleArn()
The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
|
String |
getStateMachineName()
The name of the state machine.
|
String |
getStateMachineType()
Determines whether a `STANDARD` or `EXPRESS` state machine is created.
|
TagManager |
getTags()
The list of tags to add to a resource.
|
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 Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDefinition(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(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(Map<String,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(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 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, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnStateMachine(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnStateMachine(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnStateMachine(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull public 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 .
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @ .
@Stability(value=Stable) @NotNull public 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 .
@Stability(value=Stable)
public void setDefinition(@NotNull
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 .
@Stability(value=Stable) @NotNull public String getRoleArn()
@Stability(value=Stable)
public void setRoleArn(@NotNull
String value)
@Stability(value=Stable) @Nullable public Object getDefinitionS3Location()
The state machine definition must be a JSON or YAML file.
@Stability(value=Stable)
public void setDefinitionS3Location(@Nullable
IResolvable value)
The state machine definition must be a JSON or YAML file.
@Stability(value=Stable)
public void setDefinitionS3Location(@Nullable
CfnStateMachine.S3LocationProperty value)
The state machine definition must be a JSON or YAML file.
@Stability(value=Stable) @Nullable public String getDefinitionString()
The state machine definition must be in JSON. See Amazon States Language .
@Stability(value=Stable)
public void setDefinitionString(@Nullable
String value)
The state machine definition must be in JSON. See Amazon States Language .
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setDefinitionSubstitutions(@Nullable
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.
@Stability(value=Stable)
public void setDefinitionSubstitutions(@Nullable
Map<String,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.
@Stability(value=Stable) @Nullable public Object getLoggingConfiguration()
By default, the
levelis set toOFF. For more information see Log Levels in the AWS Step Functions User Guide.
@Stability(value=Stable)
public void setLoggingConfiguration(@Nullable
IResolvable value)
By default, the
levelis set toOFF. For more information see Log Levels in the AWS Step Functions User Guide.
@Stability(value=Stable)
public void setLoggingConfiguration(@Nullable
CfnStateMachine.LoggingConfigurationProperty value)
By default, the
levelis set toOFF. For more information see Log Levels in the AWS Step Functions User Guide.
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setStateMachineName(@Nullable
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.
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setStateMachineType(@Nullable
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.
@Stability(value=Stable) @Nullable public Object getTracingConfiguration()
@Stability(value=Stable)
public void setTracingConfiguration(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setTracingConfiguration(@Nullable
CfnStateMachine.TracingConfigurationProperty value)
Copyright © 2022. All rights reserved.