Create a cloud volume

POST/v1/cloud_block_storage/volumes

A new volume can be created by sending a POST request to the /v1/cloud_block_storage/volumes endpoint.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

FieldDetails
name
string

Give a name to a volume.

region_id
integer

Specify cloud region ID of a volume. You can list IDs by performing an API request described in the Cloud Region section.

size?
integer

The volume size in GB. We recommend ordering at least 30GB of the volume space.

description?
string

Comment about a volume.

image_id?
string

A unique identifier of an image. It is used to create a volume from an image. To learn how to get an image ID, go to the Cloud Image section.

snapshot_id?
string

A unique identifier of a snapshot that will be used for volume creation. You can list IDs by performing a relevant request in the Cloud Snapshots section.

attach_instance_id?
string

A unique identifier of a cloud instance to attach a volume. IDs can be listed in the Cloud Instance section.

backup_id?
string

A unique identifier of a backup to be used for volume creation. You can find a request to list backup IDs in the Cloud Backup section.

labels?
object

Specify labels you want to attach to the resource. Refer to the Labels section for more details.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/cloud_block_storage/volumes" \  -H "Content-Type: application/json" \  -d '{    "name": "vol_from_backup",    "region_id": 0,    "backup_id": "pnel5aKB",    "labels": {      "environment": "production",      "service": "my-web-app",      "example.com/project": "my-project",      "example.com/owner": "my-team"    },    "response_schema": "v1/cloud_block_storage/volumes/show"  }'
{  "id": "J0dN6dLO",  "openstack_uuid": null,  "region_id": 0,  "region_code": "NL01",  "name": "vol1",  "size": 101,  "status": "pending",  "created_at": null,  "bootable": false,  "labels": {    "environment": "production",    "service": "my-web-app",    "example.com/project": "my-project",    "example.com/owner": "my-team"  },  "attachments": [],  "description": "A fine volume"}