Block Storage

Exoscale’s Block Storage offers persistent externally attached volumes for your Compute instances.

Read more

create-block-storage-snapshot

Create a block storage snapshot

POST /block-storage/{id}:create-snapshot

Path parameters

NameInDescription
idpath

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
labelsobjectnoResource labels
namestringnoSnapshot name
Example
{
  "labels": {},
  "name": "string"
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for create-block-storage-snapshot: golang | Python | Java

CLI: exo api create-block-storage-snapshot

get-block-storage-snapshot

Retrieve block storage snapshot details

GET /block-storage-snapshot/{id}

Path parameters

NameInDescription
idpath

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
block-storage-volumeobjectTarget block storage volume schema details
created-atstringSnapshot creation date
idstringSnapshot ID
labelsobjectResource labels
namestringSnapshot name
sizeintegerSnapshot size
statestringSnapshot state

Allowed values: partially-destroyed, destroying, creating, created, promoting, error, destroyed, allocated.
volume-sizeintegerOriginal Volume size
Example output
{
  "block-storage-volume": {
    "id": "string"
  },
  "created-at": "2024-01-01T12:00:00Z",
  "id": "string",
  "labels": {},
  "name": "string",
  "size": 0,
  "state": "partially-destroyed",
  "volume-size": 0
}

SDK reference for get-block-storage-snapshot: golang | Python | Java

CLI: exo api get-block-storage-snapshot

update-block-storage-snapshot

Update block storage volume snapshot

PUT /block-storage-snapshot/{id}

Path parameters

NameInDescription
idpath

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
labelsobjectnoResource labels
namestringnoSnapshot name
Example
{
  "labels": {},
  "name": "string"
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for update-block-storage-snapshot: golang | Python | Java

CLI: exo api update-block-storage-snapshot

delete-block-storage-snapshot

Delete a block storage snapshot, data will be unrecoverable

DELETE /block-storage-snapshot/{id}

Path parameters

NameInDescription
idpath

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for delete-block-storage-snapshot: golang | Python | Java

CLI: exo api delete-block-storage-snapshot

create-block-storage-volume

Create a block storage volume

POST /block-storage

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
block-storage-snapshotobjectnoTarget block storage snapshot schema details
labelsobjectnoResource labels
namestringnoVolume name
sizeintegernoVolume size in GiB. When a snapshot ID is supplied, this defaults to the size of the source volume, but can be set to a larger value.
Example
{
  "block-storage-snapshot": {
    "id": "string"
  },
  "labels": {},
  "name": "string",
  "size": 0
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for create-block-storage-volume: golang | Python | Java

CLI: exo api create-block-storage-volume

get-block-storage-volume

Retrieve block storage volume details

GET /block-storage/{id}

Path parameters

NameInDescription
idpath

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
block-storage-snapshotsarray[object]Volume snapshots, if any schema details
blocksizeintegerVolume block size
created-atstringVolume creation date
idstringVolume ID
instanceobjectTarget Instance schema details
labelsobjectResource labels
namestringVolume name
sizeintegerVolume size
statestringVolume state

Allowed values: snapshotting, deleted, creating, detached, deleting, attaching, error, attached, detaching.
Example output
{
  "block-storage-snapshots": [
    {
      "id": "string"
    }
  ],
  "blocksize": 0,
  "created-at": "2024-01-01T12:00:00Z",
  "id": "string",
  "instance": {
    "id": "string"
  },
  "labels": {},
  "name": "string",
  "size": 0,
  "state": "snapshotting"
}

SDK reference for get-block-storage-volume: golang | Python | Java

CLI: exo api get-block-storage-volume

resize-block-storage-volume

Resize a block storage volume

PUT /block-storage/{id}:resize-volume

This operation resizes a Block storage volume. Note: the volume can only grow, cannot be shrunk. Only detached volumes or volumes attached to stopped instances can be resized.

Path parameters

NameInDescription
idpath

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
sizeintegeryesVolume size in GiB
Example
{
  "size": 0
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
block-storage-snapshotsarray[object]Volume snapshots, if any schema details
blocksizeintegerVolume block size
created-atstringVolume creation date
idstringVolume ID
instanceobjectTarget Instance schema details
labelsobjectResource labels
namestringVolume name
sizeintegerVolume size
statestringVolume state

Allowed values: snapshotting, deleted, creating, detached, deleting, attaching, error, attached, detaching.
Example output
{
  "block-storage-snapshots": [
    {
      "id": "string"
    }
  ],
  "blocksize": 0,
  "created-at": "2024-01-01T12:00:00Z",
  "id": "string",
  "instance": {
    "id": "string"
  },
  "labels": {},
  "name": "string",
  "size": 0,
  "state": "snapshotting"
}

SDK reference for resize-block-storage-volume: golang | Python | Java

CLI: exo api resize-block-storage-volume

detach-block-storage-volume

Detach block storage volume

PUT /block-storage/{id}:detach

Path parameters

NameInDescription
idpath

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for detach-block-storage-volume: golang | Python | Java

CLI: exo api detach-block-storage-volume

update-block-storage-volume

Update block storage volume

PUT /block-storage/{id}

Path parameters

NameInDescription
idpath

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
labelsobjectnoResource labels
namestringnoVolume name
Example
{
  "labels": {},
  "name": "string"
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for update-block-storage-volume: golang | Python | Java

CLI: exo api update-block-storage-volume

delete-block-storage-volume

Delete a block storage volume, data will be unrecoverable

DELETE /block-storage/{id}

Path parameters

NameInDescription
idpath

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for delete-block-storage-volume: golang | Python | Java

CLI: exo api delete-block-storage-volume


Other Operations

list-block-storage-snapshots

List block storage snapshots

GET /block-storage-snapshot

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
block-storage-snapshotsarray[object]schema details
Example output
{
  "block-storage-snapshots": [
    {
      "block-storage-volume": {
        "id": "string"
      },
      "created-at": "2024-01-01T12:00:00Z",
      "id": "string",
      "labels": {},
      "name": "string",
      "size": 0,
      "state": "partially-destroyed",
      "volume-size": 0
    }
  ]
}

SDK reference for list-block-storage-snapshots: golang | Python | Java

CLI: exo api list-block-storage-snapshots

attach-block-storage-volume-to-instance

Attach block storage volume to an instance

PUT /block-storage/{id}:attach

Path parameters

NameInDescription
idpath

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
instanceobjectyesTarget Instance schema details
Example
{
  "instance": {
    "id": "string"
  }
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceobjectRelated resource reference schema details
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for attach-block-storage-volume-to-instance: golang | Python | Java

CLI: exo api attach-block-storage-volume-to-instance

list-block-storage-volumes

List block storage volumes

GET /block-storage

Query parameters

NameInRequiredDescription
instance-idqueryno

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
block-storage-volumesarray[object]schema details
Example output
{
  "block-storage-volumes": [
    {
      "block-storage-snapshots": [
        {
          "id": "string"
        }
      ],
      "blocksize": 0,
      "created-at": "2024-01-01T12:00:00Z",
      "id": "string",
      "instance": {
        "id": "string"
      },
      "labels": {},
      "name": "string",
      "size": 0,
      "state": "snapshotting"
    }
  ]
}

SDK reference for list-block-storage-volumes: golang | Python | Java

CLI: exo api list-block-storage-volumes

Last updated on