Skip to main content
POST
/
network
/
firewalls
Create Firewall
curl --request POST \
  --url https://api.tenbytecloud.com/v1/network/firewalls \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "display_name": "Database Firewall",
  "billing_account_id": 123,
  "rules": [
    {
      "protocol": "tcp",
      "direction": "inbound",
      "port_start": 3306,
      "port_end": 3306,
      "endpoint_spec_type": "ip_prefixes",
      "endpoint_spec": [
        "10.0.0.0/24"
      ]
    }
  ]
}
'
{
  "uuid": "2a874f44-310f-4df8-9340-1dc274c2bd51",
  "display_name": "Database Firewall",
  "billing_account_id": 123,
  "rules": [
    {
      "uuid": "db9acadc-91e1-4225-b934-7f264f9f75a2",
      "direction": "inbound",
      "protocol": "tcp",
      "port_start": 3306,
      "port_end": 3306,
      "endpoint_spec_type": "ip_prefixes",
      "endpoint_spec": [
        "10.0.0.0/24"
      ]
    }
  ],
  "resources_assigned": []
}

Authorizations

apikey
string
header
required

Body

application/json
display_name
string
billing_account_id
integer
rules
object[]

Array of FirewallRule objects

Response

200 - application/json

Created firewall

The response is of type object.