Skip to main content
PATCH
/
firewalls
/
{firewall_id}
Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os


with Latitudesh(
    bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:

    res = latitudesh.firewalls.update(firewall_id="fw_VaNmodjeObE8W", data={
        "type": latitudesh_python_sdk.UpdateFirewallFirewallsType.FIREWALLS,
        "attributes": {
            "rules": [],
        },
    })

    # Handle response
    print(res)
{
  "data": {
    "id": "fw_6A05EdQ1dvKYQ",
    "type": "firewalls",
    "attributes": {
      "name": "new-name",
      "project": {
        "id": "proj_Ee8pKq05DWAob",
        "name": "Small Wooden Chair",
        "slug": "small-wooden-chair"
      },
      "rules": [
        {
          "from": "192.168.1.0/24",
          "to": "ANY",
          "port": "80",
          "protocol": "TCP",
          "default": false
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Path Parameters

firewall_id
string
required

The Firewall ID

Body

data
object
required

Response

200 - application/vnd.api+json

Success

data
object
meta
object
I