Skip to main content
POST
Add a firewall rule

Authorizations

Authorization
string
header
required

API token from your CloudBlast account settings. Pass as Authorization: Bearer <token>.

Path Parameters

id
integer
required

Security group ID

Body

application/json
type
enum<string>
required
Available options:
inbound,
outbound
Example:

"inbound"

action
enum<string>
required
Available options:
ACCEPT,
REJECT,
DROP
Example:

"ACCEPT"

protocol
string
required

Protocol (e.g., tcp, udp, icmp)

Maximum string length: 20
Example:

"tcp"

source
string | null

Source IP/CIDR

Example:

"0.0.0.0/0"

destination
string | null

Destination IP/CIDR

source_port
string | null

Source port or range

Maximum string length: 50
destination_port
string | null

Destination port or range (e.g., 80, 8000:9000, 80,443)

Maximum string length: 50
Example:

"443"

comment
string | null

Optional description

Example:

"Allow HTTPS"

priority
integer | null

Rule priority (lower = higher priority). Defaults to 0.

Required range: x >= 0
Example:

0

Response

Firewall rule created

data
object