Zum Inhalt springen
NimbusNexus

Blockspeicher

Block-Volumes sind persistente Disks, die Sie an VMs anhängen. Jedes Volume liegt in der Region Ihrer Sitzung; ein Daten-Volume überdauert die VM, an die es angehängt ist (Sie können es trennen und an eine neue VM anhängen); Volumes lassen sich vergrößern; und über Backups können Sie von einem Volume einen Snapshot oder ein Backup erstellen.

Volume-Typen

GET /api/v1/storage/artifacts listet auf, was Sie in der Region Ihrer Sitzung erstellen können: die Volume-Typen in types und die Speicheroptionen mit Preis in volume_options. POST /api/v1/storage/ nimmt die size in GB und den volume_type entgegen, eine der Bezeichnungen aus volume_options, die den Preis bestimmt. Optionale Felder sind ein type aus types, ein name, eine description, ein image, aus dem das Volume erstellt wird, und subscription, der Abrechnungsplan (Standard Hourly).

Ein Volume behält seinen Typ für immer: Einen Aufruf, ihn zu ändern, gibt es nicht. Die Preise pro volume_type finden Sie unter Preisdaten.

Lebenszyklus

POST /api/v1/storage/ stellt die Arbeit in die Warteschlange und antwortet ohne ID; das neue Volume erscheint in GET /api/v1/storage/. Sein status kommt vom Blockspeicher-Dienst. Die Werte, die Ihnen am häufigsten begegnen:

  • available — erstellt, aber nicht angehängt. Wird genauso abgerechnet wie im angehängten Zustand (für den Speicher macht das keinen Unterschied).
  • in-use — an eine VM gebunden. In der VM als Blockgerät sichtbar (/dev/vdb, /dev/vdc, …).
  • detaching → available — wird von einer VM getrennt. Hängen Sie das Dateisystem in der VM aus, bevor Sie das Volume trennen.

Trennen und Löschen sind getrennte Aufrufe. Das Löschen einer VM löscht das Boot-Volume, das aus ihrem Image erstellt wurde; Volumes, die Sie angehängt oder beim Erstellen der VM in volumes übergeben haben, bleiben available.

DELETE /api/v1/storage/ löscht die Volumes, deren IDs Sie in ids aufführen. Ein gelöschtes Volume kann nicht wiederhergestellt werden; sichern Sie es deshalb vorher, wenn Sie eine wiederherstellbare Kopie wollen. Mit cascade: true werden die Snapshots des Volumes mitgelöscht.

Größe ändern

POST /api/v1/storage/resize mit {"volume_id": "…", "new_size": 500} vergrößert ein Volume auf 500 GB. new_size muss größer sein als die aktuelle Größe; auf alles andere antwortet die API mit 400. Das Dateisystem in der VM braucht einen separaten Aufruf von resize2fs / xfs_growfs, um den neuen Platz zu nutzen.

Verkleinern wird nicht unterstützt. So verkleinern Sie ein Volume: ein neues, kleineres Volume erstellen, es anhängen, die Daten kopieren und das alte trennen.

Snapshots

Snapshots und Backups eines Volumes erstellen Sie über Backups: POST /api/v1/backup_restore/volume_backups/create_backup mit der volume_id und type: snapshot (eine Point-in-Time-Kopie, die beim Volume bleibt) oder type: backup (eine separate vollständige Kopie).

Der Snapshot ist auf Blockebene konsistent, nicht auf Anwendungsebene. Halten Sie bei einer Datenbank zuerst die Schreibvorgänge an oder verwenden Sie das eigene Backup-Tool der Datenbank. Snapshots auf Blockebene eignen sich für Dateisystem-Volumes, auf denen keine transaktionale Engine läuft.

Ein Restore setzt die Kopie an die Stelle des Volumes, in derselben Größe; siehe Backups.

Verhalten beim Anhängen

Ein Volume kann an jeweils nur eine VM angehängt sein. Multi-Attach (Semantik einer gemeinsam genutzten Disk) wird nicht unterstützt.

POST /api/v1/storage/attach nimmt die volume_id, die instance_id und optional einen mountpoint entgegen; ohne ihn erhält das Volume das erste freie Gerät ab /dev/vdb. POST /api/v1/storage/detach nimmt die instance_id, die volume_id und die attachment_id entgegen, die GET /api/v1/storage/detach_artifacts für eine VM auflistet.

Ein Volume und die VM, an die es angehängt wird, liegen beide in der Region Ihrer Sitzung.

Hinweise zu Preisen

  • Speicher: pro GB abgerechnet, zum Preis des volume_type des Volumes, nach dem Plan in subscription. Die Preise finden Sie unter Preisdaten.
  • Keine Abrechnung nach IOPS. Keine Gebühr pro Anhängen. Kein Aufpreis für Durchsatz.

Nächste Schritte

  • Virtuelle Maschinen — woran Sie Volumes anhängen.
  • Objektspeicher — für unstrukturierte Daten, die keinen Zugriff auf Blockebene brauchen (Logs, Backups, Uploads von Nutzern).
  • Backups — Snapshots und Backups eines Volumes und ihre Wiederherstellung.

Reference

GET/api/v1/storage/

Volumes List

Lists block storage volumes visible to the caller, optionally scoped to a specific project for administrators.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
projectquerystring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/storage/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/storage/

Volumes Create

Creates a new block storage volume in the user's project with the specified type, size and optional source image.

Request body

FieldTypeDescription
product_categorystringProduct category for billing
subscriptionobjectSubscription plan type
volume_type*stringStorage medium used for the volume
size*integer—
namestring | null—
descriptionstring | null—
typestring | null—
imagestring | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/storage/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "volume_type": "example",
    "size": 1
  }'
DELETE/api/v1/storage/

Volumes Delete

Deletes one or more block storage volumes by ID, optionally cascading to dependent resources.

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
projectstring | null—
ids*array of string—
cascadeboolean—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/storage/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      "example"
    ]
  }'
GET/api/v1/storage/artifacts

Volumes Artifacts

Returns the artifacts needed to create a block storage volume, including images, volume types and pricing options.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
product_type_namequerystring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/storage/artifacts" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/storage/attach

Volumes Attach

Attaches a block storage volume to a compute instance at the specified or next available mount point.

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
projectstring | null—
volume_id*string—
instance_id*string—
mountpointstring | null—
modestring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/storage/attach" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "volume_id": "<volume_id>",
    "instance_id": "<instance_id>"
  }'
GET/api/v1/storage/attach_artifacts

Volumes Attach Artifacts

Returns artifacts needed to attach a volume to an instance, including available volumes, used mount points and the next free mount path.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
projectquerystring | null—
instance_id*querystring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/storage/attach_artifacts?instance_id=%3Cinstance_id%3E" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/storage/detach

Volumes Detach

Detaches a block storage volume from the specified compute instance.

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
projectstring | null—
instance_id*string—
volume_id*string—
attachment_id*string—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/storage/detach" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "instance_id": "<instance_id>",
    "volume_id": "<volume_id>",
    "attachment_id": "<attachment_id>"
  }'
GET/api/v1/storage/detach_artifacts

Volumes Detach Artifacts

Returns the list of volumes currently attached to an instance to support detach selection.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
projectquerystring | null—
instance_id*querystring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/storage/detach_artifacts?instance_id=%3Cinstance_id%3E" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/storage/resize

Volumes Resize

Extends an existing block storage volume to a larger size.

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
projectstring | null—
volume_id*string—
new_size*integer—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/storage/resize" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "volume_id": "<volume_id>",
    "new_size": 1
  }'
PATCH/api/v1/storage/{volume_id}

Volume Update

Updates the editable attributes of a block storage volume identified by its ID.

Parameters

NameInTypeDescription
volume_id*pathstring—

Request body

FieldTypeDescription
namestring | null—
descriptionstring | null—
metadataobject | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/storage/<volume_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Need to make a real call? Try these endpoints in the live Swagger UI →