> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superagentx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Firewall Handler

Google Cloud Firewall is a **network security feature** that lets you define rules to allow or block traffic to and from your VM instances.
This handler helps you **list firewall rules** in your GCP project using service account authentication.
It makes it easier to fetch firewall configurations for auditing, monitoring, or compliance checks.

## Example

To create the `GCPFirewallHandler` object with GCP credentials:

```python theme={null}
import os
from superagentx.handler.gcp.firewall import GCPFirewallHandler

# Initialize with a service account file
firewall_handler = GCPFirewallHandler(
    creds="/path/to/service-account.json"
)
```

**List Firewall Rules:** <br />
The get\_firewall\_details method retrieves all firewall rules in your GCP project.
It returns details like name, allowed protocols/ports, source/destination ranges, and priority.

```python theme={null}
firewalls = await firewall_handler.get_firewall_details()
for fw in firewalls:
    print(fw.name, fw.direction, fw.priority)
```
