import * as core from "@terrascript/core"; export interface TracingConfigurationArgs extends core.SchemaArgs { enabled?: boolean | core.BooleanOut; } export class TracingConfiguration extends core.Schema { @core.attr(Boolean) public enabled?: boolean | core.BooleanOut; } export interface LoggingConfigurationArgs extends core.SchemaArgs { includeExecutionData?: boolean | core.BooleanOut; level?: string | core.StringOut; logDestination?: string | core.StringOut; } export class LoggingConfiguration extends core.Schema { @core.attr(Boolean) public includeExecutionData?: boolean | core.BooleanOut; @core.attr(String) public level?: string | core.StringOut; @core.attr(String) public logDestination?: string | core.StringOut; } export interface StateMachineArgs extends core.ResourceArgs { /** * (Required) The [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concept * s-amazon-states-language.html) definition of the state machine. */ definition: string | core.StringOut; /** * (Optional) Defines what execution history events are logged and where they are logged. The `logging_ * configuration` 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-leve * l.html) in the AWS Step Functions User Guide. */ loggingConfiguration?: LoggingConfiguration; /** * (Required) The name of the state machine. To enable logging with CloudWatch Logs, the name should on * ly contain `0`-`9`, `A`-`Z`, `a`-`z`, `-` and `_`. */ name: string | core.StringOut; /** * (Required) The Amazon Resource Name (ARN) of the IAM role to use for this state machine. */ roleArn: string | core.StringOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Optional) Selects whether AWS X-Ray tracing is enabled. */ tracingConfiguration?: TracingConfiguration; /** * (Optional) Determines whether a Standard or Express state machine is created. The default is `STANDA * RD`. You cannot update the type of a state machine once it has been created. Valid values: `STANDARD * , `EXPRESS`. */ type?: string | core.StringOut; } export class StateMachine extends core.Resource { /** * The ARN of the state machine. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * The date the state machine was created. */ @core.attr(String, { computed: true }) public creationDate!: string | core.StringOut; /** * (Required) The [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concept * s-amazon-states-language.html) definition of the state machine. */ @core.attr(String) public definition!: string | core.StringOut; /** * The ARN of the state machine. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Defines what execution history events are logged and where they are logged. The `logging_ * configuration` 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-leve * l.html) in the AWS Step Functions User Guide. */ @core.attr(LoggingConfiguration, { computed: true }) public loggingConfiguration?: LoggingConfiguration; /** * (Required) The name of the state machine. To enable logging with CloudWatch Logs, the name should on * ly contain `0`-`9`, `A`-`Z`, `a`-`z`, `-` and `_`. */ @core.attr(String) public name!: string | core.StringOut; /** * (Required) The Amazon Resource Name (ARN) of the IAM role to use for this state machine. */ @core.attr(String) public roleArn!: string | core.StringOut; /** * The current status of the state machine. Either `ACTIVE` or `DELETING`. */ @core.attr(String, { computed: true }) public status!: string | core.StringOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Optional) Selects whether AWS X-Ray tracing is enabled. */ @core.attr(TracingConfiguration, { computed: true }) public tracingConfiguration?: TracingConfiguration; /** * (Optional) Determines whether a Standard or Express state machine is created. The default is `STANDA * RD`. You cannot update the type of a state machine once it has been created. Valid values: `STANDARD * , `EXPRESS`. */ @core.attr(String) public type?: string | core.StringOut; constructor(name: string, args?: StateMachineArgs) { super(name, "aws_sfn_state_machine", args); } public override getNamespace(): string { return "aws_sfn"; } }