The storage reference covers the origin storage CLI commands and the pvs (Persistent Volume Storage) namespace of the GraphQL API. For concepts and procedures, see Volumes and Snapshots.
CLI
origin storage commands lists every command with its options. Attaching and detaching volumes are origin compute commands; see attach-volume and detach-volume.
GraphQL queries
Queries live under query { pvs { … } }.
| Query | Returns | Permission |
|---|---|---|
volumes(input: { projectUrn }) | The project’s volumes, without deleted ones. | pvs.volume.list |
volume(volumeUrn) | One volume, including a deleted one. | pvs.volume.get |
snapshots(input: { projectUrn }) | The project’s snapshots, without deleted ones. | pvs.snapshot.list |
snapshot(snapshotUrn) | One snapshot, including a deleted one. | pvs.snapshot.get |
storageClasses | Every published storage class with its available flag. | None |
To find the instance an INUSE volume is attached to, use the compute.volumeAttachments query. See Find the instance a volume is attached to.
GraphQL mutations
Mutations live under mutation { pvs { … } }. Mutations that return CommandRequestStatus report only that the request was accepted; read the resource to see the result.
| Mutation | Effect | Returns | Permission |
|---|---|---|---|
createVolume | Creates a volume, empty or from a snapshot. See Create a volume. | PvsVolume | pvs.volume.create |
importVolume | Creates a volume from a disk image at a URL. See Import a disk image as a volume. | PvsVolume | pvs.volume.create |
resizeVolume | Grows a volume. See Resize a volume. | CommandRequestStatus | pvs.volume.update |
deleteVolume | Deletes a volume. See Delete a volume. | CommandRequestStatus | pvs.volume.delete |
createSnapshot | Takes a snapshot of a volume. See Create and protect a snapshot. | PvsSnapshot | pvs.snapshot.create |
protectSnapshot | Protects a snapshot so it can be a clone source. | CommandRequestStatus | pvs.snapshot.protect |
unprotectSnapshot | Lifts a snapshot’s protection. | CommandRequestStatus | pvs.snapshot.unprotect |
deleteSnapshot | Deletes an unprotected snapshot. See Delete a snapshot. | CommandRequestStatus | pvs.snapshot.delete |
Status values
The status, modificationStatus, and protectionStatus fields are strings. Their values are listed in Volume states and Snapshot states.