{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CreateVolumeRequest",
  "title": "CreateVolumeRequest",
  "type": "object",
  "description": "Request body for creating a new Fly Volume.",
  "required": [
    "name",
    "size_gb",
    "region"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Human-readable name for the volume."
    },
    "size_gb": {
      "type": "integer",
      "description": "Size of the volume in gigabytes.",
      "minimum": 1
    },
    "region": {
      "type": "string",
      "description": "The region code where the volume should be created.",
      "example": "iad"
    },
    "encrypted": {
      "type": "boolean",
      "description": "Whether to encrypt the volume at rest. Defaults to true.",
      "default": true
    },
    "unique_zones_only": {
      "type": "boolean",
      "description": "When true, ensures this volume is placed in a separate availability zone from other volumes with the same name in the app."
    },
    "snapshot_id": {
      "type": "string",
      "description": "Restore the volume from this snapshot ID during creation."
    },
    "snapshot_retention": {
      "type": "integer",
      "description": "Number of days to retain snapshots. Defaults to 5.",
      "minimum": 1,
      "maximum": 60
    }
  }
}