{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-create-volume-details-schema.json",
  "title": "CreateVolumeDetails",
  "description": "The details of the volume to create. For CreateVolume operation, this field is required in the request,\nsee [CreateVolume](#/en/iaas/latest/Volume/CreateVolume).\n",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-blockstorage-api-openapi.yml#/components/schemas/CreateVolumeDetails",
  "properties": {
    "autotunePolicies": {
      "description": "The list of autotune policies to be enabled for this volume.",
      "items": {
        "$ref": "#/$defs/AutotunePolicy"
      },
      "type": "array",
      "uniqueItems": true
    },
    "availabilityDomain": {
      "description": "The availability domain of the volume. Omissible for cloning a volume. The new volume will be created in the availability domain of the source volume.\n\nExample: `Uocm:PHX-AD-1`\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "backupPolicyId": {
      "description": "If provided, specifies the ID of the volume backup policy to assign to the newly\ncreated volume. If omitted, no policy will be assigned.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "blockVolumeReplicas": {
      "description": "The list of block volume replicas to be enabled for this volume\nin the specified destination availability domains.\n",
      "items": {
        "$ref": "#/$defs/BlockVolumeReplicaDetails"
      },
      "maxItems": 1,
      "type": "array",
      "uniqueItems": true
    },
    "clusterPlacementGroupId": {
      "description": "The clusterPlacementGroup Id of the volume for volume placement.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "compartmentId": {
      "description": "The OCID of the compartment that contains the volume.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only the String type is supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing a defined tag key and value, scoped to a namespace.\n\nExample: `{\"CostCenter\": \"42\"}`\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a\nnamespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).\n\nExample: `{\"Operations\": {\"CostCenter\": \"42\"}}`\n",
      "type": "object"
    },
    "displayName": {
      "description": "A user-friendly name. Does not have to be unique, and it's changeable.\nAvoid entering confidential information.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Free-form tags for this resource. Each tag is a simple key-value pair with no\npredefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).\n\nExample: `{\"Department\": \"Finance\"}`\n",
      "type": "object"
    },
    "isAutoTuneEnabled": {
      "description": "Specifies whether the auto-tune performance is enabled for this volume. This field is deprecated.\nUse the `DetachedVolumeAutotunePolicy` instead to enable the volume for detached autotune.\n",
      "type": "boolean"
    },
    "isReservationsEnabled": {
      "description": "When set to true, enables SCSI Persistent Reservation (SCSI PR) for the volume. For more information, see\n[Persistent Reservations](/iaas/Content/Block/Concepts/persistent-reservations.htm).\n",
      "type": "boolean"
    },
    "kmsKeyId": {
      "description": "The OCID of the Vault service key to assign as the master encryption key\nfor the volume.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "sizeInGBs": {
      "description": "The size of the volume in GBs.",
      "format": "int64",
      "type": "integer"
    },
    "sizeInMBs": {
      "description": "The size of the volume in MBs. The value must be a multiple of 1024.\nThis field is deprecated. Use sizeInGBs instead.\n",
      "format": "int64",
      "type": "integer"
    },
    "sourceDetails": {
      "$ref": "#/$defs/VolumeSourceDetails"
    },
    "volumeBackupId": {
      "description": "The OCID of the volume backup from which the data should be restored on the newly created volume.\nThis field is deprecated. Use the sourceDetails field instead to specify the\nbackup for the volume.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "vpusPerGB": {
      "description": "The number of volume performance units (VPUs) that will be applied to this volume per GB,\nrepresenting the Block Volume service's elastic performance options.\nSee [Block Volume Performance Levels](/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information.\n\nAllowed values:\n\n  * `0`: Represents Lower Cost option.\n\n  * `10`: Represents Balanced option.\n\n  * `20`: Represents Higher Performance option.\n\n  * `30`-`120`: Represents the Ultra High Performance option.\n\nFor performance autotune enabled volumes, it would be the Default(Minimum) VPUs/GB.\n",
      "format": "int64",
      "type": "integer"
    }
  },
  "required": [
    "compartmentId"
  ],
  "$defs": {
    "AutotunePolicy": {
      "description": "An autotune policy automatically tunes the volume's performace based on the type of the policy.",
      "properties": {
        "autotuneType": {
          "description": "This specifies the type of autotunes supported by OCI.",
          "enum": [
            "DETACHED_VOLUME",
            "PERFORMANCE_BASED"
          ],
          "type": "string"
        }
      },
      "required": [
        "autotuneType"
      ]
    },
    "BlockVolumeReplicaDetails": {
      "description": "Contains the details for the block volume replica",
      "properties": {
        "availabilityDomain": {
          "description": "The availability domain of the block volume replica.\n\nExample: `Uocm:PHX-AD-1`\n",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "displayName": {
          "description": "A user-friendly name. Does not have to be unique, and it's changeable.\nAvoid entering confidential information.\n",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "availabilityDomain"
      ]
    },
    "VolumeSourceDetails": {
      "description": "Specifies the volume source details for a new Block volume. The volume source is either another Block volume in the same Availability Domain or a Block volume backup.\nThis is an optional field. If not specified or set to null, the new Block volume will be empty.\nWhen specified, the new Block volume will contain data from the source volume or backup.\n",
      "properties": {
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ]
    }
  }
}