Cluster firewall rule

Create and manage cluster firewall rules.

Part of the API reference collection

This page is part of the Crunchy Bridge API reference, and primarily meant to act as an exhaustive guide for technical integrations which are already in progress. To understand the basics of using the API, see API concepts and getting started.

The FirewallRule API resource

Response of a firewall rule request.

Content type: application/json

NameNullableTypeDescription
idstring in EID format in UUID format

Unique ID of the firewall rule.

descriptionstring

A human-readable description for the firewall rule.

network_idstring in EID format in UUID format

The ID of the associated network.

rulestring

Firewall rule in CIDR notation.

team_idstring in EID format in UUID format

The ID of the team that owns the associated network.

Example

{
    "description": null,
    "id": "rwhpndhwrfdetco3wypdyuw4vm",
    "network_id": "p56biajnfvgjhftvqs7lqymspe",
    "rule": "0.0.0.0/0",
    "team_id": "eaevtjiudzeq7bsqbbpiscund4"
}

List firewall rules

List existing firewall rules for a cluster.

This endpoint's pagination may be ordered through the order_field parameter by id or cidr. Defaults to being ordered by id.

Deprecated: Prefer use of GET /networks/:network_id/firewall-rules.

GET /clusters/{cluster_id}/firewall

Request

Path parameters

  • cluster_id: Unique ID of the cluster.

Query parameters

NameRequiredTypeDescription
cursorstring
limitinteger
orderenum string

Enum asc, or , desc, or , .

order_fieldstring

cURL example

curl -X get https://api.crunchybridge.com/clusters/{cluster_id}/firewall
    -H "Authorization: Bearer $CRUNCHY_API_KEY"

Response

Status: 200

Response of a list firewall rules request.

Content type: application/json

NameNullableTypeDescription
firewall_rulesarray of array

Firewall rules configured for a cluster.

Example

{
    "firewall_rules": [
        {
            "description": null,
            "id": "rwhpndhwrfdetco3wypdyuw4vm",
            "network_id": "p56biajnfvgjhftvqs7lqymspe",
            "rule": "0.0.0.0/0",
            "team_id": "eaevtjiudzeq7bsqbbpiscund4"
        }
    ]
}

Create firewall rule

Create a new firewall rule for a cluster.

Deprecated: Prefer use of POST /networks/:network_id/firewall-rules.

POST /clusters/{cluster_id}/firewall

Request

Path parameters

  • cluster_id: Unique ID of the cluster.

Request body schema

Content type: application/json

NameRequiredTypeDescription
rulestring

Firewall rule in CIDR notation.

descriptionstring

A human-readable description for the firewall rule.

Example request body

{
    "description": null,
    "rule": "0.0.0.0/0"
}

cURL example

curl -X post https://api.crunchybridge.com/clusters/{cluster_id}/firewall
    -H "Authorization: Bearer $CRUNCHY_API_KEY"
    -H "Content-Type: application/json"
    -d '{"description":null,"rule":"0.0.0.0/0"}'

Response

Status: 201

Responds with the standard FirewallRule API resource.

Update firewall rule

Update an existing firewall rule for a cluster.

Deprecated: Prefer use of PUT /networks/:network_id/firewall-rules/:rule_id.

PUT /clusters/{cluster_id}/firewall/{rule_id}

Request

Path parameters

  • cluster_id: Unique ID of the cluster.
  • rule_id: Unique ID of the cluster firewall rule.

Request body schema

Content type: application/json

NameRequiredTypeDescription
rulestring

Firewall rule in CIDR notation.

descriptionstring

A human-readable description for the firewall rule.

Example request body

{
    "description": null,
    "rule": "0.0.0.0/0"
}

cURL example

curl -X put https://api.crunchybridge.com/clusters/{cluster_id}/firewall/{rule_id}
    -H "Authorization: Bearer $CRUNCHY_API_KEY"
    -H "Content-Type: application/json"
    -d '{"description":null,"rule":"0.0.0.0/0"}'

Response

Status: 200

Responds with the standard FirewallRule API resource.

Destroy firewall rule

Delete an existing firewall rule for a cluster.

Deprecated: Prefer use of DELETE /networks/:network_id/firewall-rules/:rule_id.

DELETE /clusters/{cluster_id}/firewall/{rule_id}

Request

Path parameters

  • cluster_id: Unique ID of the cluster.
  • rule_id: Unique ID of the cluster firewall rule.

cURL example

curl -X delete https://api.crunchybridge.com/clusters/{cluster_id}/firewall/{rule_id}
    -H "Authorization: Bearer $CRUNCHY_API_KEY"

Response

Status: 200

Responds with the standard FirewallRule API resource.