v1

latestSwagger 2.02026-08-04232286653.5 KB
Disks

Creates a disk in the project and returns the async operation.

Requires either a disk snapshot ID, or size and location, where size of disk should be in gibibytes (GiB) or tebibytes (TiB) in the format [Size][Unit]. E.g. 10GiB. Disk type must be one of: DISK_TYPE_PERSISTENT_SSD. A successful response from this resource will contain the async operation.

post/projects/{project_id}/storage/disks

Path parameters

project_idstring required

Request body

block_sizeinteger

Block size for the new disk, in bytes: 512 or 4096.

locationstring

Location to create the disk in.

namestring required

Name for the new disk.

sizestring

Storage capacity for the new disk, given as a size and unit in the format [Size][Unit], for example 100GiB or 1TiB.

snapshot_idstring

ID of a disk snapshot to create the disk from.

type'persistent-ssd' | 'shared-volume'

Type of disk to create: persistent-ssd or shared-volume. Defaults to persistent-ssd.

Example request

{
  "block_size": 4096,
  "location": "us-northcentral1-a",
  "name": "my-disk",
  "size": "10GiB",
  "snapshot_id": "123e4567-e89b-12d3-a456-426614174000",
  "type": "persistent-ssd"
}

Response

Example response

{
  "operation": {
    "completed_at": "2021-12-03T19:59:34Z",
    "metadata": "{}",
    "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
    "result": "{}",
    "started_at": "2021-12-03T19:58:34Z",
    "state": "IN_PROGRESS"
  }
}