{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-lightsail/json-schema/amazon-lightsail-create-disk-from-snapshot-request-schema.json",
  "title": "CreateDiskFromSnapshotRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-lightsail-snapshots-api-openapi.yml#/components/schemas/CreateDiskFromSnapshotRequest",
  "type": "object",
  "properties": {
    "diskName": {
      "type": "string",
      "description": "The unique Lightsail disk name (my-disk)."
    },
    "diskSnapshotName": {
      "type": "string",
      "description": "The name of the disk snapshot (my-snapshot) from which to create the new storage disk. Constraint: This parameter cannot be defined together with the source disk name parameter. The disk snapshot name and source disk name parameters are mutually exclusive."
    },
    "availabilityZone": {
      "type": "string",
      "description": "The Availability Zone where you want to create the disk (us-east-2a). Choose the same Availability Zone as the Lightsail instance where you want to create the disk. Use the GetRegions operation to list the Availability Zones where Lightsail is currently available."
    },
    "sizeInGb": {
      "type": "integer",
      "description": "The size of the disk in GB (32)."
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The tag keys and optional values to add to the resource during create. Use the TagResource action to tag a resource after it's created."
    },
    "addOns": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AddOnRequest"
      },
      "description": "An array of objects that represent the add-ons to enable for the new disk."
    },
    "sourceDiskName": {
      "type": "string",
      "description": "The name of the source disk from which the source automatic snapshot was created. Constraints: This parameter cannot be defined together with the disk snapshot name parameter. The source disk name and disk snapshot name parameters are mutually exclusive. Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide."
    },
    "restoreDate": {
      "type": "string",
      "description": "The date of the automatic snapshot to use for the new disk. Use the get auto snapshots operation to identify the dates of the available automatic snapshots. Constraints: Must be specified in YYYY-MM-DD format. This parameter cannot be defined together with the use latest restorable auto snapshot parameter. The restore date and use latest restorable auto snapshot parameters are mutually exclusive. Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide."
    },
    "useLatestRestorableAutoSnapshot": {
      "type": "boolean",
      "description": "A Boolean value to indicate whether to use the latest available automatic snapshot. Constraints: This parameter cannot be defined together with the restore date parameter. The use latest restorable auto snapshot and restore date parameters are mutually exclusive. Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide."
    }
  },
  "required": [
    "diskName",
    "availabilityZone",
    "sizeInGb"
  ],
  "$defs": {
    "AddOnRequest": {
      "type": "object",
      "properties": {
        "addOnType": {
          "type": "string",
          "enum": [
            "AutoSnapshot",
            "StopInstanceOnIdle"
          ],
          "description": "The add-on type."
        },
        "autoSnapshotAddOnRequest": {
          "$ref": "#/$defs/AutoSnapshotAddOnRequest"
        },
        "stopInstanceOnIdleRequest": {
          "$ref": "#/$defs/StopInstanceOnIdleRequest"
        }
      },
      "required": [
        "addOnType"
      ]
    },
    "AutoSnapshotAddOnRequest": {
      "type": "object",
      "properties": {
        "snapshotTimeOfDay": {
          "type": "string",
          "description": "The daily time when an automatic snapshot will be created. Constraints: Must be in HH:00 format, and in an hourly increment. Specified in Coordinated Universal Time (UTC). The snapshot will be automatically created between the time specified and up to 45 minutes after."
        }
      }
    },
    "StopInstanceOnIdleRequest": {
      "type": "object",
      "properties": {
        "threshold": {
          "type": "string",
          "description": "The value to compare with the duration."
        },
        "duration": {
          "type": "string",
          "description": "The amount of idle time in minutes after which your virtual computer will automatically stop."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of the tag. Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @"
        },
        "value": {
          "type": "string",
          "description": "The value of the tag. Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @"
        }
      }
    }
  }
}