Class CfnStateMachine
A CloudFormation AWS::StepFunctions::StateMachine
.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.AWS.StepFunctions.dll
Syntax (csharp)
public class CfnStateMachine : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnStateMachine
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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.
CloudformationResource: AWS::StepFunctions::StateMachine
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.StepFunctions;
var definition;
var definitionSubstitutions;
var cfnStateMachine = new CfnStateMachine(this, "MyCfnStateMachine", new CfnStateMachineProps {
RoleArn = "roleArn",
// the properties below are optional
Definition = definition,
DefinitionS3Location = new S3LocationProperty {
Bucket = "bucket",
Key = "key",
// the properties below are optional
Version = "version"
},
DefinitionString = "definitionString",
DefinitionSubstitutions = new Dictionary<string, object> {
{ "definitionSubstitutionsKey", definitionSubstitutions }
},
LoggingConfiguration = new LoggingConfigurationProperty {
Destinations = new [] { new LogDestinationProperty {
CloudWatchLogsLogGroup = new CloudWatchLogsLogGroupProperty {
LogGroupArn = "logGroupArn"
}
} },
IncludeExecutionData = false,
Level = "level"
},
StateMachineName = "stateMachineName",
StateMachineType = "stateMachineType",
Tags = new [] { new TagsEntryProperty {
Key = "key",
Value = "value"
} },
TracingConfiguration = new TracingConfigurationProperty {
Enabled = false
}
});
Synopsis
Constructors
CfnStateMachine(Construct, String, ICfnStateMachineProps) | Create a new |
CfnStateMachine(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnStateMachine(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | |
AttrName | Returns the name of the state machine. For example:. |
AttrStateMachineRevisionId | |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Definition | The Amazon States Language definition of the state machine. |
DefinitionS3Location | The name of the S3 bucket where the state machine definition is stored. |
DefinitionString | The Amazon States Language definition of the state machine. |
DefinitionSubstitutions | A map (string to string) that specifies the mappings for placeholder variables in the state machine definition. |
LoggingConfiguration | Defines what execution history events are logged and where they are logged. |
RoleArn | The Amazon Resource Name (ARN) of the IAM role to use for this state machine. |
StateMachineName | The name of the state machine. |
StateMachineType | Determines whether a |
Tags | The list of tags to add to a resource. |
TracingConfiguration | Selects whether or not the state machine's AWS X-Ray tracing is enabled. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnStateMachine(Construct, String, ICfnStateMachineProps)
Create a new AWS::StepFunctions::StateMachine
.
public CfnStateMachine(Construct scope, string id, ICfnStateMachineProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnStateMachineProps
- resource properties.
CfnStateMachine(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnStateMachine(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnStateMachine(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnStateMachine(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrName
Returns the name of the state machine. For example:.
public virtual string AttrName { get; }
Property Value
System.String
Remarks
{ "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 .
CloudformationAttribute: Name
AttrStateMachineRevisionId
public virtual string AttrStateMachineRevisionId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: StateMachineRevisionId
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Definition
The Amazon States Language definition of the state machine.
public virtual object Definition { get; set; }
Property Value
System.Object
Remarks
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 .
DefinitionS3Location
The name of the S3 bucket where the state machine definition is stored.
public virtual object DefinitionS3Location { get; set; }
Property Value
System.Object
Remarks
The state machine definition must be a JSON or YAML file.
DefinitionString
The Amazon States Language definition of the state machine.
public virtual string DefinitionString { get; set; }
Property Value
System.String
Remarks
The state machine definition must be in JSON. See Amazon States Language .
DefinitionSubstitutions
A map (string to string) that specifies the mappings for placeholder variables in the state machine definition.
public virtual object DefinitionSubstitutions { get; set; }
Property Value
System.Object
Remarks
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.
LoggingConfiguration
Defines what execution history events are logged and where they are logged.
public virtual object LoggingConfiguration { get; set; }
Property Value
System.Object
Remarks
By default, the level
is set to OFF
. For more information see Log Levels in the AWS Step Functions User Guide.
RoleArn
The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
public virtual string RoleArn { get; set; }
Property Value
System.String
Remarks
StateMachineName
The name of the state machine.
public virtual string StateMachineName { get; set; }
Property Value
System.String
Remarks
A name must not contain:
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.
StateMachineType
Determines whether a STANDARD
or EXPRESS
state machine is created.
public virtual string StateMachineType { get; set; }
Property Value
System.String
Remarks
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.
Tags
The list of tags to add to a resource.
public virtual TagManager Tags { get; }
Property Value
Remarks
Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @
.
TracingConfiguration
Selects whether or not the state machine's AWS X-Ray tracing is enabled.
public virtual object TracingConfiguration { get; set; }
Property Value
System.Object
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>