AWS Native

Pulumi Official
Package maintained by Pulumi
v0.19.0 published on Wednesday, Jun 8, 2022 by Pulumi

StateMachine

Resource schema for StateMachine

Example Usage

Example

using Pulumi;
using AwsNative = Pulumi.AwsNative;

class MyStack : Stack
{
    public MyStack()
    {
        var myStateMachine = new AwsNative.StepFunctions.StateMachine("myStateMachine", new AwsNative.StepFunctions.StateMachineArgs
        {
            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 Pulumi;
using AwsNative = Pulumi.AwsNative;

class MyStack : Stack
{
    public MyStack()
    {
        var myStateMachine = new AwsNative.StepFunctions.StateMachine("myStateMachine", new AwsNative.StepFunctions.StateMachineArgs
        {
            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 AwsNative.StepFunctions.Inputs.StateMachineTagsEntryArgs
                {
                    Key = "keyname1",
                    Value = "value1",
                },
                new AwsNative.StepFunctions.Inputs.StateMachineTagsEntryArgs
                {
                    Key = "keyname2",
                    Value = "value2",
                },
            },
        });
    }

}
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("{\n    \"StartAt\": \"HelloWorld\",\n    \"States\" : {\n        \"HelloWorld\" : {\n            \"Type\" : \"Task\", \n            \"Resource\" : \"arn:aws:lambda:us-east-1:111122223333:function:HelloFunction\",\n            \"End\" : true\n        }\n    }\n}"),
			RoleArn:          pulumi.String("arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1"),
			Tags: []stepfunctions.StateMachineTagsEntryArgs{
				&stepfunctions.StateMachineTagsEntryArgs{
					Key:   pulumi.String("keyname1"),
					Value: pulumi.String("value1"),
				},
				&stepfunctions.StateMachineTagsEntryArgs{
					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.stepfunctions.StateMachineTagsEntryArgs(
            key="keyname1",
            value="value1",
        ),
        aws_native.stepfunctions.StateMachineTagsEntryArgs(
            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 Pulumi;
using AwsNative = Pulumi.AwsNative;

class MyStack : Stack
{
    public MyStack()
    {
        var myStateMachine = new AwsNative.StepFunctions.StateMachine("myStateMachine", new AwsNative.StepFunctions.StateMachineArgs
        {
            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 AwsNative.StepFunctions.Inputs.StateMachineTagsEntryArgs
                {
                    Key = "keyname1",
                    Value = "value1",
                },
                new AwsNative.StepFunctions.Inputs.StateMachineTagsEntryArgs
                {
                    Key = "keyname2",
                    Value = "value2",
                },
            },
        });
    }

}
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"),
			DefinitionString: pulumi.String("{\n  \"StartAt\": \"HelloWorld\",\n  \"States\": {\n    \"HelloWorld\": {\n      \"Type\": \"Task\",\n      \"Resource\": \"arn:aws:lambda:us-east-1:111122223333:function:HelloFunction\",\n      \"End\": true\n    }\n  }\n}"),
			RoleArn:          pulumi.String("arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1"),
			Tags: []stepfunctions.StateMachineTagsEntryArgs{
				&stepfunctions.StateMachineTagsEntryArgs{
					Key:   pulumi.String("keyname1"),
					Value: pulumi.String("value1"),
				},
				&stepfunctions.StateMachineTagsEntryArgs{
					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.stepfunctions.StateMachineTagsEntryArgs(
            key="keyname1",
            value="value1",
        ),
        aws_native.stepfunctions.StateMachineTagsEntryArgs(
            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 Pulumi;
using AwsNative = Pulumi.AwsNative;

class MyStack : Stack
{
    public MyStack()
    {
        var myStateMachine = new AwsNative.StepFunctions.StateMachine("myStateMachine", new AwsNative.StepFunctions.StateMachineArgs
        {
            StateMachineName = "HelloWorld-StateMachine",
            DefinitionS3Location = new AwsNative.StepFunctions.Inputs.StateMachineS3LocationArgs
            {
                Bucket = "example_bucket",
                Key = "hello_world.json",
            },
            DefinitionSubstitutions = new AwsNative.StepFunctions.Inputs.StateMachineDefinitionSubstitutionsArgs
            {
                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: &stepfunctions.StateMachineDefinitionSubstitutionsArgs{
				HelloFunction: "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=aws_native.stepfunctions.StateMachineDefinitionSubstitutionsArgs(
        hello_function="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 a StateMachine Resource

new StateMachine(name: string, args: StateMachineArgs, opts?: CustomResourceOptions);
@overload
def StateMachine(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 definition: Optional[StateMachineDefinitionArgs] = None,
                 definition_s3_location: Optional[StateMachineS3LocationArgs] = None,
                 definition_string: Optional[str] = None,
                 definition_substitutions: Optional[StateMachineDefinitionSubstitutionsArgs] = None,
                 logging_configuration: Optional[StateMachineLoggingConfigurationArgs] = None,
                 role_arn: Optional[str] = None,
                 state_machine_name: Optional[str] = None,
                 state_machine_type: Optional[StateMachineType] = None,
                 tags: Optional[Sequence[StateMachineTagsEntryArgs]] = None,
                 tracing_configuration: Optional[StateMachineTracingConfigurationArgs] = None)
@overload
def StateMachine(resource_name: str,
                 args: StateMachineArgs,
                 opts: Optional[ResourceOptions] = 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.

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.

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:

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
Arn string
Id string

The provider-assigned unique ID for this managed resource.

Name string
arn String
id String

The provider-assigned unique ID for this managed resource.

name String
arn string
id string

The provider-assigned unique ID for this managed resource.

name string
arn str
id str

The provider-assigned unique ID for this managed resource.

name str
arn String
id String

The provider-assigned unique ID for this managed resource.

name String

Supporting Types

StateMachineCloudWatchLogsLogGroup

StateMachineLogDestination

StateMachineLoggingConfiguration

StateMachineLoggingConfigurationLevel

All
ALL
Error
ERROR
Fatal
FATAL
Off
OFF
StateMachineLoggingConfigurationLevelAll
ALL
StateMachineLoggingConfigurationLevelError
ERROR
StateMachineLoggingConfigurationLevelFatal
FATAL
StateMachineLoggingConfigurationLevelOff
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

Bucket string
Key string
Version string
Bucket string
Key string
Version string
bucket String
key String
version String
bucket string
key string
version string
bucket str
key str
version str
bucket String
key String
version String

StateMachineTagsEntry

Key string
Value string
Key string
Value string
key String
value String
key string
value string
key str
value str
key String
value String

StateMachineTracingConfiguration

Enabled bool
Enabled bool
enabled Boolean
enabled boolean
enabled bool
enabled Boolean

StateMachineType

Standard
STANDARD
Express
EXPRESS
StateMachineTypeStandard
STANDARD
StateMachineTypeExpress
EXPRESS
Standard
STANDARD
Express
EXPRESS
Standard
STANDARD
Express
EXPRESS
STANDARD
STANDARD
EXPRESS
EXPRESS
"STANDARD"
STANDARD
"EXPRESS"
EXPRESS

Package Details

Repository
https://github.com/pulumi/pulumi-aws-native
License
Apache-2.0