{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-stepfunctions-statemachinealias.json",
  "title": "AWSStepFunctionsStateMachineAliasProperties",
  "description": "Resource schema for StateMachineAlias. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-stepfunctions.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-stepfunctions-statemachinealias.json",
    "sourceSha256": "0d0313f9db5c6e01608be2d504e83c56b46df43590c608f88c810115e4fe9791"
  },
  "type": "object",
  "properties": {
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The alias name."
    },
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "An optional description of the alias."
    },
    "RoutingConfiguration": {
      "$ref": "#/$defs/RoutingConfiguration"
    },
    "DeploymentPreference": {
      "$ref": "#/$defs/DeploymentPreference"
    }
  },
  "typeName": "AWS::StepFunctions::StateMachineAlias",
  "primaryIdentifier": [
    "/properties/Arn"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-stepfunctions.git",
  "additionalProperties": false,
  "writeOnlyProperties": [
    "/properties/DeploymentPreference"
  ],
  "$defs": {
    "RoutingConfigurationVersion": {
      "type": "object",
      "properties": {
        "StateMachineVersionArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) that identifies one or two state machine versions defined in the routing configuration."
        },
        "Weight": {
          "type": "integer",
          "description": "The percentage of traffic you want to route to the state machine version. The sum of the weights in the routing configuration must be equal to 100.",
          "minimum": 0,
          "maximum": 100
        }
      },
      "required": [
        "StateMachineVersionArn",
        "Weight"
      ],
      "title": "AWSStepFunctionsStateMachineAliasRoutingConfigurationVersionDefinition",
      "additionalProperties": false
    },
    "RoutingConfiguration": {
      "type": "array",
      "description": "The routing configuration of the alias. One or two versions can be mapped to an alias to split StartExecution requests of the same state machine.",
      "minItems": 1,
      "maxItems": 2,
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/RoutingConfigurationVersion"
      },
      "title": "AWSStepFunctionsStateMachineAliasRoutingConfigurationDefinition"
    },
    "DeploymentPreference": {
      "type": "object",
      "description": "The settings to enable gradual state machine deployments.",
      "properties": {
        "StateMachineVersionArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Type": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "LINEAR",
                "ALL_AT_ONCE",
                "CANARY"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The type of deployment to perform."
        },
        "Percentage": {
          "type": "integer",
          "description": "The percentage of traffic to shift to the new version in each increment.",
          "minimum": 1,
          "maximum": 99
        },
        "Interval": {
          "type": "integer",
          "description": "The time in minutes between each traffic shifting increment.",
          "minimum": 1,
          "maximum": 2100
        },
        "Alarms": {
          "type": "array",
          "description": "A list of CloudWatch alarm names that will be monitored during the deployment. The deployment will fail and rollback if any alarms go into ALARM state.",
          "minItems": 1,
          "maxItems": 100,
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        }
      },
      "required": [
        "StateMachineVersionArn",
        "Type"
      ],
      "title": "AWSStepFunctionsStateMachineAliasDeploymentPreferenceDefinition",
      "additionalProperties": false
    }
  },
  "tagging": {
    "taggable": false
  },
  "oneOf": [
    {
      "required": [
        "RoutingConfiguration"
      ]
    },
    {
      "required": [
        "DeploymentPreference"
      ]
    }
  ],
  "readOnlyProperties": [
    "/properties/Arn"
  ],
  "createOnlyProperties": [
    "/properties/Name"
  ]
}
