Class CfnStateMachine

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-11T23:26:41.858Z") @Stability(Stable) public class CfnStateMachine extends CfnResource implements IInspectable, ITaggable
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"))
         .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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      Returns the ARN of the resource.
    • getAttrName

      @Stability(Stable) @NotNull public String 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

      @Stability(Stable) @NotNull public String getAttrStateMachineRevisionId()
      Identifier for a state machine revision, which is an immutable, read-only snapshot of a state machine’s definition and configuration.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getRoleArn

      @Stability(Stable) @NotNull public String getRoleArn()
      The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    • setRoleArn

      @Stability(Stable) public void setRoleArn(@NotNull String value)
      The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    • getDefinition

      @Stability(Stable) @Nullable public Object getDefinition()
      The Amazon States Language definition of the state machine.
    • setDefinition

      @Stability(Stable) public void setDefinition(@Nullable Object value)
      The Amazon States Language definition of the state machine.
    • getDefinitionS3Location

      @Stability(Stable) @Nullable public Object getDefinitionS3Location()
      The name of the S3 bucket where the state machine definition is stored.
    • setDefinitionS3Location

      @Stability(Stable) public void setDefinitionS3Location(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public String getDefinitionString()
      The Amazon States Language definition of the state machine.
    • setDefinitionString

      @Stability(Stable) public void setDefinitionString(@Nullable String value)
      The Amazon States Language definition of the state machine.
    • getDefinitionSubstitutions

      @Stability(Stable) @Nullable public Object getDefinitionSubstitutions()
      A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.
    • setDefinitionSubstitutions

      @Stability(Stable) public void setDefinitionSubstitutions(@Nullable IResolvable value)
      A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.
    • setDefinitionSubstitutions

      @Stability(Stable) public void setDefinitionSubstitutions(@Nullable Map<String,String> value)
      A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.
    • getEncryptionConfiguration

      @Stability(Stable) @Nullable public Object getEncryptionConfiguration()
      Encryption configuration for the state machine.
    • setEncryptionConfiguration

      @Stability(Stable) public void setEncryptionConfiguration(@Nullable IResolvable value)
      Encryption configuration for the state machine.
    • setEncryptionConfiguration

      @Stability(Stable) public void setEncryptionConfiguration(@Nullable CfnStateMachine.EncryptionConfigurationProperty value)
      Encryption configuration for the state machine.
    • getLoggingConfiguration

      @Stability(Stable) @Nullable public Object getLoggingConfiguration()
      Defines what execution history events are logged and where they are logged.
    • setLoggingConfiguration

      @Stability(Stable) public void setLoggingConfiguration(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public String getStateMachineName()
      The name of the state machine.
    • setStateMachineName

      @Stability(Stable) public void setStateMachineName(@Nullable String value)
      The name of the state machine.
    • getStateMachineType

      @Stability(Stable) @Nullable public String getStateMachineType()
      Determines whether a STANDARD or EXPRESS state machine is created.
    • setStateMachineType

      @Stability(Stable) public void setStateMachineType(@Nullable String value)
      Determines whether a STANDARD or EXPRESS state machine is created.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnStateMachine.TagsEntryProperty> getTagsRaw()
      The list of tags to add to a resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnStateMachine.TagsEntryProperty> value)
      The list of tags to add to a resource.
    • getTracingConfiguration

      @Stability(Stable) @Nullable public Object getTracingConfiguration()
      Selects whether or not the state machine's AWS X-Ray tracing is enabled.
    • setTracingConfiguration

      @Stability(Stable) public void setTracingConfiguration(@Nullable IResolvable value)
      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.