Skip to content

Storage / Reference

Storage reference

Updated · 2 min read

Look up every origin storage CLI command and every GraphQL query and mutation in the pvs namespace for volumes, snapshots, and storage classes.

On this page5 sections

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 { … } }.

QueryReturnsPermission
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
storageClassesEvery 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.

MutationEffectReturnsPermission
createVolumeCreates a volume, empty or from a snapshot. See Create a volume.PvsVolumepvs.volume.create
importVolumeCreates a volume from a disk image at a URL. See Import a disk image as a volume.PvsVolumepvs.volume.create
resizeVolumeGrows a volume. See Resize a volume.CommandRequestStatuspvs.volume.update
deleteVolumeDeletes a volume. See Delete a volume.CommandRequestStatuspvs.volume.delete
createSnapshotTakes a snapshot of a volume. See Create and protect a snapshot.PvsSnapshotpvs.snapshot.create
protectSnapshotProtects a snapshot so it can be a clone source.CommandRequestStatuspvs.snapshot.protect
unprotectSnapshotLifts a snapshot’s protection.CommandRequestStatuspvs.snapshot.unprotect
deleteSnapshotDeletes an unprotected snapshot. See Delete a snapshot.CommandRequestStatuspvs.snapshot.delete

Status values

The status, modificationStatus, and protectionStatus fields are strings. Their values are listed in Volume states and Snapshot states.

Errors and limits