Scaleway logo
Instance 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 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:

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/.


List volumes

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

List volumes in the specified Availability Zone. You can filter the output by volume type.

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

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

Filter by volume type.

Enum values:
l_ssd
b_ssd
unified
scratch
sbs_volume
sbs_snapshot
Default: l_ssd
per_page
​integer · uint32

A positive integer lower or equal to 100 to select the number of items to return.

page
​integer · int32

A positive integer to choose the page to return.

organization
​string

Filter volume by Organization ID.

project
​string

Filter volume by Project ID.

tags
​string

Filter volumes with these exact tags (to filter with several tags, use commas to separate them).

name
​string

Filter volume by name (for eg. "vol" will return "myvolume" but not "data").

List volumes › Responses


Create a volume

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

Create a volume of a specified type in an Availability Zone.

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

name
​string

Volume name.

project
​string | null

Volume Project ID.

tags
​string[]

Volume tags.

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

Volume type.

Enum values:
l_ssd
b_ssd
unified
scratch
sbs_volume
sbs_snapshot
Default: l_ssd
size
​integer | null · uint64

Volume disk size, must be a multiple of 512. (in bytes)

base_snapshot
​string | null

ID of the snapshot on which this volume will be based.

Create a volume › Responses


Update volume

PUT
https://api.scaleway.com
/instance/v1/zones/{zone}/volumes/{id}

Replace all volume properties with a volume message.

Update 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
id
​string · required

Unique ID of the volume.

Update volume › Request Body

name
​string

Name of the volume.

tags
​array | null

Tags of the volume.

size
​integer · uint64

Volume's disk size, must be a multiple of 512. (in bytes)

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

Volume type.

Enum values:
l_ssd
b_ssd
unified
scratch
sbs_volume
sbs_snapshot
Default: l_ssd
creation_date
​string | null · date-time

Volume creation date. (RFC 3339 format)

modification_date
​string | null · date-time

Volume modification date. (RFC 3339 format)

organization
​string

Volume Organization ID.

project
​string

Volume Project ID.

Instance attached to the volume.

state
​scaleway.instance.v1.Volume.State · enum

Volume state.

Enum values:
available
snapshotting
fetching
saving
attaching
resizing
hotsyncing
error
Default: available

Update volume › Responses


Get a volume

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

Get details of a volume with the specified ID.

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

UUID of the volume you want to get.

Get a volume › Responses


Delete a volume

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

Delete the volume with the specified ID.

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

UUID of the volume you want to delete.

Delete a volume › Responses

No data returned

Update a volume

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

Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).

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

UUID of the volume.

Update a volume › Request Body

name
​string | null

Volume name.

tags
​array | null

Tags of the volume.

size
​integer | null · uint64

Volume disk size, must be a multiple of 512. (in bytes)

Update a volume › Responses