{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-sagemaker/json-schema/amazon-sagemaker-create-edge-deployment-stage-request-schema.json",
  "title": "CreateEdgeDeploymentStageRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-sagemaker-edge-deployment-stage-api-openapi.yml#/components/schemas/CreateEdgeDeploymentStageRequest",
  "type": "object",
  "properties": {
    "EdgeDeploymentPlanName": {
      "type": "string",
      "description": "The name of the edge deployment plan."
    },
    "Stages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DeploymentStage"
      },
      "description": "List of stages to be added to the edge deployment plan."
    }
  },
  "required": [
    "EdgeDeploymentPlanName",
    "Stages"
  ],
  "$defs": {
    "DeploymentStage": {
      "type": "object",
      "properties": {
        "StageName": {
          "type": "string",
          "description": "The name of the stage."
        },
        "DeviceSelectionConfig": {
          "$ref": "#/$defs/DeviceSelectionConfig"
        },
        "DeploymentConfig": {
          "$ref": "#/$defs/EdgeDeploymentConfig"
        }
      },
      "required": [
        "StageName",
        "DeviceSelectionConfig"
      ]
    },
    "DeviceSelectionConfig": {
      "type": "object",
      "properties": {
        "DeviceSubsetType": {
          "type": "string",
          "enum": [
            "PERCENTAGE",
            "SELECTION",
            "NAMECONTAINS"
          ],
          "description": "Type of device subsets to deploy to the current stage."
        },
        "Percentage": {
          "type": "integer",
          "description": "Percentage of devices in the fleet to deploy to the current stage."
        },
        "DeviceNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of devices chosen to deploy."
        },
        "DeviceNameContains": {
          "type": "string",
          "description": "A filter to select devices with names containing this name."
        }
      },
      "required": [
        "DeviceSubsetType"
      ]
    },
    "EdgeDeploymentConfig": {
      "type": "object",
      "properties": {
        "FailureHandlingPolicy": {
          "type": "string",
          "enum": [
            "ROLLBACK_ON_FAILURE",
            "DO_NOTHING"
          ],
          "description": "Toggle that determines whether to rollback to previous configuration if the current deployment fails. By default this is turned on. You may turn this off if you want to investigate the errors yourself."
        }
      },
      "required": [
        "FailureHandlingPolicy"
      ]
    }
  }
}