# 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")
# }
Run the code above in your browser using DataCamp Workspace