firewall_add_tags: Add/remove tags to a firewall

Description Usage Arguments Examples

View source: R/firewalls.R

Description

Add/remove tags to a firewall

Usage

1
2
3

Arguments

id

(character) A firewall id (not the name) to delete

tags

(character) tag strings

...

Options passed on to httr::POST or httr::DELETE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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)

tag_create(name = "foobar")
tags()
firewall_add_tags(id = res$id, tags = "foobar")
firewalls()[[1]]$tags
firewall_remove_tags(id = res$id, tags = "foobar")

## End(Not run)

analogsea documentation built on Nov. 9, 2021, 1:06 a.m.