A volume is where you store your data inside your Instance. It appears as a block device on Linux that you can use to create a filesystem and mount it.
The Instance API only supports local (l_ssd) and scratch volume types.
Block storage volumes can also be attached to Instances, these volumes are
managed by the SBS API (https://www.scaleway.com/en/developers/api/block/Open in new context).
Minimum and maximum volume sizes for each volume types can be queried
from the zone /products/volumes API endpoint. I.e for:
fr-par-1use https://api.scaleway.com/instance/v1/zones/fr-par-1/products/volumesOpen in new contextnl-ams-1use https://api.scaleway.com/instance/v1/zones/nl-ams-1/products/volumesOpen in new context
Each type of volume is also subject to a global quota for the sum of all the volumes. This quota depends of the level of support and may be changed on demand.
When using multiple block devices, it's advised to mount them by
using their UUID instead of their device name. A device name is
subject to change depending on the volumes order. Block devices
UUIDs can be found in /dev/disk/by-id/.
Migrate a volume and/or snapshots to SBS (Scaleway Block Storage)
To be used, the call to this endpoint must be preceded by a call to the Get a volume or snapshot's migration plan endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided.
path Parameters
zoneThe zone you want to target
Migrate a volume and/or snapshots to SBS (Scaleway Block Storage) › Request Body
validation_keyA value to be retrieved from a call to the Get a volume or snapshot's migration plan endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
volume_idThe volume to migrate, along with potentially other resources, according to the migration plan generated with a call to the Get a volume or snapshot's migration plan endpoint.
snapshot_idThe snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to the Get a volume or snapshot's migration plan endpoint.
Migrate a volume and/or snapshots to SBS (Scaleway Block Storage) › Responses
Get a volume or snapshot's migration plan
Given a volume or snapshot, returns the migration plan but does not perform the actual migration. To perform the migration, you have to call the Migrate a volume and/or snapshots to SBS endpoint afterward. The endpoint returns the resources that should be migrated together:
- the volume and any snapshots created from the volume, if the call was made to plan a volume migration.
- the base volume of the snapshot (if the volume is not deleted) and its related snapshots, if the call was made to plan a snapshot migration. The endpoint also returns the validation_key, which must be provided to the Migrate a volume and/or snapshots to SBS endpoint to confirm that all resources listed in the plan should be migrated.
path Parameters
zoneThe zone you want to target
Get a volume or snapshot's migration plan › Request Body
volume_idThe volume for which the migration plan will be generated.
snapshot_idThe snapshot for which the migration plan will be generated.
Get a volume or snapshot's migration plan › Responses
A volume which will be migrated to SBS together with the snapshots, if present.
A list of snapshots which will be migrated to SBS together and with the volume, if present.
validation_keyA value to be passed to the call to the Migrate a volume and/or snapshots to SBS endpoint, to confirm that the execution of the plan is being requested.
List volumes
List volumes in the specified Availability Zone. You can filter the output by volume type.
path Parameters
zoneThe zone you want to target
query Parameters
volume_typeFilter by volume type.
per_pageA positive integer lower or equal to 100 to select the number of items to return.
pageA positive integer to choose the page to return.
organizationFilter volume by Organization ID.
projectFilter volume by Project ID.
tagsFilter volumes with these exact tags (to filter with several tags, use commas to separate them).
nameFilter volume by name (for eg. "vol" will return "myvolume" but not "data").
List volumes › Responses
List of volumes.
Create a volume
Create a volume of a specified type in an Availability Zone.
path Parameters
zoneThe zone you want to target
Create a volume › Request Body
nameVolume name.
projectVolume Project ID.
tagsVolume tags.
volume_typeVolume type.
sizeVolume disk size, must be a multiple of 512. (in bytes)
base_snapshotID of the snapshot on which this volume will be based.
organizationVolume Organization ID.
Create a volume › Responses
Update volume
Replace all volume properties with a volume message.
path Parameters
zoneThe zone you want to target
idUnique ID of the volume.
Update volume › Request Body
nameName of the volume.
tagsTags of the volume.
sizeVolume's disk size, must be a multiple of 512. (in bytes)
volume_typeVolume type.
creation_dateVolume creation date. (RFC 3339 format)
modification_dateVolume modification date. (RFC 3339 format)
organizationVolume Organization ID.
projectVolume Project ID.
Instance attached to the volume.
stateVolume state.
export_uriNBD export URI of the Volume (deprecated, this field is ignored).
Update volume › Responses
Get a volume
Delete a volume
Delete the volume with the specified ID.
path Parameters
zoneThe zone you want to target
volume_idUUID of the volume you want to delete.
Delete a volume › Responses
Update a volume
Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).
path Parameters
zoneThe zone you want to target
volume_idUUID of the volume.
Update a volume › Request Body
nameVolume name.
tagsTags of the volume.
sizeVolume disk size, must be a multiple of 512. (in bytes)