## List Firewalls `gpu_droplets.list_firewalls(intdroplet_id, GPUDropletListFirewallsParams**kwargs) -> GPUDropletListFirewallsResponse` **get** `/v2/droplets/{droplet_id}/firewalls` To retrieve a list of all firewalls available to a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/firewalls` The response will be a JSON object that has a key called `firewalls`. This will be set to an array of `firewall` objects, each of which contain the standard `firewall` attributes. ### Parameters - **droplet\_id:** `int` - **page:** `int` Which 'page' of paginated results to return. - **per\_page:** `int` Number of items returned per page ### Returns - `class GPUDropletListFirewallsResponse` - **meta:** `MetaProperties` Information about the response itself. - **firewalls:** `Optional[List[Firewall]]` - **id:** `Optional[str]` A unique ID that can be used to identify and reference a firewall. - **created\_at:** `Optional[datetime]` A time value given in ISO8601 combined date and time format that represents when the firewall was created. - **droplet\_ids:** `Optional[List[int]]` An array containing the IDs of the Droplets assigned to the firewall.

Requires `droplet:read` scope. - **inbound\_rules:** `Optional[List[InboundRule]]` - **ports:** `str` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". - **protocol:** `Literal["tcp", "udp", "icmp"]` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. - `"tcp"` - `"udp"` - `"icmp"` - **sources:** `FirewallRuleTarget` An object specifying locations from which inbound traffic will be accepted. - **name:** `Optional[str]` A human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-). - **outbound\_rules:** `Optional[List[OutboundRule]]` - **destinations:** `FirewallRuleTarget` An object specifying locations to which outbound traffic that will be allowed. - **ports:** `str` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". - **protocol:** `Literal["tcp", "udp", "icmp"]` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. - `"tcp"` - `"udp"` - `"icmp"` - **pending\_changes:** `Optional[List[PendingChange]]` An array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied. - **droplet\_id:** `Optional[int]` - **removing:** `Optional[bool]` - **status:** `Optional[str]` - **status:** `Optional[Literal["waiting", "succeeded", "failed"]]` A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed". - `"waiting"` - `"succeeded"` - `"failed"` - **tags:** `Optional[List[str]]` A flat array of tag names as strings to be applied to the resource. Tag names must exist in order to be referenced in a request.

Requires `tag:create` and `tag:read` scopes. - **links:** `Optional[PageLinks]` ### Example ```python from do_gradientai import GradientAI client = GradientAI() response = client.gpu_droplets.list_firewalls( droplet_id=3164444, ) print(response.meta) ```