{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-step-functions/json-schema/aws-step-functions-create-state-machine-input-schema.json",
  "title": "CreateStateMachineInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-step-functions-state-machines-api-openapi.yml#/components/schemas/CreateStateMachineInput",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the state machine. A name must not contain: white space brackets { } [ ] wildcard characters ? * special characters \" # % \\ ^ | ~ ` $ & , ; : / control characters (U+0000-001F, U+007F-009F, U+FFFE-FFFF) surrogates (U+D800-DFFF) invalid characters ( U+10FFFF) To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _."
    },
    "definition": {
      "type": "string",
      "description": "The Amazon States Language definition of the state machine. See Amazon States Language."
    },
    "roleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the IAM role to use for this state machine."
    },
    "type": {
      "type": "string",
      "enum": [
        "STANDARD",
        "EXPRESS"
      ],
      "description": "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."
    },
    "loggingConfiguration": {
      "$ref": "#/$defs/LoggingConfiguration"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "Tags to be added when creating a state machine. An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide, and Controlling Access Using IAM Tags. Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @."
    },
    "tracingConfiguration": {
      "$ref": "#/$defs/TracingConfiguration"
    },
    "publish": {
      "type": "boolean",
      "description": "Set to true to publish the first version of the state machine during creation. The default is false."
    },
    "versionDescription": {
      "type": "string",
      "description": "Sets description about the state machine version. You can only set the description if the publish parameter is set to true. Otherwise, if you set versionDescription, but publish to false, this API action throws ValidationException."
    },
    "encryptionConfiguration": {
      "$ref": "#/$defs/EncryptionConfiguration"
    }
  },
  "required": [
    "name",
    "definition",
    "roleArn"
  ],
  "$defs": {
    "CloudWatchLogsLogGroup": {
      "type": "object",
      "properties": {
        "logGroupArn": {
          "type": "string",
          "description": "The ARN of the the CloudWatch log group to which you want your logs emitted to. The ARN must end with :*"
        }
      }
    },
    "EncryptionConfiguration": {
      "type": "object",
      "properties": {
        "kmsKeyId": {
          "type": "string",
          "description": "An alias, alias ARN, key ID, or key ARN of a symmetric encryption KMS key to encrypt data. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN."
        },
        "kmsDataKeyReusePeriodSeconds": {
          "type": "integer",
          "description": "Maximum duration that Step Functions will reuse data keys. When the period expires, Step Functions will call GenerateDataKey. Only applies to customer managed keys."
        },
        "type": {
          "type": "string",
          "enum": [
            "AWS_OWNED_KEY",
            "CUSTOMER_MANAGED_KMS_KEY"
          ],
          "description": "Encryption type"
        }
      },
      "required": [
        "type"
      ]
    },
    "LogDestination": {
      "type": "object",
      "properties": {
        "cloudWatchLogsLogGroup": {
          "$ref": "#/$defs/CloudWatchLogsLogGroup"
        }
      }
    },
    "LoggingConfiguration": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "ALL",
            "ERROR",
            "FATAL",
            "OFF"
          ],
          "description": "Defines which category of execution history events are logged."
        },
        "includeExecutionData": {
          "type": "boolean",
          "description": "Determines whether execution data is included in your log. When set to false, data is excluded."
        },
        "destinations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LogDestination"
          },
          "description": "An array of objects that describes where your execution history events will be logged. Limited to size 1. Required, if your log level is not set to OFF."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of a tag."
        },
        "value": {
          "type": "string",
          "description": "The value of a tag."
        }
      }
    },
    "TracingConfiguration": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "When set to true, X-Ray tracing is enabled."
        }
      }
    }
  }
}