github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/sfn/stateMachine.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package sfn
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides a Step Function State Machine resource
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Basic (Standard Workflow)
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"fmt"
    28  //
    29  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sfn"
    30  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    31  //
    32  // )
    33  //
    34  //	func main() {
    35  //		pulumi.Run(func(ctx *pulumi.Context) error {
    36  //			// ...
    37  //			_, err := sfn.NewStateMachine(ctx, "sfn_state_machine", &sfn.StateMachineArgs{
    38  //				Name:    pulumi.String("my-state-machine"),
    39  //				RoleArn: pulumi.Any(iamForSfn.Arn),
    40  //				Definition: pulumi.String(fmt.Sprintf(`{
    41  //	  "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
    42  //	  "StartAt": "HelloWorld",
    43  //	  "States": {
    44  //	    "HelloWorld": {
    45  //	      "Type": "Task",
    46  //	      "Resource": "%v",
    47  //	      "End": true
    48  //	    }
    49  //	  }
    50  //	}
    51  //
    52  // `, lambda.Arn)),
    53  //
    54  //			})
    55  //			if err != nil {
    56  //				return err
    57  //			}
    58  //			return nil
    59  //		})
    60  //	}
    61  //
    62  // ```
    63  // <!--End PulumiCodeChooser -->
    64  //
    65  // ### Basic (Express Workflow)
    66  //
    67  // <!--Start PulumiCodeChooser -->
    68  // ```go
    69  // package main
    70  //
    71  // import (
    72  //
    73  //	"fmt"
    74  //
    75  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sfn"
    76  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    77  //
    78  // )
    79  //
    80  //	func main() {
    81  //		pulumi.Run(func(ctx *pulumi.Context) error {
    82  //			// ...
    83  //			_, err := sfn.NewStateMachine(ctx, "sfn_state_machine", &sfn.StateMachineArgs{
    84  //				Name:    pulumi.String("my-state-machine"),
    85  //				RoleArn: pulumi.Any(iamForSfn.Arn),
    86  //				Type:    pulumi.String("EXPRESS"),
    87  //				Definition: pulumi.String(fmt.Sprintf(`{
    88  //	  "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
    89  //	  "StartAt": "HelloWorld",
    90  //	  "States": {
    91  //	    "HelloWorld": {
    92  //	      "Type": "Task",
    93  //	      "Resource": "%v",
    94  //	      "End": true
    95  //	    }
    96  //	  }
    97  //	}
    98  //
    99  // `, lambda.Arn)),
   100  //
   101  //			})
   102  //			if err != nil {
   103  //				return err
   104  //			}
   105  //			return nil
   106  //		})
   107  //	}
   108  //
   109  // ```
   110  // <!--End PulumiCodeChooser -->
   111  //
   112  // ### Publish (Publish SFN version)
   113  //
   114  // <!--Start PulumiCodeChooser -->
   115  // ```go
   116  // package main
   117  //
   118  // import (
   119  //
   120  //	"fmt"
   121  //
   122  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sfn"
   123  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   124  //
   125  // )
   126  //
   127  //	func main() {
   128  //		pulumi.Run(func(ctx *pulumi.Context) error {
   129  //			// ...
   130  //			_, err := sfn.NewStateMachine(ctx, "sfn_state_machine", &sfn.StateMachineArgs{
   131  //				Name:    pulumi.String("my-state-machine"),
   132  //				RoleArn: pulumi.Any(iamForSfn.Arn),
   133  //				Publish: pulumi.Bool(true),
   134  //				Type:    pulumi.String("EXPRESS"),
   135  //				Definition: pulumi.String(fmt.Sprintf(`{
   136  //	  "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
   137  //	  "StartAt": "HelloWorld",
   138  //	  "States": {
   139  //	    "HelloWorld": {
   140  //	      "Type": "Task",
   141  //	      "Resource": "%v",
   142  //	      "End": true
   143  //	    }
   144  //	  }
   145  //	}
   146  //
   147  // `, lambda.Arn)),
   148  //
   149  //			})
   150  //			if err != nil {
   151  //				return err
   152  //			}
   153  //			return nil
   154  //		})
   155  //	}
   156  //
   157  // ```
   158  // <!--End PulumiCodeChooser -->
   159  //
   160  // ### Logging
   161  //
   162  // > *NOTE:* See the [AWS Step Functions Developer Guide](https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html) for more information about enabling Step Function logging.
   163  //
   164  // <!--Start PulumiCodeChooser -->
   165  // ```go
   166  // package main
   167  //
   168  // import (
   169  //
   170  //	"fmt"
   171  //
   172  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sfn"
   173  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   174  //
   175  // )
   176  //
   177  //	func main() {
   178  //		pulumi.Run(func(ctx *pulumi.Context) error {
   179  //			// ...
   180  //			_, err := sfn.NewStateMachine(ctx, "sfn_state_machine", &sfn.StateMachineArgs{
   181  //				Name:    pulumi.String("my-state-machine"),
   182  //				RoleArn: pulumi.Any(iamForSfn.Arn),
   183  //				Definition: pulumi.String(fmt.Sprintf(`{
   184  //	  "Comment": "A Hello World example of the Amazon States Language using an AWS Lambda Function",
   185  //	  "StartAt": "HelloWorld",
   186  //	  "States": {
   187  //	    "HelloWorld": {
   188  //	      "Type": "Task",
   189  //	      "Resource": "%v",
   190  //	      "End": true
   191  //	    }
   192  //	  }
   193  //	}
   194  //
   195  // `, lambda.Arn)),
   196  //
   197  //				LoggingConfiguration: &sfn.StateMachineLoggingConfigurationArgs{
   198  //					LogDestination:       pulumi.String(fmt.Sprintf("%v:*", logGroupForSfn.Arn)),
   199  //					IncludeExecutionData: pulumi.Bool(true),
   200  //					Level:                pulumi.String("ERROR"),
   201  //				},
   202  //			})
   203  //			if err != nil {
   204  //				return err
   205  //			}
   206  //			return nil
   207  //		})
   208  //	}
   209  //
   210  // ```
   211  // <!--End PulumiCodeChooser -->
   212  //
   213  // ## Import
   214  //
   215  // Using `pulumi import`, import State Machines using the `arn`. For example:
   216  //
   217  // ```sh
   218  // $ pulumi import aws:sfn/stateMachine:StateMachine foo arn:aws:states:eu-west-1:123456789098:stateMachine:bar
   219  // ```
   220  type StateMachine struct {
   221  	pulumi.CustomResourceState
   222  
   223  	// The ARN of the state machine.
   224  	Arn pulumi.StringOutput `pulumi:"arn"`
   225  	// The date the state machine was created.
   226  	CreationDate pulumi.StringOutput `pulumi:"creationDate"`
   227  	// The [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) definition of the state machine.
   228  	Definition  pulumi.StringOutput `pulumi:"definition"`
   229  	Description pulumi.StringOutput `pulumi:"description"`
   230  	// Defines what execution history events are logged and where they are logged. The `loggingConfiguration` parameter is only valid when `type` is set to `EXPRESS`. Defaults to `OFF`. For more information see [Logging Express Workflows](https://docs.aws.amazon.com/step-functions/latest/dg/cw-logs.html) and [Log Levels](https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html) in the AWS Step Functions User Guide.
   231  	LoggingConfiguration StateMachineLoggingConfigurationOutput `pulumi:"loggingConfiguration"`
   232  	// 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.
   233  	Name pulumi.StringOutput `pulumi:"name"`
   234  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
   235  	NamePrefix pulumi.StringOutput `pulumi:"namePrefix"`
   236  	// Set to true to publish a version of the state machine during creation. Default: false.
   237  	Publish    pulumi.BoolPtrOutput `pulumi:"publish"`
   238  	RevisionId pulumi.StringOutput  `pulumi:"revisionId"`
   239  	// The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
   240  	RoleArn pulumi.StringOutput `pulumi:"roleArn"`
   241  	// The ARN of the state machine version.
   242  	StateMachineVersionArn pulumi.StringOutput `pulumi:"stateMachineVersionArn"`
   243  	// The current status of the state machine. Either `ACTIVE` or `DELETING`.
   244  	Status pulumi.StringOutput `pulumi:"status"`
   245  	// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   246  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   247  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   248  	//
   249  	// Deprecated: Please use `tags` instead.
   250  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   251  	// Selects whether AWS X-Ray tracing is enabled.
   252  	TracingConfiguration StateMachineTracingConfigurationOutput `pulumi:"tracingConfiguration"`
   253  	// 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`.
   254  	Type               pulumi.StringPtrOutput `pulumi:"type"`
   255  	VersionDescription pulumi.StringOutput    `pulumi:"versionDescription"`
   256  }
   257  
   258  // NewStateMachine registers a new resource with the given unique name, arguments, and options.
   259  func NewStateMachine(ctx *pulumi.Context,
   260  	name string, args *StateMachineArgs, opts ...pulumi.ResourceOption) (*StateMachine, error) {
   261  	if args == nil {
   262  		return nil, errors.New("missing one or more required arguments")
   263  	}
   264  
   265  	if args.Definition == nil {
   266  		return nil, errors.New("invalid value for required argument 'Definition'")
   267  	}
   268  	if args.RoleArn == nil {
   269  		return nil, errors.New("invalid value for required argument 'RoleArn'")
   270  	}
   271  	opts = internal.PkgResourceDefaultOpts(opts)
   272  	var resource StateMachine
   273  	err := ctx.RegisterResource("aws:sfn/stateMachine:StateMachine", name, args, &resource, opts...)
   274  	if err != nil {
   275  		return nil, err
   276  	}
   277  	return &resource, nil
   278  }
   279  
   280  // GetStateMachine gets an existing StateMachine resource's state with the given name, ID, and optional
   281  // state properties that are used to uniquely qualify the lookup (nil if not required).
   282  func GetStateMachine(ctx *pulumi.Context,
   283  	name string, id pulumi.IDInput, state *StateMachineState, opts ...pulumi.ResourceOption) (*StateMachine, error) {
   284  	var resource StateMachine
   285  	err := ctx.ReadResource("aws:sfn/stateMachine:StateMachine", name, id, state, &resource, opts...)
   286  	if err != nil {
   287  		return nil, err
   288  	}
   289  	return &resource, nil
   290  }
   291  
   292  // Input properties used for looking up and filtering StateMachine resources.
   293  type stateMachineState struct {
   294  	// The ARN of the state machine.
   295  	Arn *string `pulumi:"arn"`
   296  	// The date the state machine was created.
   297  	CreationDate *string `pulumi:"creationDate"`
   298  	// The [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) definition of the state machine.
   299  	Definition  *string `pulumi:"definition"`
   300  	Description *string `pulumi:"description"`
   301  	// Defines what execution history events are logged and where they are logged. The `loggingConfiguration` parameter is only valid when `type` is set to `EXPRESS`. Defaults to `OFF`. For more information see [Logging Express Workflows](https://docs.aws.amazon.com/step-functions/latest/dg/cw-logs.html) and [Log Levels](https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html) in the AWS Step Functions User Guide.
   302  	LoggingConfiguration *StateMachineLoggingConfiguration `pulumi:"loggingConfiguration"`
   303  	// 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.
   304  	Name *string `pulumi:"name"`
   305  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
   306  	NamePrefix *string `pulumi:"namePrefix"`
   307  	// Set to true to publish a version of the state machine during creation. Default: false.
   308  	Publish    *bool   `pulumi:"publish"`
   309  	RevisionId *string `pulumi:"revisionId"`
   310  	// The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
   311  	RoleArn *string `pulumi:"roleArn"`
   312  	// The ARN of the state machine version.
   313  	StateMachineVersionArn *string `pulumi:"stateMachineVersionArn"`
   314  	// The current status of the state machine. Either `ACTIVE` or `DELETING`.
   315  	Status *string `pulumi:"status"`
   316  	// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   317  	Tags map[string]string `pulumi:"tags"`
   318  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   319  	//
   320  	// Deprecated: Please use `tags` instead.
   321  	TagsAll map[string]string `pulumi:"tagsAll"`
   322  	// Selects whether AWS X-Ray tracing is enabled.
   323  	TracingConfiguration *StateMachineTracingConfiguration `pulumi:"tracingConfiguration"`
   324  	// 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`.
   325  	Type               *string `pulumi:"type"`
   326  	VersionDescription *string `pulumi:"versionDescription"`
   327  }
   328  
   329  type StateMachineState struct {
   330  	// The ARN of the state machine.
   331  	Arn pulumi.StringPtrInput
   332  	// The date the state machine was created.
   333  	CreationDate pulumi.StringPtrInput
   334  	// The [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) definition of the state machine.
   335  	Definition  pulumi.StringPtrInput
   336  	Description pulumi.StringPtrInput
   337  	// Defines what execution history events are logged and where they are logged. The `loggingConfiguration` parameter is only valid when `type` is set to `EXPRESS`. Defaults to `OFF`. For more information see [Logging Express Workflows](https://docs.aws.amazon.com/step-functions/latest/dg/cw-logs.html) and [Log Levels](https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html) in the AWS Step Functions User Guide.
   338  	LoggingConfiguration StateMachineLoggingConfigurationPtrInput
   339  	// 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.
   340  	Name pulumi.StringPtrInput
   341  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
   342  	NamePrefix pulumi.StringPtrInput
   343  	// Set to true to publish a version of the state machine during creation. Default: false.
   344  	Publish    pulumi.BoolPtrInput
   345  	RevisionId pulumi.StringPtrInput
   346  	// The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
   347  	RoleArn pulumi.StringPtrInput
   348  	// The ARN of the state machine version.
   349  	StateMachineVersionArn pulumi.StringPtrInput
   350  	// The current status of the state machine. Either `ACTIVE` or `DELETING`.
   351  	Status pulumi.StringPtrInput
   352  	// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   353  	Tags pulumi.StringMapInput
   354  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   355  	//
   356  	// Deprecated: Please use `tags` instead.
   357  	TagsAll pulumi.StringMapInput
   358  	// Selects whether AWS X-Ray tracing is enabled.
   359  	TracingConfiguration StateMachineTracingConfigurationPtrInput
   360  	// 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`.
   361  	Type               pulumi.StringPtrInput
   362  	VersionDescription pulumi.StringPtrInput
   363  }
   364  
   365  func (StateMachineState) ElementType() reflect.Type {
   366  	return reflect.TypeOf((*stateMachineState)(nil)).Elem()
   367  }
   368  
   369  type stateMachineArgs struct {
   370  	// The [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) definition of the state machine.
   371  	Definition string `pulumi:"definition"`
   372  	// Defines what execution history events are logged and where they are logged. The `loggingConfiguration` parameter is only valid when `type` is set to `EXPRESS`. Defaults to `OFF`. For more information see [Logging Express Workflows](https://docs.aws.amazon.com/step-functions/latest/dg/cw-logs.html) and [Log Levels](https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html) in the AWS Step Functions User Guide.
   373  	LoggingConfiguration *StateMachineLoggingConfiguration `pulumi:"loggingConfiguration"`
   374  	// 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.
   375  	Name *string `pulumi:"name"`
   376  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
   377  	NamePrefix *string `pulumi:"namePrefix"`
   378  	// Set to true to publish a version of the state machine during creation. Default: false.
   379  	Publish *bool `pulumi:"publish"`
   380  	// The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
   381  	RoleArn string `pulumi:"roleArn"`
   382  	// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   383  	Tags map[string]string `pulumi:"tags"`
   384  	// Selects whether AWS X-Ray tracing is enabled.
   385  	TracingConfiguration *StateMachineTracingConfiguration `pulumi:"tracingConfiguration"`
   386  	// 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`.
   387  	Type *string `pulumi:"type"`
   388  }
   389  
   390  // The set of arguments for constructing a StateMachine resource.
   391  type StateMachineArgs struct {
   392  	// The [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) definition of the state machine.
   393  	Definition pulumi.StringInput
   394  	// Defines what execution history events are logged and where they are logged. The `loggingConfiguration` parameter is only valid when `type` is set to `EXPRESS`. Defaults to `OFF`. For more information see [Logging Express Workflows](https://docs.aws.amazon.com/step-functions/latest/dg/cw-logs.html) and [Log Levels](https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html) in the AWS Step Functions User Guide.
   395  	LoggingConfiguration StateMachineLoggingConfigurationPtrInput
   396  	// 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.
   397  	Name pulumi.StringPtrInput
   398  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`.
   399  	NamePrefix pulumi.StringPtrInput
   400  	// Set to true to publish a version of the state machine during creation. Default: false.
   401  	Publish pulumi.BoolPtrInput
   402  	// The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
   403  	RoleArn pulumi.StringInput
   404  	// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   405  	Tags pulumi.StringMapInput
   406  	// Selects whether AWS X-Ray tracing is enabled.
   407  	TracingConfiguration StateMachineTracingConfigurationPtrInput
   408  	// 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`.
   409  	Type pulumi.StringPtrInput
   410  }
   411  
   412  func (StateMachineArgs) ElementType() reflect.Type {
   413  	return reflect.TypeOf((*stateMachineArgs)(nil)).Elem()
   414  }
   415  
   416  type StateMachineInput interface {
   417  	pulumi.Input
   418  
   419  	ToStateMachineOutput() StateMachineOutput
   420  	ToStateMachineOutputWithContext(ctx context.Context) StateMachineOutput
   421  }
   422  
   423  func (*StateMachine) ElementType() reflect.Type {
   424  	return reflect.TypeOf((**StateMachine)(nil)).Elem()
   425  }
   426  
   427  func (i *StateMachine) ToStateMachineOutput() StateMachineOutput {
   428  	return i.ToStateMachineOutputWithContext(context.Background())
   429  }
   430  
   431  func (i *StateMachine) ToStateMachineOutputWithContext(ctx context.Context) StateMachineOutput {
   432  	return pulumi.ToOutputWithContext(ctx, i).(StateMachineOutput)
   433  }
   434  
   435  // StateMachineArrayInput is an input type that accepts StateMachineArray and StateMachineArrayOutput values.
   436  // You can construct a concrete instance of `StateMachineArrayInput` via:
   437  //
   438  //	StateMachineArray{ StateMachineArgs{...} }
   439  type StateMachineArrayInput interface {
   440  	pulumi.Input
   441  
   442  	ToStateMachineArrayOutput() StateMachineArrayOutput
   443  	ToStateMachineArrayOutputWithContext(context.Context) StateMachineArrayOutput
   444  }
   445  
   446  type StateMachineArray []StateMachineInput
   447  
   448  func (StateMachineArray) ElementType() reflect.Type {
   449  	return reflect.TypeOf((*[]*StateMachine)(nil)).Elem()
   450  }
   451  
   452  func (i StateMachineArray) ToStateMachineArrayOutput() StateMachineArrayOutput {
   453  	return i.ToStateMachineArrayOutputWithContext(context.Background())
   454  }
   455  
   456  func (i StateMachineArray) ToStateMachineArrayOutputWithContext(ctx context.Context) StateMachineArrayOutput {
   457  	return pulumi.ToOutputWithContext(ctx, i).(StateMachineArrayOutput)
   458  }
   459  
   460  // StateMachineMapInput is an input type that accepts StateMachineMap and StateMachineMapOutput values.
   461  // You can construct a concrete instance of `StateMachineMapInput` via:
   462  //
   463  //	StateMachineMap{ "key": StateMachineArgs{...} }
   464  type StateMachineMapInput interface {
   465  	pulumi.Input
   466  
   467  	ToStateMachineMapOutput() StateMachineMapOutput
   468  	ToStateMachineMapOutputWithContext(context.Context) StateMachineMapOutput
   469  }
   470  
   471  type StateMachineMap map[string]StateMachineInput
   472  
   473  func (StateMachineMap) ElementType() reflect.Type {
   474  	return reflect.TypeOf((*map[string]*StateMachine)(nil)).Elem()
   475  }
   476  
   477  func (i StateMachineMap) ToStateMachineMapOutput() StateMachineMapOutput {
   478  	return i.ToStateMachineMapOutputWithContext(context.Background())
   479  }
   480  
   481  func (i StateMachineMap) ToStateMachineMapOutputWithContext(ctx context.Context) StateMachineMapOutput {
   482  	return pulumi.ToOutputWithContext(ctx, i).(StateMachineMapOutput)
   483  }
   484  
   485  type StateMachineOutput struct{ *pulumi.OutputState }
   486  
   487  func (StateMachineOutput) ElementType() reflect.Type {
   488  	return reflect.TypeOf((**StateMachine)(nil)).Elem()
   489  }
   490  
   491  func (o StateMachineOutput) ToStateMachineOutput() StateMachineOutput {
   492  	return o
   493  }
   494  
   495  func (o StateMachineOutput) ToStateMachineOutputWithContext(ctx context.Context) StateMachineOutput {
   496  	return o
   497  }
   498  
   499  // The ARN of the state machine.
   500  func (o StateMachineOutput) Arn() pulumi.StringOutput {
   501  	return o.ApplyT(func(v *StateMachine) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   502  }
   503  
   504  // The date the state machine was created.
   505  func (o StateMachineOutput) CreationDate() pulumi.StringOutput {
   506  	return o.ApplyT(func(v *StateMachine) pulumi.StringOutput { return v.CreationDate }).(pulumi.StringOutput)
   507  }
   508  
   509  // The [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) definition of the state machine.
   510  func (o StateMachineOutput) Definition() pulumi.StringOutput {
   511  	return o.ApplyT(func(v *StateMachine) pulumi.StringOutput { return v.Definition }).(pulumi.StringOutput)
   512  }
   513  
   514  func (o StateMachineOutput) Description() pulumi.StringOutput {
   515  	return o.ApplyT(func(v *StateMachine) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
   516  }
   517  
   518  // Defines what execution history events are logged and where they are logged. The `loggingConfiguration` parameter is only valid when `type` is set to `EXPRESS`. Defaults to `OFF`. For more information see [Logging Express Workflows](https://docs.aws.amazon.com/step-functions/latest/dg/cw-logs.html) and [Log Levels](https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html) in the AWS Step Functions User Guide.
   519  func (o StateMachineOutput) LoggingConfiguration() StateMachineLoggingConfigurationOutput {
   520  	return o.ApplyT(func(v *StateMachine) StateMachineLoggingConfigurationOutput { return v.LoggingConfiguration }).(StateMachineLoggingConfigurationOutput)
   521  }
   522  
   523  // 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.
   524  func (o StateMachineOutput) Name() pulumi.StringOutput {
   525  	return o.ApplyT(func(v *StateMachine) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   526  }
   527  
   528  // Creates a unique name beginning with the specified prefix. Conflicts with `name`.
   529  func (o StateMachineOutput) NamePrefix() pulumi.StringOutput {
   530  	return o.ApplyT(func(v *StateMachine) pulumi.StringOutput { return v.NamePrefix }).(pulumi.StringOutput)
   531  }
   532  
   533  // Set to true to publish a version of the state machine during creation. Default: false.
   534  func (o StateMachineOutput) Publish() pulumi.BoolPtrOutput {
   535  	return o.ApplyT(func(v *StateMachine) pulumi.BoolPtrOutput { return v.Publish }).(pulumi.BoolPtrOutput)
   536  }
   537  
   538  func (o StateMachineOutput) RevisionId() pulumi.StringOutput {
   539  	return o.ApplyT(func(v *StateMachine) pulumi.StringOutput { return v.RevisionId }).(pulumi.StringOutput)
   540  }
   541  
   542  // The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
   543  func (o StateMachineOutput) RoleArn() pulumi.StringOutput {
   544  	return o.ApplyT(func(v *StateMachine) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput)
   545  }
   546  
   547  // The ARN of the state machine version.
   548  func (o StateMachineOutput) StateMachineVersionArn() pulumi.StringOutput {
   549  	return o.ApplyT(func(v *StateMachine) pulumi.StringOutput { return v.StateMachineVersionArn }).(pulumi.StringOutput)
   550  }
   551  
   552  // The current status of the state machine. Either `ACTIVE` or `DELETING`.
   553  func (o StateMachineOutput) Status() pulumi.StringOutput {
   554  	return o.ApplyT(func(v *StateMachine) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
   555  }
   556  
   557  // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   558  func (o StateMachineOutput) Tags() pulumi.StringMapOutput {
   559  	return o.ApplyT(func(v *StateMachine) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   560  }
   561  
   562  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   563  //
   564  // Deprecated: Please use `tags` instead.
   565  func (o StateMachineOutput) TagsAll() pulumi.StringMapOutput {
   566  	return o.ApplyT(func(v *StateMachine) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   567  }
   568  
   569  // Selects whether AWS X-Ray tracing is enabled.
   570  func (o StateMachineOutput) TracingConfiguration() StateMachineTracingConfigurationOutput {
   571  	return o.ApplyT(func(v *StateMachine) StateMachineTracingConfigurationOutput { return v.TracingConfiguration }).(StateMachineTracingConfigurationOutput)
   572  }
   573  
   574  // 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`.
   575  func (o StateMachineOutput) Type() pulumi.StringPtrOutput {
   576  	return o.ApplyT(func(v *StateMachine) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput)
   577  }
   578  
   579  func (o StateMachineOutput) VersionDescription() pulumi.StringOutput {
   580  	return o.ApplyT(func(v *StateMachine) pulumi.StringOutput { return v.VersionDescription }).(pulumi.StringOutput)
   581  }
   582  
   583  type StateMachineArrayOutput struct{ *pulumi.OutputState }
   584  
   585  func (StateMachineArrayOutput) ElementType() reflect.Type {
   586  	return reflect.TypeOf((*[]*StateMachine)(nil)).Elem()
   587  }
   588  
   589  func (o StateMachineArrayOutput) ToStateMachineArrayOutput() StateMachineArrayOutput {
   590  	return o
   591  }
   592  
   593  func (o StateMachineArrayOutput) ToStateMachineArrayOutputWithContext(ctx context.Context) StateMachineArrayOutput {
   594  	return o
   595  }
   596  
   597  func (o StateMachineArrayOutput) Index(i pulumi.IntInput) StateMachineOutput {
   598  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StateMachine {
   599  		return vs[0].([]*StateMachine)[vs[1].(int)]
   600  	}).(StateMachineOutput)
   601  }
   602  
   603  type StateMachineMapOutput struct{ *pulumi.OutputState }
   604  
   605  func (StateMachineMapOutput) ElementType() reflect.Type {
   606  	return reflect.TypeOf((*map[string]*StateMachine)(nil)).Elem()
   607  }
   608  
   609  func (o StateMachineMapOutput) ToStateMachineMapOutput() StateMachineMapOutput {
   610  	return o
   611  }
   612  
   613  func (o StateMachineMapOutput) ToStateMachineMapOutputWithContext(ctx context.Context) StateMachineMapOutput {
   614  	return o
   615  }
   616  
   617  func (o StateMachineMapOutput) MapIndex(k pulumi.StringInput) StateMachineOutput {
   618  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StateMachine {
   619  		return vs[0].(map[string]*StateMachine)[vs[1].(string)]
   620  	}).(StateMachineOutput)
   621  }
   622  
   623  func init() {
   624  	pulumi.RegisterInputType(reflect.TypeOf((*StateMachineInput)(nil)).Elem(), &StateMachine{})
   625  	pulumi.RegisterInputType(reflect.TypeOf((*StateMachineArrayInput)(nil)).Elem(), StateMachineArray{})
   626  	pulumi.RegisterInputType(reflect.TypeOf((*StateMachineMapInput)(nil)).Elem(), StateMachineMap{})
   627  	pulumi.RegisterOutputType(StateMachineOutput{})
   628  	pulumi.RegisterOutputType(StateMachineArrayOutput{})
   629  	pulumi.RegisterOutputType(StateMachineMapOutput{})
   630  }