| as.snapshot | R Documentation | 
retrieve a snapshot
list snapshots, all, droplets, or volumes
delete a snapshot
as.snapshot(x)
snapshots(type = NULL, page = 1, per_page = 20, ...)
snapshot(id, ...)
snapshot_delete(snapshot, ...)
x | 
 Object to coerce to an snapshot  | 
type | 
 (character)   | 
page | 
 Which 'page' of paginated results to return (default 1).  | 
per_page | 
 Number of items returned per page (default 20, maximum 200)  | 
... | 
 Additional options passed down to   | 
id | 
 A snapshot id (varies depending on droplet or volume ID)  | 
snapshot | 
 A snapshot, or something that can be coerced to a snapshot by
  | 
## Not run: 
# list all snapshots
(res <- snapshots())
# list droplet snapshots
snapshots(type = "droplet")
# list volume snapshots
snapshots(type = "volume")
# paging
snapshots(per_page = 5)
snapshots(per_page = 5, page = 2)
# 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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.