Scaleway logo
Instance Volume API

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 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 type can be queried from the zone /volume-types API endpoint.

Each type of volume is also subject to a global quota for the sum of all the volumes. This quota depends on 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/.


List volumes

GET
https://api.scaleway.com
/instance/v2alpha1/zones/{zone}/volumes

List volumes › path Parameters

zone
​string · enum · required

The zone you want to target

Enum values:
fr-par-1
fr-par-2
fr-par-3
nl-ams-1
nl-ams-2
nl-ams-3
pl-waw-1
pl-waw-2

List volumes › query Parameters

project_id
​string · required

Filter by Project ID.

page_token
​string

Token for pagination.

page_size
​integer · uint32

Number of items to return per page.

Field to order the results by.

Enum values:
created_at_desc
created_at_asc
updated_at_desc
updated_at_asc
Default: created_at_desc
volume_ids
​string[]

Filter by specific volume IDs.

name
​string

Filter by volume name.

tags
​string[]

Filter by tags.

volume_type
​scaleway.instance.v2alpha1.Volume.VolumeType · enum

Filter by volume type.

Enum values:
unknown_volume_type
l_ssd
scratch
Default: unknown_volume_type

List volumes › Responses

200

List of volumes.

next_page_token
​string | null

Token for the next page.

total_count
​integer · uint64

Total number of items.


Create a volume

POST
https://api.scaleway.com
/instance/v2alpha1/zones/{zone}/volumes

Create a volume of a specified type.

Create a volume › path Parameters

zone
​string · enum · required

The zone you want to target

Enum values:
fr-par-1
fr-par-2
fr-par-3
nl-ams-1
nl-ams-2
nl-ams-3
pl-waw-1
pl-waw-2

Create a volume › Request Body

project_id
​string

Project ID to which the volume belongs.

name
​string

Volume name.

tags
​string[]

Tags associated with the volume.

size
​integer | null · uint64

Volume size in bytes. (in bytes)

base_snapshot_id
​string | null

ID of the base snapshot used for this volume.

Type of the volume.

Enum values:
unknown_volume_type
l_ssd
scratch
Default: unknown_volume_type

Create a volume › Responses

200
id
​string

Unique ID of the volume.

srn
​string

The SRN of the volume.

project_id
​string

Project ID to which the volume belongs.

name
​string

Volume name.

tags
​string[]

Tags associated with the volume.

size
​integer · uint64

Volume size in bytes. (in bytes)

base_snapshot_id
​string | null

ID of the base snapshot used for this volume.

status
​scaleway.instance.v2alpha1.Volume.Status · enum

Current status of the volume.

Enum values:
unknown_status
available
snapshotting
attaching
detaching
creating
migrating
error
Default: unknown_status
volume_type
​scaleway.instance.v2alpha1.Volume.VolumeType · enum

Type of the volume.

Enum values:
unknown_volume_type
l_ssd
scratch
Default: unknown_volume_type
created_at
​string | null · date-time

Creation date of the volume. (RFC 3339 format)

updated_at
​string | null · date-time

Last update date of the volume. (RFC 3339 format)

server_id
​string | null

ID of the Instance to which the volume is attached.

zone
​string

Zone in which the volume is located.


Get a volume

GET
https://api.scaleway.com
/instance/v2alpha1/zones/{zone}/volumes/{volume_id}

Get a specified volume.

Get a volume › path Parameters

zone
​string · enum · required

The zone you want to target

Enum values:
fr-par-1
fr-par-2
fr-par-3
nl-ams-1
nl-ams-2
nl-ams-3
pl-waw-1
pl-waw-2
volume_id
​string · required

ID of the volume to retrieve.

Get a volume › Responses

200
id
​string

Unique ID of the volume.

srn
​string

The SRN of the volume.

project_id
​string

Project ID to which the volume belongs.

name
​string

Volume name.

tags
​string[]

Tags associated with the volume.

size
​integer · uint64

Volume size in bytes. (in bytes)

base_snapshot_id
​string | null

ID of the base snapshot used for this volume.

status
​scaleway.instance.v2alpha1.Volume.Status · enum

Current status of the volume.

Enum values:
unknown_status
available
snapshotting
attaching
detaching
creating
migrating
error
Default: unknown_status
volume_type
​scaleway.instance.v2alpha1.Volume.VolumeType · enum

Type of the volume.

Enum values:
unknown_volume_type
l_ssd
scratch
Default: unknown_volume_type
created_at
​string | null · date-time

Creation date of the volume. (RFC 3339 format)

updated_at
​string | null · date-time

Last update date of the volume. (RFC 3339 format)

server_id
​string | null

ID of the Instance to which the volume is attached.

zone
​string

Zone in which the volume is located.


Delete a volume

DELETE
https://api.scaleway.com
/instance/v2alpha1/zones/{zone}/volumes/{volume_id}

Delete a specified volume.

Delete a volume › path Parameters

zone
​string · enum · required

The zone you want to target

Enum values:
fr-par-1
fr-par-2
fr-par-3
nl-ams-1
nl-ams-2
nl-ams-3
pl-waw-1
pl-waw-2
volume_id
​string · required

ID of the volume to delete.

Delete a volume › Responses

No data returned

Update a volume

PATCH
https://api.scaleway.com
/instance/v2alpha1/zones/{zone}/volumes/{volume_id}

Update the properties of a specified volume.

Update a volume › path Parameters

zone
​string · enum · required

The zone you want to target

Enum values:
fr-par-1
fr-par-2
fr-par-3
nl-ams-1
nl-ams-2
nl-ams-3
pl-waw-1
pl-waw-2
volume_id
​string · required

ID of the volume to update.

Update a volume › Request Body

name
​string | null

New name for the volume.

tags
​array | null

New tags for the volume.

size
​integer | null · uint64

New size for the volume. (in bytes)

Update a volume › Responses

200
id
​string

Unique ID of the volume.

srn
​string

The SRN of the volume.

project_id
​string

Project ID to which the volume belongs.

name
​string

Volume name.

tags
​string[]

Tags associated with the volume.

size
​integer · uint64

Volume size in bytes. (in bytes)

base_snapshot_id
​string | null

ID of the base snapshot used for this volume.

status
​scaleway.instance.v2alpha1.Volume.Status · enum

Current status of the volume.

Enum values:
unknown_status
available
snapshotting
attaching
detaching
creating
migrating
error
Default: unknown_status
volume_type
​scaleway.instance.v2alpha1.Volume.VolumeType · enum

Type of the volume.

Enum values:
unknown_volume_type
l_ssd
scratch
Default: unknown_volume_type
created_at
​string | null · date-time

Creation date of the volume. (RFC 3339 format)

updated_at
​string | null · date-time

Last update date of the volume. (RFC 3339 format)

server_id
​string | null

ID of the Instance to which the volume is attached.

zone
​string

Zone in which the volume is located.