1. Packages
  2. AWS
  3. API Docs
  4. sfn
  5. StateMachine
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.sfn.StateMachine

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides a Step Function State Machine resource

    Example Usage

    Basic (Standard Workflow)

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    // ...
    const sfnStateMachine = new aws.sfn.StateMachine("sfn_state_machine", {
        name: "my-state-machine",
        roleArn: iamForSfn.arn,
        definition: `{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "${lambda.arn}",
          "End": true
        }
      }
    }
    `,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    # ...
    sfn_state_machine = aws.sfn.StateMachine("sfn_state_machine",
        name="my-state-machine",
        role_arn=iam_for_sfn["arn"],
        definition=f"""{{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {{
        "HelloWorld": {{
          "Type": "Task",
          "Resource": "{lambda_["arn"]}",
          "End": true
        }}
      }}
    }}
    """)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sfn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// ...
    		_, err := sfn.NewStateMachine(ctx, "sfn_state_machine", &sfn.StateMachineArgs{
    			Name:    pulumi.String("my-state-machine"),
    			RoleArn: pulumi.Any(iamForSfn.Arn),
    			Definition: pulumi.Sprintf(`{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "%v",
          "End": true
        }
      }
    }
    `, lambda.Arn),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        // ...
        var sfnStateMachine = new Aws.Sfn.StateMachine("sfn_state_machine", new()
        {
            Name = "my-state-machine",
            RoleArn = iamForSfn.Arn,
            Definition = @$"{{
      ""Comment"": ""A Hello World example of the Amazon States Language using an AWS Lambda Function"",
      ""StartAt"": ""HelloWorld"",
      ""States"": {{
        ""HelloWorld"": {{
          ""Type"": ""Task"",
          ""Resource"": ""{lambda.Arn}"",
          ""End"": true
        }}
      }}
    }}
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sfn.StateMachine;
    import com.pulumi.aws.sfn.StateMachineArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // ...
            var sfnStateMachine = new StateMachine("sfnStateMachine", StateMachineArgs.builder()
                .name("my-state-machine")
                .roleArn(iamForSfn.arn())
                .definition("""
    {
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "%s",
          "End": true
        }
      }
    }
    ", lambda.arn()))
                .build());
    
        }
    }
    
    resources:
      # ...
      sfnStateMachine:
        type: aws:sfn:StateMachine
        name: sfn_state_machine
        properties:
          name: my-state-machine
          roleArn: ${iamForSfn.arn}
          definition: |
            {
              "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
              "StartAt": "HelloWorld",
              "States": {
                "HelloWorld": {
                  "Type": "Task",
                  "Resource": "${lambda.arn}",
                  "End": true
                }
              }
            }        
    

    Basic (Express Workflow)

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    // ...
    const sfnStateMachine = new aws.sfn.StateMachine("sfn_state_machine", {
        name: "my-state-machine",
        roleArn: iamForSfn.arn,
        type: "EXPRESS",
        definition: `{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "${lambda.arn}",
          "End": true
        }
      }
    }
    `,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    # ...
    sfn_state_machine = aws.sfn.StateMachine("sfn_state_machine",
        name="my-state-machine",
        role_arn=iam_for_sfn["arn"],
        type="EXPRESS",
        definition=f"""{{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {{
        "HelloWorld": {{
          "Type": "Task",
          "Resource": "{lambda_["arn"]}",
          "End": true
        }}
      }}
    }}
    """)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sfn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// ...
    		_, err := sfn.NewStateMachine(ctx, "sfn_state_machine", &sfn.StateMachineArgs{
    			Name:    pulumi.String("my-state-machine"),
    			RoleArn: pulumi.Any(iamForSfn.Arn),
    			Type:    pulumi.String("EXPRESS"),
    			Definition: pulumi.Sprintf(`{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "%v",
          "End": true
        }
      }
    }
    `, lambda.Arn),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        // ...
        var sfnStateMachine = new Aws.Sfn.StateMachine("sfn_state_machine", new()
        {
            Name = "my-state-machine",
            RoleArn = iamForSfn.Arn,
            Type = "EXPRESS",
            Definition = @$"{{
      ""Comment"": ""A Hello World example of the Amazon States Language using an AWS Lambda Function"",
      ""StartAt"": ""HelloWorld"",
      ""States"": {{
        ""HelloWorld"": {{
          ""Type"": ""Task"",
          ""Resource"": ""{lambda.Arn}"",
          ""End"": true
        }}
      }}
    }}
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sfn.StateMachine;
    import com.pulumi.aws.sfn.StateMachineArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // ...
            var sfnStateMachine = new StateMachine("sfnStateMachine", StateMachineArgs.builder()
                .name("my-state-machine")
                .roleArn(iamForSfn.arn())
                .type("EXPRESS")
                .definition("""
    {
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "%s",
          "End": true
        }
      }
    }
    ", lambda.arn()))
                .build());
    
        }
    }
    
    resources:
      # ...
      sfnStateMachine:
        type: aws:sfn:StateMachine
        name: sfn_state_machine
        properties:
          name: my-state-machine
          roleArn: ${iamForSfn.arn}
          type: EXPRESS
          definition: |
            {
              "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
              "StartAt": "HelloWorld",
              "States": {
                "HelloWorld": {
                  "Type": "Task",
                  "Resource": "${lambda.arn}",
                  "End": true
                }
              }
            }        
    

    Publish (Publish SFN version)

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    // ...
    const sfnStateMachine = new aws.sfn.StateMachine("sfn_state_machine", {
        name: "my-state-machine",
        roleArn: iamForSfn.arn,
        publish: true,
        type: "EXPRESS",
        definition: `{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "${lambda.arn}",
          "End": true
        }
      }
    }
    `,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    # ...
    sfn_state_machine = aws.sfn.StateMachine("sfn_state_machine",
        name="my-state-machine",
        role_arn=iam_for_sfn["arn"],
        publish=True,
        type="EXPRESS",
        definition=f"""{{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {{
        "HelloWorld": {{
          "Type": "Task",
          "Resource": "{lambda_["arn"]}",
          "End": true
        }}
      }}
    }}
    """)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sfn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// ...
    		_, err := sfn.NewStateMachine(ctx, "sfn_state_machine", &sfn.StateMachineArgs{
    			Name:    pulumi.String("my-state-machine"),
    			RoleArn: pulumi.Any(iamForSfn.Arn),
    			Publish: pulumi.Bool(true),
    			Type:    pulumi.String("EXPRESS"),
    			Definition: pulumi.Sprintf(`{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "%v",
          "End": true
        }
      }
    }
    `, lambda.Arn),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        // ...
        var sfnStateMachine = new Aws.Sfn.StateMachine("sfn_state_machine", new()
        {
            Name = "my-state-machine",
            RoleArn = iamForSfn.Arn,
            Publish = true,
            Type = "EXPRESS",
            Definition = @$"{{
      ""Comment"": ""A Hello World example of the Amazon States Language using an AWS Lambda Function"",
      ""StartAt"": ""HelloWorld"",
      ""States"": {{
        ""HelloWorld"": {{
          ""Type"": ""Task"",
          ""Resource"": ""{lambda.Arn}"",
          ""End"": true
        }}
      }}
    }}
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sfn.StateMachine;
    import com.pulumi.aws.sfn.StateMachineArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // ...
            var sfnStateMachine = new StateMachine("sfnStateMachine", StateMachineArgs.builder()
                .name("my-state-machine")
                .roleArn(iamForSfn.arn())
                .publish(true)
                .type("EXPRESS")
                .definition("""
    {
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "%s",
          "End": true
        }
      }
    }
    ", lambda.arn()))
                .build());
    
        }
    }
    
    resources:
      # ...
      sfnStateMachine:
        type: aws:sfn:StateMachine
        name: sfn_state_machine
        properties:
          name: my-state-machine
          roleArn: ${iamForSfn.arn}
          publish: true
          type: EXPRESS
          definition: |
            {
              "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
              "StartAt": "HelloWorld",
              "States": {
                "HelloWorld": {
                  "Type": "Task",
                  "Resource": "${lambda.arn}",
                  "End": true
                }
              }
            }        
    

    Logging

    NOTE: See the AWS Step Functions Developer Guide for more information about enabling Step Function logging.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    // ...
    const sfnStateMachine = new aws.sfn.StateMachine("sfn_state_machine", {
        name: "my-state-machine",
        roleArn: iamForSfn.arn,
        definition: `{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "${lambda.arn}",
          "End": true
        }
      }
    }
    `,
        loggingConfiguration: {
            logDestination: `${logGroupForSfn.arn}:*`,
            includeExecutionData: true,
            level: "ERROR",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    # ...
    sfn_state_machine = aws.sfn.StateMachine("sfn_state_machine",
        name="my-state-machine",
        role_arn=iam_for_sfn["arn"],
        definition=f"""{{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {{
        "HelloWorld": {{
          "Type": "Task",
          "Resource": "{lambda_["arn"]}",
          "End": true
        }}
      }}
    }}
    """,
        logging_configuration={
            "log_destination": f"{log_group_for_sfn['arn']}:*",
            "include_execution_data": True,
            "level": "ERROR",
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sfn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// ...
    		_, err := sfn.NewStateMachine(ctx, "sfn_state_machine", &sfn.StateMachineArgs{
    			Name:    pulumi.String("my-state-machine"),
    			RoleArn: pulumi.Any(iamForSfn.Arn),
    			Definition: pulumi.Sprintf(`{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "%v",
          "End": true
        }
      }
    }
    `, lambda.Arn),
    			LoggingConfiguration: &sfn.StateMachineLoggingConfigurationArgs{
    				LogDestination:       pulumi.Sprintf("%v:*", logGroupForSfn.Arn),
    				IncludeExecutionData: pulumi.Bool(true),
    				Level:                pulumi.String("ERROR"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        // ...
        var sfnStateMachine = new Aws.Sfn.StateMachine("sfn_state_machine", new()
        {
            Name = "my-state-machine",
            RoleArn = iamForSfn.Arn,
            Definition = @$"{{
      ""Comment"": ""A Hello World example of the Amazon States Language using an AWS Lambda Function"",
      ""StartAt"": ""HelloWorld"",
      ""States"": {{
        ""HelloWorld"": {{
          ""Type"": ""Task"",
          ""Resource"": ""{lambda.Arn}"",
          ""End"": true
        }}
      }}
    }}
    ",
            LoggingConfiguration = new Aws.Sfn.Inputs.StateMachineLoggingConfigurationArgs
            {
                LogDestination = $"{logGroupForSfn.Arn}:*",
                IncludeExecutionData = true,
                Level = "ERROR",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sfn.StateMachine;
    import com.pulumi.aws.sfn.StateMachineArgs;
    import com.pulumi.aws.sfn.inputs.StateMachineLoggingConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // ...
            var sfnStateMachine = new StateMachine("sfnStateMachine", StateMachineArgs.builder()
                .name("my-state-machine")
                .roleArn(iamForSfn.arn())
                .definition("""
    {
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "%s",
          "End": true
        }
      }
    }
    ", lambda.arn()))
                .loggingConfiguration(StateMachineLoggingConfigurationArgs.builder()
                    .logDestination(String.format("%s:*", logGroupForSfn.arn()))
                    .includeExecutionData(true)
                    .level("ERROR")
                    .build())
                .build());
    
        }
    }
    
    resources:
      # ...
      sfnStateMachine:
        type: aws:sfn:StateMachine
        name: sfn_state_machine
        properties:
          name: my-state-machine
          roleArn: ${iamForSfn.arn}
          definition: |
            {
              "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
              "StartAt": "HelloWorld",
              "States": {
                "HelloWorld": {
                  "Type": "Task",
                  "Resource": "${lambda.arn}",
                  "End": true
                }
              }
            }        
          loggingConfiguration:
            logDestination: ${logGroupForSfn.arn}:*
            includeExecutionData: true
            level: ERROR
    

    Encryption

    NOTE: See the section Data at rest encyption in the AWS Step Functions Developer Guide for more information about enabling encryption of data using a customer-managed key for Step Functions State Machines data.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    // ...
    const sfnStateMachine = new aws.sfn.StateMachine("sfn_state_machine", {
        name: "my-state-machine",
        roleArn: iamForSfn.arn,
        definition: `{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "${lambda.arn}",
          "End": true
        }
      }
    }
    `,
        encryptionConfiguration: {
            kmsKeyId: kmsKeyForSfn.arn,
            type: "CUSTOMER_MANAGED_KMS_KEY",
            kmsDataKeyReusePeriodSeconds: 900,
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    # ...
    sfn_state_machine = aws.sfn.StateMachine("sfn_state_machine",
        name="my-state-machine",
        role_arn=iam_for_sfn["arn"],
        definition=f"""{{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {{
        "HelloWorld": {{
          "Type": "Task",
          "Resource": "{lambda_["arn"]}",
          "End": true
        }}
      }}
    }}
    """,
        encryption_configuration={
            "kms_key_id": kms_key_for_sfn["arn"],
            "type": "CUSTOMER_MANAGED_KMS_KEY",
            "kms_data_key_reuse_period_seconds": 900,
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sfn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// ...
    		_, err := sfn.NewStateMachine(ctx, "sfn_state_machine", &sfn.StateMachineArgs{
    			Name:    pulumi.String("my-state-machine"),
    			RoleArn: pulumi.Any(iamForSfn.Arn),
    			Definition: pulumi.Sprintf(`{
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "%v",
          "End": true
        }
      }
    }
    `, lambda.Arn),
    			EncryptionConfiguration: &sfn.StateMachineEncryptionConfigurationArgs{
    				KmsKeyId:                     pulumi.Any(kmsKeyForSfn.Arn),
    				Type:                         pulumi.String("CUSTOMER_MANAGED_KMS_KEY"),
    				KmsDataKeyReusePeriodSeconds: pulumi.Int(900),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        // ...
        var sfnStateMachine = new Aws.Sfn.StateMachine("sfn_state_machine", new()
        {
            Name = "my-state-machine",
            RoleArn = iamForSfn.Arn,
            Definition = @$"{{
      ""Comment"": ""A Hello World example of the Amazon States Language using an AWS Lambda Function"",
      ""StartAt"": ""HelloWorld"",
      ""States"": {{
        ""HelloWorld"": {{
          ""Type"": ""Task"",
          ""Resource"": ""{lambda.Arn}"",
          ""End"": true
        }}
      }}
    }}
    ",
            EncryptionConfiguration = new Aws.Sfn.Inputs.StateMachineEncryptionConfigurationArgs
            {
                KmsKeyId = kmsKeyForSfn.Arn,
                Type = "CUSTOMER_MANAGED_KMS_KEY",
                KmsDataKeyReusePeriodSeconds = 900,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sfn.StateMachine;
    import com.pulumi.aws.sfn.StateMachineArgs;
    import com.pulumi.aws.sfn.inputs.StateMachineEncryptionConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // ...
            var sfnStateMachine = new StateMachine("sfnStateMachine", StateMachineArgs.builder()
                .name("my-state-machine")
                .roleArn(iamForSfn.arn())
                .definition("""
    {
      "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
      "StartAt": "HelloWorld",
      "States": {
        "HelloWorld": {
          "Type": "Task",
          "Resource": "%s",
          "End": true
        }
      }
    }
    ", lambda.arn()))
                .encryptionConfiguration(StateMachineEncryptionConfigurationArgs.builder()
                    .kmsKeyId(kmsKeyForSfn.arn())
                    .type("CUSTOMER_MANAGED_KMS_KEY")
                    .kmsDataKeyReusePeriodSeconds(900)
                    .build())
                .build());
    
        }
    }
    
    resources:
      # ...
      sfnStateMachine:
        type: aws:sfn:StateMachine
        name: sfn_state_machine
        properties:
          name: my-state-machine
          roleArn: ${iamForSfn.arn}
          definition: |
            {
              "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
              "StartAt": "HelloWorld",
              "States": {
                "HelloWorld": {
                  "Type": "Task",
                  "Resource": "${lambda.arn}",
                  "End": true
                }
              }
            }        
          encryptionConfiguration:
            kmsKeyId: ${kmsKeyForSfn.arn}
            type: CUSTOMER_MANAGED_KMS_KEY
            kmsDataKeyReusePeriodSeconds: 900
    

    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,
                     definition: Optional[str] = None,
                     role_arn: Optional[str] = None,
                     encryption_configuration: Optional[StateMachineEncryptionConfigurationArgs] = None,
                     logging_configuration: Optional[StateMachineLoggingConfigurationArgs] = None,
                     name: Optional[str] = None,
                     name_prefix: Optional[str] = None,
                     publish: Optional[bool] = None,
                     tags: Optional[Mapping[str, str]] = None,
                     tracing_configuration: Optional[StateMachineTracingConfigurationArgs] = None,
                     type: Optional[str] = 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:sfn: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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var stateMachineResource = new Aws.Sfn.StateMachine("stateMachineResource", new()
    {
        Definition = "string",
        RoleArn = "string",
        EncryptionConfiguration = new Aws.Sfn.Inputs.StateMachineEncryptionConfigurationArgs
        {
            KmsDataKeyReusePeriodSeconds = 0,
            KmsKeyId = "string",
            Type = "string",
        },
        LoggingConfiguration = new Aws.Sfn.Inputs.StateMachineLoggingConfigurationArgs
        {
            IncludeExecutionData = false,
            Level = "string",
            LogDestination = "string",
        },
        Name = "string",
        NamePrefix = "string",
        Publish = false,
        Tags = 
        {
            { "string", "string" },
        },
        TracingConfiguration = new Aws.Sfn.Inputs.StateMachineTracingConfigurationArgs
        {
            Enabled = false,
        },
        Type = "string",
    });
    
    example, err := sfn.NewStateMachine(ctx, "stateMachineResource", &sfn.StateMachineArgs{
    	Definition: pulumi.String("string"),
    	RoleArn:    pulumi.String("string"),
    	EncryptionConfiguration: &sfn.StateMachineEncryptionConfigurationArgs{
    		KmsDataKeyReusePeriodSeconds: pulumi.Int(0),
    		KmsKeyId:                     pulumi.String("string"),
    		Type:                         pulumi.String("string"),
    	},
    	LoggingConfiguration: &sfn.StateMachineLoggingConfigurationArgs{
    		IncludeExecutionData: pulumi.Bool(false),
    		Level:                pulumi.String("string"),
    		LogDestination:       pulumi.String("string"),
    	},
    	Name:       pulumi.String("string"),
    	NamePrefix: pulumi.String("string"),
    	Publish:    pulumi.Bool(false),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TracingConfiguration: &sfn.StateMachineTracingConfigurationArgs{
    		Enabled: pulumi.Bool(false),
    	},
    	Type: pulumi.String("string"),
    })
    
    var stateMachineResource = new StateMachine("stateMachineResource", StateMachineArgs.builder()
        .definition("string")
        .roleArn("string")
        .encryptionConfiguration(StateMachineEncryptionConfigurationArgs.builder()
            .kmsDataKeyReusePeriodSeconds(0)
            .kmsKeyId("string")
            .type("string")
            .build())
        .loggingConfiguration(StateMachineLoggingConfigurationArgs.builder()
            .includeExecutionData(false)
            .level("string")
            .logDestination("string")
            .build())
        .name("string")
        .namePrefix("string")
        .publish(false)
        .tags(Map.of("string", "string"))
        .tracingConfiguration(StateMachineTracingConfigurationArgs.builder()
            .enabled(false)
            .build())
        .type("string")
        .build());
    
    state_machine_resource = aws.sfn.StateMachine("stateMachineResource",
        definition="string",
        role_arn="string",
        encryption_configuration={
            "kms_data_key_reuse_period_seconds": 0,
            "kms_key_id": "string",
            "type": "string",
        },
        logging_configuration={
            "include_execution_data": False,
            "level": "string",
            "log_destination": "string",
        },
        name="string",
        name_prefix="string",
        publish=False,
        tags={
            "string": "string",
        },
        tracing_configuration={
            "enabled": False,
        },
        type="string")
    
    const stateMachineResource = new aws.sfn.StateMachine("stateMachineResource", {
        definition: "string",
        roleArn: "string",
        encryptionConfiguration: {
            kmsDataKeyReusePeriodSeconds: 0,
            kmsKeyId: "string",
            type: "string",
        },
        loggingConfiguration: {
            includeExecutionData: false,
            level: "string",
            logDestination: "string",
        },
        name: "string",
        namePrefix: "string",
        publish: false,
        tags: {
            string: "string",
        },
        tracingConfiguration: {
            enabled: false,
        },
        type: "string",
    });
    
    type: aws:sfn:StateMachine
    properties:
        definition: string
        encryptionConfiguration:
            kmsDataKeyReusePeriodSeconds: 0
            kmsKeyId: string
            type: string
        loggingConfiguration:
            includeExecutionData: false
            level: string
            logDestination: string
        name: string
        namePrefix: string
        publish: false
        roleArn: string
        tags:
            string: string
        tracingConfiguration:
            enabled: false
        type: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The StateMachine resource accepts the following input properties:

    Definition string
    The Amazon States Language definition of the state machine.
    RoleArn string
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    EncryptionConfiguration StateMachineEncryptionConfiguration
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    LoggingConfiguration StateMachineLoggingConfiguration
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    Name string
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    NamePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    Publish bool
    Set to true to publish a version of the state machine during creation. Default: false.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TracingConfiguration StateMachineTracingConfiguration
    Selects whether AWS X-Ray tracing is enabled.
    Type string
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.
    Definition string
    The Amazon States Language definition of the state machine.
    RoleArn string
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    EncryptionConfiguration StateMachineEncryptionConfigurationArgs
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    LoggingConfiguration StateMachineLoggingConfigurationArgs
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    Name string
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    NamePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    Publish bool
    Set to true to publish a version of the state machine during creation. Default: false.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TracingConfiguration StateMachineTracingConfigurationArgs
    Selects whether AWS X-Ray tracing is enabled.
    Type string
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.
    definition String
    The Amazon States Language definition of the state machine.
    roleArn String
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    encryptionConfiguration StateMachineEncryptionConfiguration
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    loggingConfiguration StateMachineLoggingConfiguration
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    name String
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    namePrefix String
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    publish Boolean
    Set to true to publish a version of the state machine during creation. Default: false.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tracingConfiguration StateMachineTracingConfiguration
    Selects whether AWS X-Ray tracing is enabled.
    type String
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.
    definition string
    The Amazon States Language definition of the state machine.
    roleArn string
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    encryptionConfiguration StateMachineEncryptionConfiguration
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    loggingConfiguration StateMachineLoggingConfiguration
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    name string
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    namePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    publish boolean
    Set to true to publish a version of the state machine during creation. Default: false.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tracingConfiguration StateMachineTracingConfiguration
    Selects whether AWS X-Ray tracing is enabled.
    type string
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.
    definition str
    The Amazon States Language definition of the state machine.
    role_arn str
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    encryption_configuration StateMachineEncryptionConfigurationArgs
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    logging_configuration StateMachineLoggingConfigurationArgs
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    name str
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    name_prefix str
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    publish bool
    Set to true to publish a version of the state machine during creation. Default: false.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tracing_configuration StateMachineTracingConfigurationArgs
    Selects whether AWS X-Ray tracing is enabled.
    type str
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.
    definition String
    The Amazon States Language definition of the state machine.
    roleArn String
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    encryptionConfiguration Property Map
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    loggingConfiguration Property Map
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    name String
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    namePrefix String
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    publish Boolean
    Set to true to publish a version of the state machine during creation. Default: false.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tracingConfiguration Property Map
    Selects whether AWS X-Ray tracing is enabled.
    type String
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the StateMachine resource produces the following output properties:

    Arn string
    The ARN of the state machine.
    CreationDate string
    The date the state machine was created.
    Description string
    Id string
    The provider-assigned unique ID for this managed resource.
    RevisionId string
    StateMachineVersionArn string
    The ARN of the state machine version.
    Status string
    The current status of the state machine. Either ACTIVE or DELETING.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    VersionDescription string
    Arn string
    The ARN of the state machine.
    CreationDate string
    The date the state machine was created.
    Description string
    Id string
    The provider-assigned unique ID for this managed resource.
    RevisionId string
    StateMachineVersionArn string
    The ARN of the state machine version.
    Status string
    The current status of the state machine. Either ACTIVE or DELETING.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    VersionDescription string
    arn String
    The ARN of the state machine.
    creationDate String
    The date the state machine was created.
    description String
    id String
    The provider-assigned unique ID for this managed resource.
    revisionId String
    stateMachineVersionArn String
    The ARN of the state machine version.
    status String
    The current status of the state machine. Either ACTIVE or DELETING.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    versionDescription String
    arn string
    The ARN of the state machine.
    creationDate string
    The date the state machine was created.
    description string
    id string
    The provider-assigned unique ID for this managed resource.
    revisionId string
    stateMachineVersionArn string
    The ARN of the state machine version.
    status string
    The current status of the state machine. Either ACTIVE or DELETING.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    versionDescription string
    arn str
    The ARN of the state machine.
    creation_date str
    The date the state machine was created.
    description str
    id str
    The provider-assigned unique ID for this managed resource.
    revision_id str
    state_machine_version_arn str
    The ARN of the state machine version.
    status str
    The current status of the state machine. Either ACTIVE or DELETING.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    version_description str
    arn String
    The ARN of the state machine.
    creationDate String
    The date the state machine was created.
    description String
    id String
    The provider-assigned unique ID for this managed resource.
    revisionId String
    stateMachineVersionArn String
    The ARN of the state machine version.
    status String
    The current status of the state machine. Either ACTIVE or DELETING.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    versionDescription String

    Look up Existing StateMachine Resource

    Get an existing StateMachine resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: StateMachineState, opts?: CustomResourceOptions): StateMachine
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            creation_date: Optional[str] = None,
            definition: Optional[str] = None,
            description: Optional[str] = None,
            encryption_configuration: Optional[StateMachineEncryptionConfigurationArgs] = None,
            logging_configuration: Optional[StateMachineLoggingConfigurationArgs] = None,
            name: Optional[str] = None,
            name_prefix: Optional[str] = None,
            publish: Optional[bool] = None,
            revision_id: Optional[str] = None,
            role_arn: Optional[str] = None,
            state_machine_version_arn: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            tracing_configuration: Optional[StateMachineTracingConfigurationArgs] = None,
            type: Optional[str] = None,
            version_description: Optional[str] = None) -> StateMachine
    func GetStateMachine(ctx *Context, name string, id IDInput, state *StateMachineState, opts ...ResourceOption) (*StateMachine, error)
    public static StateMachine Get(string name, Input<string> id, StateMachineState? state, CustomResourceOptions? opts = null)
    public static StateMachine get(String name, Output<String> id, StateMachineState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    The ARN of the state machine.
    CreationDate string
    The date the state machine was created.
    Definition string
    The Amazon States Language definition of the state machine.
    Description string
    EncryptionConfiguration StateMachineEncryptionConfiguration
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    LoggingConfiguration StateMachineLoggingConfiguration
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    Name string
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    NamePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    Publish bool
    Set to true to publish a version of the state machine during creation. Default: false.
    RevisionId string
    RoleArn string
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    StateMachineVersionArn string
    The ARN of the state machine version.
    Status string
    The current status of the state machine. Either ACTIVE or DELETING.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TracingConfiguration StateMachineTracingConfiguration
    Selects whether AWS X-Ray tracing is enabled.
    Type string
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.
    VersionDescription string
    Arn string
    The ARN of the state machine.
    CreationDate string
    The date the state machine was created.
    Definition string
    The Amazon States Language definition of the state machine.
    Description string
    EncryptionConfiguration StateMachineEncryptionConfigurationArgs
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    LoggingConfiguration StateMachineLoggingConfigurationArgs
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    Name string
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    NamePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    Publish bool
    Set to true to publish a version of the state machine during creation. Default: false.
    RevisionId string
    RoleArn string
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    StateMachineVersionArn string
    The ARN of the state machine version.
    Status string
    The current status of the state machine. Either ACTIVE or DELETING.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TracingConfiguration StateMachineTracingConfigurationArgs
    Selects whether AWS X-Ray tracing is enabled.
    Type string
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.
    VersionDescription string
    arn String
    The ARN of the state machine.
    creationDate String
    The date the state machine was created.
    definition String
    The Amazon States Language definition of the state machine.
    description String
    encryptionConfiguration StateMachineEncryptionConfiguration
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    loggingConfiguration StateMachineLoggingConfiguration
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    name String
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    namePrefix String
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    publish Boolean
    Set to true to publish a version of the state machine during creation. Default: false.
    revisionId String
    roleArn String
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    stateMachineVersionArn String
    The ARN of the state machine version.
    status String
    The current status of the state machine. Either ACTIVE or DELETING.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    tracingConfiguration StateMachineTracingConfiguration
    Selects whether AWS X-Ray tracing is enabled.
    type String
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.
    versionDescription String
    arn string
    The ARN of the state machine.
    creationDate string
    The date the state machine was created.
    definition string
    The Amazon States Language definition of the state machine.
    description string
    encryptionConfiguration StateMachineEncryptionConfiguration
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    loggingConfiguration StateMachineLoggingConfiguration
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    name string
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    namePrefix string
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    publish boolean
    Set to true to publish a version of the state machine during creation. Default: false.
    revisionId string
    roleArn string
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    stateMachineVersionArn string
    The ARN of the state machine version.
    status string
    The current status of the state machine. Either ACTIVE or DELETING.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    tracingConfiguration StateMachineTracingConfiguration
    Selects whether AWS X-Ray tracing is enabled.
    type string
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.
    versionDescription string
    arn str
    The ARN of the state machine.
    creation_date str
    The date the state machine was created.
    definition str
    The Amazon States Language definition of the state machine.
    description str
    encryption_configuration StateMachineEncryptionConfigurationArgs
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    logging_configuration StateMachineLoggingConfigurationArgs
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    name str
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    name_prefix str
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    publish bool
    Set to true to publish a version of the state machine during creation. Default: false.
    revision_id str
    role_arn str
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    state_machine_version_arn str
    The ARN of the state machine version.
    status str
    The current status of the state machine. Either ACTIVE or DELETING.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    tracing_configuration StateMachineTracingConfigurationArgs
    Selects whether AWS X-Ray tracing is enabled.
    type str
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.
    version_description str
    arn String
    The ARN of the state machine.
    creationDate String
    The date the state machine was created.
    definition String
    The Amazon States Language definition of the state machine.
    description String
    encryptionConfiguration Property Map
    Defines what encryption configuration is used to encrypt data in the State Machine. For more information see [TBD] in the AWS Step Functions User Guide.
    loggingConfiguration Property Map
    Defines what execution history events are logged and where they are logged. The logging_configuration parameter is valid when type is set to STANDARD or EXPRESS. Defaults to OFF. For more information see Logging Express Workflows, Log Levels and Logging Configuration in the AWS Step Functions User Guide.
    name String
    The name of the state machine. The name should only contain 0-9, A-Z, a-z, - and _. If omitted, the provider will assign a random, unique name.
    namePrefix String
    Creates a unique name beginning with the specified prefix. Conflicts with name.
    publish Boolean
    Set to true to publish a version of the state machine during creation. Default: false.
    revisionId String
    roleArn String
    The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
    stateMachineVersionArn String
    The ARN of the state machine version.
    status String
    The current status of the state machine. Either ACTIVE or DELETING.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    tracingConfiguration Property Map
    Selects whether AWS X-Ray tracing is enabled.
    type String
    Determines whether a Standard or Express state machine is created. The default is STANDARD. You cannot update the type of a state machine once it has been created. Valid values: STANDARD, EXPRESS.
    versionDescription String

    Supporting Types

    StateMachineEncryptionConfiguration, StateMachineEncryptionConfigurationArgs

    KmsDataKeyReusePeriodSeconds int
    Maximum duration for which Step Functions will reuse data keys. When the period expires, Step Functions will call GenerateDataKey. This setting only applies to customer managed KMS key and does not apply when type is AWS_OWNED_KEY.
    KmsKeyId string
    The alias, alias ARN, key ID, or key ARN of the symmetric encryption KMS key that encrypts the data key. To specify a KMS key in a different AWS account, the customer must use the key ARN or alias ARN. For more information regarding kms_key_id, see KeyId in the KMS documentation.
    Type string
    The encryption option specified for the state machine. Valid values: AWS_OWNED_KEY, CUSTOMER_MANAGED_KMS_KEY
    KmsDataKeyReusePeriodSeconds int
    Maximum duration for which Step Functions will reuse data keys. When the period expires, Step Functions will call GenerateDataKey. This setting only applies to customer managed KMS key and does not apply when type is AWS_OWNED_KEY.
    KmsKeyId string
    The alias, alias ARN, key ID, or key ARN of the symmetric encryption KMS key that encrypts the data key. To specify a KMS key in a different AWS account, the customer must use the key ARN or alias ARN. For more information regarding kms_key_id, see KeyId in the KMS documentation.
    Type string
    The encryption option specified for the state machine. Valid values: AWS_OWNED_KEY, CUSTOMER_MANAGED_KMS_KEY
    kmsDataKeyReusePeriodSeconds Integer
    Maximum duration for which Step Functions will reuse data keys. When the period expires, Step Functions will call GenerateDataKey. This setting only applies to customer managed KMS key and does not apply when type is AWS_OWNED_KEY.
    kmsKeyId String
    The alias, alias ARN, key ID, or key ARN of the symmetric encryption KMS key that encrypts the data key. To specify a KMS key in a different AWS account, the customer must use the key ARN or alias ARN. For more information regarding kms_key_id, see KeyId in the KMS documentation.
    type String
    The encryption option specified for the state machine. Valid values: AWS_OWNED_KEY, CUSTOMER_MANAGED_KMS_KEY
    kmsDataKeyReusePeriodSeconds number
    Maximum duration for which Step Functions will reuse data keys. When the period expires, Step Functions will call GenerateDataKey. This setting only applies to customer managed KMS key and does not apply when type is AWS_OWNED_KEY.
    kmsKeyId string
    The alias, alias ARN, key ID, or key ARN of the symmetric encryption KMS key that encrypts the data key. To specify a KMS key in a different AWS account, the customer must use the key ARN or alias ARN. For more information regarding kms_key_id, see KeyId in the KMS documentation.
    type string
    The encryption option specified for the state machine. Valid values: AWS_OWNED_KEY, CUSTOMER_MANAGED_KMS_KEY
    kms_data_key_reuse_period_seconds int
    Maximum duration for which Step Functions will reuse data keys. When the period expires, Step Functions will call GenerateDataKey. This setting only applies to customer managed KMS key and does not apply when type is AWS_OWNED_KEY.
    kms_key_id str
    The alias, alias ARN, key ID, or key ARN of the symmetric encryption KMS key that encrypts the data key. To specify a KMS key in a different AWS account, the customer must use the key ARN or alias ARN. For more information regarding kms_key_id, see KeyId in the KMS documentation.
    type str
    The encryption option specified for the state machine. Valid values: AWS_OWNED_KEY, CUSTOMER_MANAGED_KMS_KEY
    kmsDataKeyReusePeriodSeconds Number
    Maximum duration for which Step Functions will reuse data keys. When the period expires, Step Functions will call GenerateDataKey. This setting only applies to customer managed KMS key and does not apply when type is AWS_OWNED_KEY.
    kmsKeyId String
    The alias, alias ARN, key ID, or key ARN of the symmetric encryption KMS key that encrypts the data key. To specify a KMS key in a different AWS account, the customer must use the key ARN or alias ARN. For more information regarding kms_key_id, see KeyId in the KMS documentation.
    type String
    The encryption option specified for the state machine. Valid values: AWS_OWNED_KEY, CUSTOMER_MANAGED_KMS_KEY

    StateMachineLoggingConfiguration, StateMachineLoggingConfigurationArgs

    IncludeExecutionData bool
    Determines whether execution data is included in your log. When set to false, data is excluded.
    Level string
    Defines which category of execution history events are logged. Valid values: ALL, ERROR, FATAL, OFF
    LogDestination string
    Amazon Resource Name (ARN) of a CloudWatch log group. Make sure the State Machine has the correct IAM policies for logging. The ARN must end with :*
    IncludeExecutionData bool
    Determines whether execution data is included in your log. When set to false, data is excluded.
    Level string
    Defines which category of execution history events are logged. Valid values: ALL, ERROR, FATAL, OFF
    LogDestination string
    Amazon Resource Name (ARN) of a CloudWatch log group. Make sure the State Machine has the correct IAM policies for logging. The ARN must end with :*
    includeExecutionData Boolean
    Determines whether execution data is included in your log. When set to false, data is excluded.
    level String
    Defines which category of execution history events are logged. Valid values: ALL, ERROR, FATAL, OFF
    logDestination String
    Amazon Resource Name (ARN) of a CloudWatch log group. Make sure the State Machine has the correct IAM policies for logging. The ARN must end with :*
    includeExecutionData boolean
    Determines whether execution data is included in your log. When set to false, data is excluded.
    level string
    Defines which category of execution history events are logged. Valid values: ALL, ERROR, FATAL, OFF
    logDestination string
    Amazon Resource Name (ARN) of a CloudWatch log group. Make sure the State Machine has the correct IAM policies for logging. The ARN must end with :*
    include_execution_data bool
    Determines whether execution data is included in your log. When set to false, data is excluded.
    level str
    Defines which category of execution history events are logged. Valid values: ALL, ERROR, FATAL, OFF
    log_destination str
    Amazon Resource Name (ARN) of a CloudWatch log group. Make sure the State Machine has the correct IAM policies for logging. The ARN must end with :*
    includeExecutionData Boolean
    Determines whether execution data is included in your log. When set to false, data is excluded.
    level String
    Defines which category of execution history events are logged. Valid values: ALL, ERROR, FATAL, OFF
    logDestination String
    Amazon Resource Name (ARN) of a CloudWatch log group. Make sure the State Machine has the correct IAM policies for logging. The ARN must end with :*

    StateMachineTracingConfiguration, StateMachineTracingConfigurationArgs

    Enabled bool
    When set to true, AWS X-Ray tracing is enabled. Make sure the State Machine has the correct IAM policies for logging. See the AWS Step Functions Developer Guide for details.
    Enabled bool
    When set to true, AWS X-Ray tracing is enabled. Make sure the State Machine has the correct IAM policies for logging. See the AWS Step Functions Developer Guide for details.
    enabled Boolean
    When set to true, AWS X-Ray tracing is enabled. Make sure the State Machine has the correct IAM policies for logging. See the AWS Step Functions Developer Guide for details.
    enabled boolean
    When set to true, AWS X-Ray tracing is enabled. Make sure the State Machine has the correct IAM policies for logging. See the AWS Step Functions Developer Guide for details.
    enabled bool
    When set to true, AWS X-Ray tracing is enabled. Make sure the State Machine has the correct IAM policies for logging. See the AWS Step Functions Developer Guide for details.
    enabled Boolean
    When set to true, AWS X-Ray tracing is enabled. Make sure the State Machine has the correct IAM policies for logging. See the AWS Step Functions Developer Guide for details.

    Import

    Using pulumi import, import State Machines using the arn. For example:

    $ pulumi import aws:sfn/stateMachine:StateMachine foo arn:aws:states:eu-west-1:123456789098:stateMachine:bar
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi