as.firewall {analogsea}R Documentation

Get list of firewalls and their metadata, or a single firewall

Description

Get list of firewalls and their metadata, or a single firewall

Usage

as.firewall(x)

firewalls(page = 1, per_page = 25, ...)

firewall(id, ...)

firewall_create(
  name,
  inbound_rules,
  outbound_rules,
  droplet_ids = NULL,
  tags = NULL,
  ...
)

firewall_update(
  name,
  inbound_rules,
  outbound_rules,
  droplet_ids = NULL,
  tags = NULL,
  ...
)

Arguments

x

Object to coerce to an firewall.

page

Page to return. Default: 1.

per_page

Number of results per page. Default: 25.

...

Additional arguments passed down to low-level API function (do_*)

id

(numeric) firewall id.

name

(character) a firewall name

inbound_rules

(list) inbound rules

outbound_rules

(list) outbound rules

droplet_ids

(numeric/integer) droplet ids

tags

(character) tag strings

Examples

## Not run: 
# list firewalls
firewalls()

# create a firewall
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)
res

# get a firewall
firewall("d19b900b-b03e-4e5d-aa85-2ff8d2786f28")
as.firewall("d19b900b-b03e-4e5d-aa85-2ff8d2786f28")

## End(Not run)

[Package analogsea version 1.0.7.2 Index]