Block Storage
All operations require authentication.
List volumesProduction
Returns the volumes of the project.
Path parameters
Project ID
Headers
Pagination cursor
Pagination size
Response
Computed hash representing the current target specification value
Creation date of the volume
Current observed state of the volume from the infrastructure
Ongoing asynchronous tasks related to the volume
Unique identifier of the volume
Volume readiness in the system
CREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATINGLast target specification of the volume
Last update date of the volume
Example uses projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ block/ volume \
-H "authorization: Bearer $OVH_TOKEN"[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "attachedInstances": [ { "id": "00000000-0000-0000-0000-000000000000" } ], "bootable": true, "description": "string", "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "locked": true, "name": "string", "size": 0, "status": "ATTACHING", "volumeType": "CLASSIC" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "createFrom": { "backupId": "00000000-0000-0000-0000-000000000000", "imageId": "00000000-0000-0000-0000-000000000000", "snapshotId": "00000000-0000-0000-0000-000000000000" }, "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "size": 0, "volumeType": "CLASSIC" }, "updatedAt": "2024-01-01T12:00:00Z" }]
Get a volumeProduction
Returns the volume configuration and its current state, including the instances it is attached to.
Path parameters
Id
Project ID
Response
Computed hash representing the current target specification value
Creation date of the volume
Current observed state of the volume from the infrastructure
Ongoing asynchronous tasks related to the volume
Unique identifier of the volume
Volume readiness in the system
CREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATINGLast target specification of the volume
Last update date of the volume
Example uses id = 00000000-0000-0000-0000-000000000000, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ block/ volume/ {id} \
-H "authorization: Bearer $OVH_TOKEN"{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "attachedInstances": [ { "id": "00000000-0000-0000-0000-000000000000" } ], "bootable": true, "description": "string", "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "locked": true, "name": "string", "size": 0, "status": "ATTACHING", "volumeType": "CLASSIC" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "createFrom": { "backupId": "00000000-0000-0000-0000-000000000000", "imageId": "00000000-0000-0000-0000-000000000000", "snapshotId": "00000000-0000-0000-0000-000000000000" }, "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "size": 0, "volumeType": "CLASSIC" }, "updatedAt": "2024-01-01T12:00:00Z"}
Create a volumeProduction
Creates a volume, blank or from a backup, a snapshot or an image. volumeType is required for a blank volume or one created from an image. The source and the encryption can only be set at creation.
Path parameters
Project ID
Request body (required)
Desired target specification for the volume
Response
Computed hash representing the current target specification value
Creation date of the volume
Current observed state of the volume from the infrastructure
Ongoing asynchronous tasks related to the volume
Unique identifier of the volume
Volume readiness in the system
CREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATINGLast target specification of the volume
Last update date of the volume
Example uses projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ block/ volume \
-H "authorization: Bearer $OVH_TOKEN"{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "attachedInstances": [ { "id": "00000000-0000-0000-0000-000000000000" } ], "bootable": true, "description": "string", "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "locked": true, "name": "string", "size": 0, "status": "ATTACHING", "volumeType": "CLASSIC" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "createFrom": { "backupId": "00000000-0000-0000-0000-000000000000", "imageId": "00000000-0000-0000-0000-000000000000", "snapshotId": "00000000-0000-0000-0000-000000000000" }, "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "size": 0, "volumeType": "CLASSIC" }, "updatedAt": "2024-01-01T12:00:00Z"}
Run an action on a volumeProduction
Runs an action on the volume. The only action available is RESTORE_FROM_BACKUP, which restores the volume from the backup given in parameters.backupId.
Path parameters
Id
Project ID
Request body (required)
Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins).
Parameters for the action
The action to perform
RESTORE_FROM_BACKUPResponse
Computed hash representing the current target specification value
Creation date of the volume
Current observed state of the volume from the infrastructure
Ongoing asynchronous tasks related to the volume
Unique identifier of the volume
Volume readiness in the system
CREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATINGLast target specification of the volume
Last update date of the volume
Example uses id = 00000000-0000-0000-0000-000000000000, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ block/ volume/ {id}/ action \
-H "authorization: Bearer $OVH_TOKEN"{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "attachedInstances": [ { "id": "00000000-0000-0000-0000-000000000000" } ], "bootable": true, "description": "string", "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "locked": true, "name": "string", "size": 0, "status": "ATTACHING", "volumeType": "CLASSIC" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "createFrom": { "backupId": "00000000-0000-0000-0000-000000000000", "imageId": "00000000-0000-0000-0000-000000000000", "snapshotId": "00000000-0000-0000-0000-000000000000" }, "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "size": 0, "volumeType": "CLASSIC" }, "updatedAt": "2024-01-01T12:00:00Z"}
Delete a volumeProduction
Deletes the volume. An attached volume cannot be deleted: detach it first.
Path parameters
Id
Project ID
Response
Computed hash representing the current target specification value
Creation date of the volume
Current observed state of the volume from the infrastructure
Ongoing asynchronous tasks related to the volume
Unique identifier of the volume
Volume readiness in the system
CREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATINGLast target specification of the volume
Last update date of the volume
Example uses id = 00000000-0000-0000-0000-000000000000, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ block/ volume/ {id} \
-H "authorization: Bearer $OVH_TOKEN"{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "attachedInstances": [ { "id": "00000000-0000-0000-0000-000000000000" } ], "bootable": true, "description": "string", "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "locked": true, "name": "string", "size": 0, "status": "ATTACHING", "volumeType": "CLASSIC" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "createFrom": { "backupId": "00000000-0000-0000-0000-000000000000", "imageId": "00000000-0000-0000-0000-000000000000", "snapshotId": "00000000-0000-0000-0000-000000000000" }, "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "size": 0, "volumeType": "CLASSIC" }, "updatedAt": "2024-01-01T12:00:00Z"}
Update a volumeProduction
Replaces the volume's target specification as a whole. The body carries the complete desired state of every field publicCloud.blockStorage.BlockUpdateTargetSpec exposes (name, size and volumeType), so read the volume first and restate every value you want to keep: a field left out of targetSpec is cleared, not carried over from the stored specification.
The create-only fields location, encryption and createFrom cannot be changed once the volume exists. They are deliberately absent from the update model, and sending one is rejected with a 400.
name and size are both required. size can only grow: restate the volume's current size to keep it, or send a larger value to extend it, because shrinking a volume is not supported. Leaving size out, or sending 0, is rejected with a 400. Restate volumeType to keep it. Sending a different type triggers an online retype (migration).
The optional checksum guards against a lost update: when supplied it must match the volume's current checksum or the request is rejected with a 409 checksum mismatch. Omitting it skips the check and forces the write (last-write-wins).
Path parameters
Id
Project ID
Request body (required)
Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins).
Desired target specification for the volume
Response
Computed hash representing the current target specification value
Creation date of the volume
Current observed state of the volume from the infrastructure
Ongoing asynchronous tasks related to the volume
Unique identifier of the volume
Volume readiness in the system
CREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATINGLast target specification of the volume
Last update date of the volume
Example uses id = 00000000-0000-0000-0000-000000000000, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ block/ volume/ {id} \
-H "authorization: Bearer $OVH_TOKEN"{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "attachedInstances": [ { "id": "00000000-0000-0000-0000-000000000000" } ], "bootable": true, "description": "string", "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "locked": true, "name": "string", "size": 0, "status": "ATTACHING", "volumeType": "CLASSIC" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "createFrom": { "backupId": "00000000-0000-0000-0000-000000000000", "imageId": "00000000-0000-0000-0000-000000000000", "snapshotId": "00000000-0000-0000-0000-000000000000" }, "encryption": { "enabled": true, "kms": { "domainId": "00000000-0000-0000-0000-000000000000", "serviceKeyId": "00000000-0000-0000-0000-000000000000" } }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "size": 0, "volumeType": "CLASSIC" }, "updatedAt": "2024-01-01T12:00:00Z"}