{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-lightsail/json-schema/amazon-lightsail-create-disk-request-schema.json",
  "title": "CreateDiskRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-lightsail-blockstorage-api-openapi.yml#/components/schemas/CreateDiskRequest",
  "type": "object",
  "properties": {
    "diskName": {
      "type": "string",
      "description": "The unique Lightsail disk name (my-disk)."
    },
    "availabilityZone": {
      "type": "string",
      "description": "The Availability Zone where you want to create the disk (us-east-2a). Use the same Availability Zone as the Lightsail instance to which you want to attach the disk. Use the get regions 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."
    }
  },
  "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: + - = . _ : / @"
        }
      }
    }
  }
}