analogsea (version 0.7.0)

droplet_do_actions: Perform actions on one or more droplets associated with a tag

Description

Perform actions on one or more droplets associated with a tag

Usage

droplet_do_actions(name, type, ...)

Arguments

name

(character) Name of the tag. Required.

type

(character) action type, one of 'power_cycle', 'power_on', 'power_off', 'shutdown', 'enable_private_networking', 'enable_ipv6', 'enable_backups', 'disable_backups', or 'snapshot'. Required.

...

Additional options passed down to POST

Examples

Run this code
# NOT RUN {
tag_create(name = "pluto")
d <- droplet_create()
tag_resource(name = "pluto", resource_id = d$id)
(x <- droplet_do_actions(name = "pluto", type = "power_off"))
# wait until completed, check with action(xx$actions[[1]]$id)
droplet_do_actions(name = "pluto", type = "power_on")
# }

Run the code above in your browser using DataCamp Workspace