We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I encountered an issue with the example code below provided in the documentation for the firewall_create function.
firewall_create
library(analogsea) 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
Error: missing name
Also, the message error is weird as the name is provided in the first argument.
The text was updated successfully, but these errors were encountered:
I encountered an issue with the example code below provided in the documentation for the firewall_create function. Code from Documentation: library(analogsea) 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 Error received: Error: missing name Also, the message error is weird as the name is provided in the first argument.
this seems to be a change in the API, let me ask Digital Ocean
Sorry, something went wrong.
Hello,
same problem here.
if it's of any help, this function works using httr2:
library(httr2)
api_token = "kshjqlf"
create_firewall = function(droplet_ids, firewall_name, authorized_IPs){
body <- list( name = firewall_name, droplet_ids = droplet_ids, inbound_rules = list( # Allowing specific IPs to communicate over SSH list( protocol = "tcp", ports = "22", sources = list( addresses = authorized_IPs # Add ) ), # Allowing specific IPs to communicate over HTTP list( protocol = "tcp", ports = "80", sources = list( addresses = authorized_IPs ) ), # Allow ICMP for ping list( protocol = "icmp", sources = list( #addresses = list("0.0.0.0/0") # Allow from all sources or specify your source IP addresses = authorized_IPs ) ) ) )
URL = "https://api.digitalocean.com/v2/firewalls" resp = request(URL) %>% req_headers( "Content-Type" = "application/json", "Authorization" = paste("Bearer", api_token) ) %>% req_body_json(body) |> req_perform() resp$status_code }
No branches or pull requests
I encountered an issue with the example code below provided in the documentation for the
firewall_create
function.Code from Documentation:
Error received:
Error: missing name
Also, the message error is weird as the name is provided in the first argument.
The text was updated successfully, but these errors were encountered: