retrieve a snapshot
list snapshots, all, droplets, or volumes
delete a snapshot
as.snapshot(x) snapshots(type = NULL, ...) snapshot(id, ...) snapshot_delete(snapshot, ...)
x | Object to coerce to an snapshot |
---|---|
type | (character) |
... | |
id | A snapshot id (varies depending on droplet or volume ID) |
snapshot | A snapshot, or something that can be coerced to a snapshot by
|
if (FALSE) { # list all snapshots (res <- snapshots()) # list droplet snapshots snapshots(type = "droplet") # list volume snapshots snapshots(type = "volume") # get a single snapshot snapshot(res[[1]]$id) # delete a snapshot ## a whole snapshot class object snapshot_delete(res[[2]]) ## by id snapshot_delete(res[[2]]$id) ## by name snapshot_delete(res[[2]]$name) # delete many snapshots lapply(snapshots(), snapshot_delete) }