{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-sagemaker/json-schema/amazon-sagemaker-create-edge-deployment-plan-request-schema.json",
  "title": "CreateEdgeDeploymentPlanRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-sagemaker-edge-deployment-plan-api-openapi.yml#/components/schemas/CreateEdgeDeploymentPlanRequest",
  "type": "object",
  "properties": {
    "EdgeDeploymentPlanName": {
      "type": "string",
      "description": "The name of the edge deployment plan."
    },
    "ModelConfigs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EdgeDeploymentModelConfig"
      },
      "description": "List of models associated with the edge deployment plan."
    },
    "DeviceFleetName": {
      "type": "string",
      "description": "The device fleet used for this edge deployment plan."
    },
    "Stages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DeploymentStage"
      },
      "description": "List of stages of the edge deployment plan. The number of stages is limited to 10 per deployment."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "List of tags with which to tag the edge deployment plan."
    }
  },
  "required": [
    "EdgeDeploymentPlanName",
    "ModelConfigs",
    "DeviceFleetName"
  ],
  "$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"
      ]
    },
    "EdgeDeploymentModelConfig": {
      "type": "object",
      "properties": {
        "ModelHandle": {
          "type": "string",
          "description": "The name the device application uses to reference this model."
        },
        "EdgePackagingJobName": {
          "type": "string",
          "description": "The edge packaging job associated with this deployment."
        }
      },
      "required": [
        "ModelHandle",
        "EdgePackagingJobName"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The tag key. Tag keys must be unique per resource."
        },
        "Value": {
          "type": "string",
          "description": "The tag value."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}