Skip to main content
POST
Create firewall

Authorizations

Authorization
string
header
required

Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.

Body

application/json

The set of rules a firewall enforces.

rules
object[]
required

Allow-only ingress rules. Order is preserved across reads and PUT replacements.

name
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

workspace
string
required

Workspace to create this firewall in.

Pattern: (wksp_[0-9a-zA-Z_-]{1,21})|(sfc:workspace:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){1,1})
Example:

"wksp_k3R-nX9vLm7Qp2Yw5Jd8F"

Response

Firewall created.

The set of rules a firewall enforces.

id
string
required
Pattern: frwl_[0-9a-zA-Z_-]{1,21}
Example:

"frwl_k3R-nX9vLm7Qp2Yw5Jd8F"

resource_path
string
required

A resource path for a firewall resource. Format: sfc:firewall:::.

Pattern: sfc:firewall:([a-zA-Z0-9._-]+:){2}[a-zA-Z0-9._-]+
Example:

"sfc:firewall:<account_id>:<workspace>:<name>"

owner
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

workspace
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

workspace_id
string
required
Pattern: wksp_[0-9a-zA-Z_-]{1,21}
Example:

"wksp_k3R-nX9vLm7Qp2Yw5Jd8F"

name
string
required
Required string length: 1 - 255
Pattern: [a-zA-Z0-9][a-zA-Z0-9._-]{0,254}
Example:

"my-resource-name"

rules
object[]
required

Allow-only ingress rules. Order is preserved across reads and PUT replacements.

object
string
default:firewall
required
read-only
Allowed value: "firewall"
created_at
integer<int64>
required

Unix timestamp.

Example:

1738972800

updated_at
integer<int64>
required

Unix timestamp.

Example:

1738972800