# NOT RUN {
# resize a volume
## create a volume
(vol1 <- volume_create('foobar', 5))
## resize it
volume_resize(vol1, 6)
volume(vol1)
# attach a volume to a droplet
## create a droplet
(d <- droplet_create(region = "nyc1"))
## attach volume to droplet
volume_attach(vol1, d)
## refresh droplet info, see volumes slot
droplet(d$id)
# detach a volume from a droplet
(act <- volume_detach(vol1, d))
## refresh droplet info, see volumes slot
droplet(d$id)
# list an action
volume_action(vol1, 154689758)
# list all volume actions
volume_actions(volumes()[[1]])
# }
Run the code above in your browser using DataLab