Skip to content

Volumes and snapshots

Block storage volumes and their snapshots.

Paths are relative to your API address. See Authentication and Operations. Changes that answer 202 Accepted return an operation to follow.

Request and response examples are generated from the schema; the tables under Schemas are the reference.

Rename a snapshot

PATCH /v1/orgs/{org_id}/projects/{project_id}/volume-snapshots/{resource_id}

Changes the snapshot's name or description. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No
project_id path string No
resource_id path string No

Request body

{
    "description": "string",
    "display_name": "string",
    "execute_before": "2022-04-13T15:42:05.901Z"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Delete a snapshot

DELETE /v1/orgs/{org_id}/projects/{project_id}/volume-snapshots/{snapshot_id}

Deletes the snapshot; volumes made from it stay. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No
project_id path string No
snapshot_id path string No

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Create a volume

POST /v1/orgs/{org_id}/projects/{project_id}/volumes

Creates a volume in one location, empty or from an image or snapshot. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No
project_id path string No

Request body

{
    "display_name": "string",
    "execute_before": "2022-04-13T15:42:05.901Z",
    "image": "string",
    "image_id": "string",
    "image_version": "string",
    "location": "string",
    "size_gb": 0,
    "snapshot_id": "string",
    "tags": {},
    "volume_type": "string"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Rename a volume

PATCH /v1/orgs/{org_id}/projects/{project_id}/volumes/{resource_id}

Changes the volume's name or description. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No
project_id path string No
resource_id path string No

Request body

{
    "description": "string",
    "display_name": "string",
    "execute_before": "2022-04-13T15:42:05.901Z"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Set a volume's tags

PUT /v1/orgs/{org_id}/projects/{project_id}/volumes/{resource_id}/tags

Replaces the volume's tags with the whole set given and writes them to it in its location with the nx. prefix, keeping every tag set there without the prefix. Send the tags_version you read in If-Match: a set changed since is 412. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
if-match header string Yes
org_id path string No
project_id path string No
resource_id path string No

Request body

{
    "execute_before": "2022-04-13T15:42:05.901Z",
    "tags": {}
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Delete a volume

DELETE /v1/orgs/{org_id}/projects/{project_id}/volumes/{volume_id}

Deletes the volume. Refused while it is attached or has snapshots. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No
project_id path string No
volume_id path string No

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Extend a volume

POST /v1/orgs/{org_id}/projects/{project_id}/volumes/{volume_id}:extend

Makes the volume larger. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No
project_id path string No
volume_id path string No

Request body

{
    "execute_before": "2022-04-13T15:42:05.901Z",
    "size_gb": 0
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Change a volume's type

POST /v1/orgs/{org_id}/projects/{project_id}/volumes/{volume_id}:retype

Moves the volume to another volume type from the location's catalog. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No
project_id path string No
volume_id path string No

Request body

{
    "execute_before": "2022-04-13T15:42:05.901Z",
    "volume_type": "string"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Set whether a volume is bootable

POST /v1/orgs/{org_id}/projects/{project_id}/volumes/{volume_id}:set-bootable

Whether instances may start from the volume. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No
project_id path string No
volume_id path string No

Request body

{
    "bootable": true,
    "execute_before": "2022-04-13T15:42:05.901Z"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Snapshot a volume

POST /v1/orgs/{org_id}/projects/{project_id}/volumes/{volume_id}:snapshot

Makes a point-in-time copy of the volume. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No
project_id path string No
volume_id path string No

Request body

{
    "display_name": "string",
    "execute_before": "2022-04-13T15:42:05.901Z"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Move a volume to another project

POST /v1/orgs/{org_id}/projects/{project_id}/volumes/{volume_id}:transfer

Moves the volume to another project of the organization in the same location. Needs the right to delete here and to create there. Accepted at once: follow the returned operation until it finishes.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No
project_id path string No
volume_id path string No

Request body

{
    "execute_before": "2022-04-13T15:42:05.901Z",
    "target_project_id": "string"
}

Responses

{
    "operation": {
        "href": "string",
        "id": "string",
        "state": "string"
    }
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Schemas

Accepted

Name Type Description
operation OperationLink

BootableBody

Name Type Description
bootable boolean
execute_before string(date-time) | null

ExtendBody

Name Type Description
execute_before string(date-time) | null
size_gb integer

HTTPValidationError

Name Type Description
detail Array<ValidationError>
Name Type Description
href string Where to read the operation; also the Location header.
id string The operation's ID (op_…).
state string | null Its state when accepted, normally queued.

RetypeBody

Name Type Description
execute_before string(date-time) | null
volume_type string

SnapshotBody

Name Type Description
display_name string
execute_before string(date-time) | null

TagsBody

Name Type Description
execute_before string(date-time) | null
tags Labels key: value NubeStack Cloud keeps and writes to the resource in its location as `nx.= (a volume's metadata key nx.), keeping its other tags. At most 20; a key is 1-32 of a-z, 0-9, _, ., -, starting with a letter; a value is 0-24 of A-Z, a-z, 0-9, _, ., :, -`. An organization uses at most 50 keys.

TransferBody

Name Type Description
execute_before string(date-time) | null
target_project_id string

UpdateBody

Name Type Description
description string | null
display_name string
execute_before string(date-time) | null

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string

VolumeCreateBody

Name Type Description
display_name string
execute_before string(date-time) | null
image string | null
image_id string | null
image_version string | null
location string
size_gb integer
snapshot_id string | null
tags Labels key: value NubeStack Cloud keeps and writes to the resource in its location as `nx.= (a volume's metadata key nx.), keeping its other tags. At most 20; a key is 1-32 of a-z, 0-9, _, ., -, starting with a letter; a value is 0-24 of A-Z, a-z, 0-9, _, ., :, -`. An organization uses at most 50 keys.
volume_type string