AWS Native is in preview. AWS Classic is fully supported.
aws-native.stepfunctions.StateMachine
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
Resource schema for StateMachine
Example Usage
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var myStateMachine = new AwsNative.StepFunctions.StateMachine("myStateMachine", new()
{
StateMachineName = "HelloWorld-StateMachine",
StateMachineType = AwsNative.StepFunctions.StateMachineType.Standard,
DefinitionString = "{\"StartAt\": \"HelloWorld\", \"States\": {\"HelloWorld\": {\"Type\": \"Task\", \"Resource\": \"arn:aws:lambda:us-east-1:111122223333;:function:HelloFunction\", \"End\": true}}}",
RoleArn = "arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1;",
});
});
package main
import (
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/stepfunctions"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := stepfunctions.NewStateMachine(ctx, "myStateMachine", &stepfunctions.StateMachineArgs{
StateMachineName: pulumi.String("HelloWorld-StateMachine"),
StateMachineType: stepfunctions.StateMachineTypeStandard,
DefinitionString: pulumi.String("{\"StartAt\": \"HelloWorld\", \"States\": {\"HelloWorld\": {\"Type\": \"Task\", \"Resource\": \"arn:aws:lambda:us-east-1:111122223333;:function:HelloFunction\", \"End\": true}}}"),
RoleArn: pulumi.String("arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1;"),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_aws_native as aws_native
my_state_machine = aws_native.stepfunctions.StateMachine("myStateMachine",
state_machine_name="HelloWorld-StateMachine",
state_machine_type=aws_native.stepfunctions.StateMachineType.STANDARD,
definition_string="{\"StartAt\": \"HelloWorld\", \"States\": {\"HelloWorld\": {\"Type\": \"Task\", \"Resource\": \"arn:aws:lambda:us-east-1:111122223333;:function:HelloFunction\", \"End\": true}}}",
role_arn="arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1;")
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const myStateMachine = new aws_native.stepfunctions.StateMachine("myStateMachine", {
stateMachineName: "HelloWorld-StateMachine",
stateMachineType: aws_native.stepfunctions.StateMachineType.Standard,
definitionString: "{\"StartAt\": \"HelloWorld\", \"States\": {\"HelloWorld\": {\"Type\": \"Task\", \"Resource\": \"arn:aws:lambda:us-east-1:111122223333;:function:HelloFunction\", \"End\": true}}}",
roleArn: "arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1;",
});
Coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var myStateMachine = new AwsNative.StepFunctions.StateMachine("myStateMachine", new()
{
StateMachineName = "HelloWorld-StateMachine",
StateMachineType = AwsNative.StepFunctions.StateMachineType.Standard,
DefinitionString = @"{
""StartAt"": ""HelloWorld"",
""States"" : {
""HelloWorld"" : {
""Type"" : ""Task"",
""Resource"" : ""arn:aws:lambda:us-east-1:111122223333:function:HelloFunction"",
""End"" : true
}
}
}",
RoleArn = "arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1",
Tags = new[]
{
new AwsNative.Inputs.TagArgs
{
Key = "keyname1",
Value = "value1",
},
new AwsNative.Inputs.TagArgs
{
Key = "keyname2",
Value = "value2",
},
},
});
});
package main
import (
awsnative "github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/stepfunctions"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := stepfunctions.NewStateMachine(ctx, "myStateMachine", &stepfunctions.StateMachineArgs{
StateMachineName: pulumi.String("HelloWorld-StateMachine"),
StateMachineType: stepfunctions.StateMachineTypeStandard,
DefinitionString: pulumi.String(`{
"StartAt": "HelloWorld",
"States" : {
"HelloWorld" : {
"Type" : "Task",
"Resource" : "arn:aws:lambda:us-east-1:111122223333:function:HelloFunction",
"End" : true
}
}
}`),
RoleArn: pulumi.String("arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1"),
Tags: aws.TagArray{
&aws.TagArgs{
Key: pulumi.String("keyname1"),
Value: pulumi.String("value1"),
},
&aws.TagArgs{
Key: pulumi.String("keyname2"),
Value: pulumi.String("value2"),
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_aws_native as aws_native
my_state_machine = aws_native.stepfunctions.StateMachine("myStateMachine",
state_machine_name="HelloWorld-StateMachine",
state_machine_type=aws_native.stepfunctions.StateMachineType.STANDARD,
definition_string="""{
"StartAt": "HelloWorld",
"States" : {
"HelloWorld" : {
"Type" : "Task",
"Resource" : "arn:aws:lambda:us-east-1:111122223333:function:HelloFunction",
"End" : true
}
}
}""",
role_arn="arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1",
tags=[
aws_native.TagArgs(
key="keyname1",
value="value1",
),
aws_native.TagArgs(
key="keyname2",
value="value2",
),
])
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const myStateMachine = new aws_native.stepfunctions.StateMachine("myStateMachine", {
stateMachineName: "HelloWorld-StateMachine",
stateMachineType: aws_native.stepfunctions.StateMachineType.Standard,
definitionString: `{
"StartAt": "HelloWorld",
"States" : {
"HelloWorld" : {
"Type" : "Task",
"Resource" : "arn:aws:lambda:us-east-1:111122223333:function:HelloFunction",
"End" : true
}
}
}`,
roleArn: "arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1",
tags: [
{
key: "keyname1",
value: "value1",
},
{
key: "keyname2",
value: "value2",
},
],
});
Coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var myStateMachine = new AwsNative.StepFunctions.StateMachine("myStateMachine", new()
{
StateMachineName = "HelloWorld-StateMachine",
DefinitionString = @"{
""StartAt"": ""HelloWorld"",
""States"": {
""HelloWorld"": {
""Type"": ""Task"",
""Resource"": ""arn:aws:lambda:us-east-1:111122223333:function:HelloFunction"",
""End"": true
}
}
}",
RoleArn = "arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1",
Tags = new[]
{
new AwsNative.Inputs.TagArgs
{
Key = "keyname1",
Value = "value1",
},
new AwsNative.Inputs.TagArgs
{
Key = "keyname2",
Value = "value2",
},
},
});
});
package main
import (
awsnative "github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/stepfunctions"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := stepfunctions.NewStateMachine(ctx, "myStateMachine", &stepfunctions.StateMachineArgs{
StateMachineName: pulumi.String("HelloWorld-StateMachine"),
DefinitionString: pulumi.String(`{
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:111122223333:function:HelloFunction",
"End": true
}
}
}`),
RoleArn: pulumi.String("arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1"),
Tags: aws.TagArray{
&aws.TagArgs{
Key: pulumi.String("keyname1"),
Value: pulumi.String("value1"),
},
&aws.TagArgs{
Key: pulumi.String("keyname2"),
Value: pulumi.String("value2"),
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_aws_native as aws_native
my_state_machine = aws_native.stepfunctions.StateMachine("myStateMachine",
state_machine_name="HelloWorld-StateMachine",
definition_string="""{
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:111122223333:function:HelloFunction",
"End": true
}
}
}""",
role_arn="arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1",
tags=[
aws_native.TagArgs(
key="keyname1",
value="value1",
),
aws_native.TagArgs(
key="keyname2",
value="value2",
),
])
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const myStateMachine = new aws_native.stepfunctions.StateMachine("myStateMachine", {
stateMachineName: "HelloWorld-StateMachine",
definitionString: `{
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:111122223333:function:HelloFunction",
"End": true
}
}
}`,
roleArn: "arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1",
tags: [
{
key: "keyname1",
value: "value1",
},
{
key: "keyname2",
value: "value2",
},
],
});
Coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var myStateMachine = new AwsNative.StepFunctions.StateMachine("myStateMachine", new()
{
StateMachineName = "HelloWorld-StateMachine",
DefinitionS3Location = new AwsNative.StepFunctions.Inputs.StateMachineS3LocationArgs
{
Bucket = "example_bucket",
Key = "hello_world.json",
},
DefinitionSubstitutions =
{
{ "helloFunction", "arn:aws:lambda:us-east-1:111122223333:function:HelloFunction" },
},
RoleArn = "arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1",
});
});
package main
import (
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/stepfunctions"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := stepfunctions.NewStateMachine(ctx, "myStateMachine", &stepfunctions.StateMachineArgs{
StateMachineName: pulumi.String("HelloWorld-StateMachine"),
DefinitionS3Location: &stepfunctions.StateMachineS3LocationArgs{
Bucket: pulumi.String("example_bucket"),
Key: pulumi.String("hello_world.json"),
},
DefinitionSubstitutions: pulumi.Map{
"helloFunction": pulumi.Any("arn:aws:lambda:us-east-1:111122223333:function:HelloFunction"),
},
RoleArn: pulumi.String("arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1"),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_aws_native as aws_native
my_state_machine = aws_native.stepfunctions.StateMachine("myStateMachine",
state_machine_name="HelloWorld-StateMachine",
definition_s3_location=aws_native.stepfunctions.StateMachineS3LocationArgs(
bucket="example_bucket",
key="hello_world.json",
),
definition_substitutions={
"helloFunction": "arn:aws:lambda:us-east-1:111122223333:function:HelloFunction",
},
role_arn="arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1")
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const myStateMachine = new aws_native.stepfunctions.StateMachine("myStateMachine", {
stateMachineName: "HelloWorld-StateMachine",
definitionS3Location: {
bucket: "example_bucket",
key: "hello_world.json",
},
definitionSubstitutions: {
helloFunction: "arn:aws:lambda:us-east-1:111122223333:function:HelloFunction",
},
roleArn: "arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1",
});
Coming soon!
Create StateMachine Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new StateMachine(name: string, args: StateMachineArgs, opts?: CustomResourceOptions);
@overload
def StateMachine(resource_name: str,
args: StateMachineArgs,
opts: Optional[ResourceOptions] = None)
@overload
def StateMachine(resource_name: str,
opts: Optional[ResourceOptions] = None,
role_arn: Optional[str] = None,
definition: Optional[StateMachineDefinitionArgs] = None,
definition_s3_location: Optional[StateMachineS3LocationArgs] = None,
definition_string: Optional[str] = None,
definition_substitutions: Optional[Mapping[str, Union[str, int, bool]]] = None,
logging_configuration: Optional[StateMachineLoggingConfigurationArgs] = None,
state_machine_name: Optional[str] = None,
state_machine_type: Optional[StateMachineType] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
tracing_configuration: Optional[StateMachineTracingConfigurationArgs] = None)
func NewStateMachine(ctx *Context, name string, args StateMachineArgs, opts ...ResourceOption) (*StateMachine, error)
public StateMachine(string name, StateMachineArgs args, CustomResourceOptions? opts = null)
public StateMachine(String name, StateMachineArgs args)
public StateMachine(String name, StateMachineArgs args, CustomResourceOptions options)
type: aws-native:stepfunctions:StateMachine
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args StateMachineArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args StateMachineArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args StateMachineArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StateMachineArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StateMachineArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Example
The following reference example uses placeholder values for all input properties.
Coming soon!
Coming soon!
Coming soon!
Coming soon!
const stateMachineResource = new aws_native.stepfunctions.StateMachine("stateMachineResource", {
roleArn: "string",
definition: {},
definitionS3Location: {
bucket: "string",
key: "string",
version: "string",
},
definitionString: "string",
definitionSubstitutions: {
string: "string",
},
loggingConfiguration: {
destinations: [{
cloudWatchLogsLogGroup: {
logGroupArn: "string",
},
}],
includeExecutionData: false,
level: aws_native.stepfunctions.StateMachineLoggingConfigurationLevel.All,
},
stateMachineName: "string",
stateMachineType: aws_native.stepfunctions.StateMachineType.Standard,
tags: [{
key: "string",
value: "string",
}],
tracingConfiguration: {
enabled: false,
},
});
Coming soon!
StateMachine Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The StateMachine resource accepts the following input properties:
- Role
Arn string - Definition
Pulumi.
Aws Native. Step Functions. Inputs. State Machine Definition - Definition
S3Location Pulumi.Aws Native. Step Functions. Inputs. State Machine S3Location - Definition
String string - Definition
Substitutions Dictionary<string, object> - Logging
Configuration Pulumi.Aws Native. Step Functions. Inputs. State Machine Logging Configuration - State
Machine stringName - State
Machine Pulumi.Type Aws Native. Step Functions. State Machine Type - List<Pulumi.
Aws Native. Inputs. Tag> - Tracing
Configuration Pulumi.Aws Native. Step Functions. Inputs. State Machine Tracing Configuration
- Role
Arn string - Definition
State
Machine Definition Args - Definition
S3Location StateMachine S3Location Args - Definition
String string - Definition
Substitutions map[string]interface{} - Logging
Configuration StateMachine Logging Configuration Args - State
Machine stringName - State
Machine StateType Machine Type - Tag
Args - Tracing
Configuration StateMachine Tracing Configuration Args
- role
Arn String - definition
State
Machine Definition - definition
S3Location StateMachine S3Location - definition
String String - definition
Substitutions Map<String,Object> - logging
Configuration StateMachine Logging Configuration - state
Machine StringName - state
Machine StateType Machine Type - List<Tag>
- tracing
Configuration StateMachine Tracing Configuration
- role
Arn string - definition
State
Machine Definition - definition
S3Location StateMachine S3Location - definition
String string - definition
Substitutions {[key: string]: string | number | boolean} - logging
Configuration StateMachine Logging Configuration - state
Machine stringName - state
Machine StateType Machine Type - Tag[]
- tracing
Configuration StateMachine Tracing Configuration
- role_
arn str - definition
State
Machine Definition Args - definition_
s3_ Statelocation Machine S3Location Args - definition_
string str - definition_
substitutions Mapping[str, Union[str, int, bool]] - logging_
configuration StateMachine Logging Configuration Args - state_
machine_ strname - state_
machine_ Statetype Machine Type - Sequence[Tag
Args] - tracing_
configuration StateMachine Tracing Configuration Args
Outputs
All input properties are implicitly available as output properties. Additionally, the StateMachine resource produces the following output properties:
- Arn string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- State
Machine stringRevision Id
- Arn string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- State
Machine stringRevision Id
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- state
Machine StringRevision Id
- arn string
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- state
Machine stringRevision Id
- arn str
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- state_
machine_ strrevision_ id
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- state
Machine StringRevision Id
Supporting Types
StateMachineCloudWatchLogsLogGroup, StateMachineCloudWatchLogsLogGroupArgs
- Log
Group stringArn
- Log
Group stringArn
- log
Group StringArn
- log
Group stringArn
- log_
group_ strarn
- log
Group StringArn
StateMachineLogDestination, StateMachineLogDestinationArgs
StateMachineLoggingConfiguration, StateMachineLoggingConfigurationArgs
StateMachineLoggingConfigurationLevel, StateMachineLoggingConfigurationLevelArgs
- All
- ALL
- Error
- ERROR
- Fatal
- FATAL
- Off
- OFF
- State
Machine Logging Configuration Level All - ALL
- State
Machine Logging Configuration Level Error - ERROR
- State
Machine Logging Configuration Level Fatal - FATAL
- State
Machine Logging Configuration Level Off - OFF
- All
- ALL
- Error
- ERROR
- Fatal
- FATAL
- Off
- OFF
- All
- ALL
- Error
- ERROR
- Fatal
- FATAL
- Off
- OFF
- ALL
- ALL
- ERROR
- ERROR
- FATAL
- FATAL
- OFF
- OFF
- "ALL"
- ALL
- "ERROR"
- ERROR
- "FATAL"
- FATAL
- "OFF"
- OFF
StateMachineS3Location, StateMachineS3LocationArgs
StateMachineTracingConfiguration, StateMachineTracingConfigurationArgs
- Enabled bool
- Enabled bool
- enabled Boolean
- enabled boolean
- enabled bool
- enabled Boolean
StateMachineType, StateMachineTypeArgs
- Standard
- STANDARD
- Express
- EXPRESS
- State
Machine Type Standard - STANDARD
- State
Machine Type Express - EXPRESS
- Standard
- STANDARD
- Express
- EXPRESS
- Standard
- STANDARD
- Express
- EXPRESS
- STANDARD
- STANDARD
- EXPRESS
- EXPRESS
- "STANDARD"
- STANDARD
- "EXPRESS"
- EXPRESS
Tag, TagArgs
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.