firewall_add_droplets | R Documentation |
Add/remove droplets to a firewall
firewall_add_droplets(id, droplet_ids, ...)
firewall_remove_droplets(id, droplet_ids, ...)
id |
(character) A firewall id (not the name) to delete |
droplet_ids |
(integer/numeric) a vector of droplet ids |
... |
Options passed on to httr::POST or httr::DELETE |
## Not run:
drops <- droplets_create()
drop_ids <- vapply(drops, "[[", numeric(1), "id")
inbound <- list(list(protocol = "tcp", ports = "80",
sources = list(addresses = "18.0.0.0/8")))
outbound <- list(list(protocol = "tcp", ports = "80",
destinations = list(addresses = "0.0.0.0/0")))
res <- firewall_create("myfirewall", inbound, outbound)
firewall_add_droplets(id = res$id, droplet_ids = drop_ids)
firewalls()[[1]]$droplet_ids
firewall_remove_droplets(id = res$id, droplet_ids = drop_ids)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.