Skip to content
Get started

Snapshots

List snapshots
client.Snapshots.List(ctx, query) (*[]Snapshot, error)
get/snapshots
Get snapshot details
client.Snapshots.Get(ctx, snapshotID) (*Snapshot, error)
get/snapshots/{snapshotId}
Delete a snapshot
client.Snapshots.Delete(ctx, snapshotID) error
delete/snapshots/{snapshotId}
Fork a new instance from a snapshot
client.Snapshots.Fork(ctx, snapshotID, body) (*Instance, error)
post/snapshots/{snapshotId}/fork
ModelsExpand Collapse
type Snapshot struct{…}
ID string

Auto-generated unique snapshot identifier

CreatedAt Time

Snapshot creation timestamp

formatdate-time

Snapshot capture kind

Accepts one of the following:
const SnapshotKindStandby SnapshotKind = "Standby"
const SnapshotKindStopped SnapshotKind = "Stopped"
SizeBytes int64

Total payload size in bytes

formatint64
SourceHypervisor SnapshotSourceHypervisor

Source instance hypervisor at snapshot creation time

Accepts one of the following:
const SnapshotSourceHypervisorCloudHypervisor SnapshotSourceHypervisor = "cloud-hypervisor"
const SnapshotSourceHypervisorFirecracker SnapshotSourceHypervisor = "firecracker"
const SnapshotSourceHypervisorQemu SnapshotSourceHypervisor = "qemu"
const SnapshotSourceHypervisorVz SnapshotSourceHypervisor = "vz"
SourceInstanceID string

Source instance ID at snapshot creation time

SourceInstanceName string

Source instance name at snapshot creation time

CompressedSizeBytes int64optional

Compressed memory payload size in bytes

formatint64
Compression SnapshotCompressionConfigoptional
Enabled bool

Enable snapshot memory compression

Algorithm SnapshotCompressionConfigAlgorithmoptional

Compression algorithm (defaults to zstd when enabled). Ignored when enabled is false.

Accepts one of the following:
const SnapshotCompressionConfigAlgorithmZstd SnapshotCompressionConfigAlgorithm = "zstd"
const SnapshotCompressionConfigAlgorithmLz4 SnapshotCompressionConfigAlgorithm = "lz4"
Level int64optional

Compression level. Allowed ranges are zstd=1-19 and lz4=0-9. When omitted, zstd defaults to 1 and lz4 defaults to 0. Ignored when enabled is false.

minimum0
maximum19
CompressionError stringoptional

Compression error message when compression_state is error

CompressionState SnapshotCompressionStateoptional

Compression status of the snapshot payload memory file

Accepts one of the following:
const SnapshotCompressionStateNone SnapshotCompressionState = "none"
const SnapshotCompressionStateCompressing SnapshotCompressionState = "compressing"
const SnapshotCompressionStateCompressed SnapshotCompressionState = "compressed"
const SnapshotCompressionStateError SnapshotCompressionState = "error"
Name stringoptional

Optional human-readable snapshot name (unique per source instance)

Tags map[string, string]optional

User-defined key-value tags.

UncompressedSizeBytes int64optional

Uncompressed memory payload size in bytes

formatint64
type SnapshotKind string

Snapshot capture kind

Accepts one of the following:
const SnapshotKindStandby SnapshotKind = "Standby"
const SnapshotKindStopped SnapshotKind = "Stopped"