latestOpenAPI 3.1.02026-08-23100133183.1 KB

0d66c7340876

Volumes

Perform action on a volume or multiple volumes

put/v1/volumes

Headers

user-agentstring required
cf-connecting-ipstring required

Request body

action'attach' | 'detach' | 'delete' | 'rename' | 'resize' | 'restore' | 'clone' | 'cancel' | 'create' | 'export' | 'transfer' required

Action to perform on the volume(s)

The clone action returns its destination volume ID: {"id":"..."}. Send a cancel action with that same ID to interrupt a cross-datacenter clone.

sizenumber

New volume size in GB. Can't be lower than current size

instance_idstring

Instance ID to attach the volume to, if the action is attach

instance_idsstring[]

Array of instance IDs to attach the volume to, if the action is attach

namestring

New volume name

typestring

Target volume type

is_permanentboolean

If deleting volume(s), delete them permanently

location_codestring

Target location code if cloning the volume

Example request

{
  "action": "detach",
  "size": 100,
  "instance_id": "a6cb17fa-60a7-4cc1-967c-01d58aee492f",
  "instance_ids": [
    "8418ce79-fea1-4f72-94f5-46636cc4467e",
    "d53d97d7-7f9f-40cb-a0ab-6c19efeed9cf"
  ],
  "name": "volume-name",
  "type": "NVMe",
  "is_permanent": true,
  "location_code": "FIN-01"
}