# firewall-api ## Pages - [Firewall API](https://docs.ezghcloud.com/firewall-api/index.md) — EZGH Firewalls: stateful, security-group-style firewalls for network interfaces. A firewall is a project resource holding allow rules; it attaches many-to-many to network interfaces in its project, and an interface's effective policy is the union of its firewalls' rules. Inbound is denied and outbound allowed by default. Paths take a firewall's slug (fwl_…) or its ID; references to firewalls are slugs. Lists are paged with limit, cursor and nextCursor. - [Add rules to a firewall](https://docs.ezghcloud.com/firewall-api/AddFirewallRules/index.md) — 1-50 rules. 409 rule_duplicate for a tuple the firewall already has. - [Attach a firewall to a network interface](https://docs.ezghcloud.com/firewall-api/AttachFirewall/index.md) — Checks firewall.firewalls.attach on the firewall and network.networkInterfaces.setFirewalls on the interface. 404 when the interface isn't in this project; 409 interface_not_attachable while it's being deleted; 409 interface_firewall_limit (5 per interface), firewall_member_limit (1,000 per firewall), interface_reference_limit (8 referenced firewalls per interface); 409 firewall_vpc_mismatch for a VPC's default and a network interface outside that VPC. Attaching what's attached is 200. - [Create a firewall](https://docs.ezghcloud.com/firewall-api/CreateFirewall/index.md) — rules omitted gives the firewall the two outbound allow-all rules (IPv4 and IPv6); rules: [] gives it none. 409 rule_duplicate when two rules share a tuple; 400 at rules[i].peer.firewallId for a peer that isn't a firewall in this project. - [Delete a firewall](https://docs.ezghcloud.com/firewall-api/DeleteFirewall/index.md) — 409 firewall_in_use while it's attached (the message gives the count), firewall_referenced while another firewall's rule references it, default_firewall_protected for the project's default or a VPC's default. - [Delete a rule](https://docs.ezghcloud.com/firewall-api/DeleteFirewallRule/index.md) - [Detach a firewall from a network interface](https://docs.ezghcloud.com/firewall-api/DetachFirewall/index.md) — Checks firewall.firewalls.detach on the firewall and network.networkInterfaces.setFirewalls on the interface. 404 when it isn't attached. - [Get a firewall and its rules](https://docs.ezghcloud.com/firewall-api/GetFirewall/index.md) - [Get a network interface's effective rules](https://docs.ezghcloud.com/firewall-api/GetInterfaceEffectiveRules/index.md) — The interface's compiled rule set (the union of its firewalls' rules, normalized, with members' addresses as sets), without organizationId, projectId and digest. - [Get a network interface's firewalls](https://docs.ezghcloud.com/firewall-api/GetInterfaceFirewalls/index.md) - [List a firewall's network interfaces](https://docs.ezghcloud.com/firewall-api/ListFirewallAttachments/index.md) - [List a project's firewalls, oldest first](https://docs.ezghcloud.com/firewall-api/ListFirewalls/index.md) - [Replace a firewall's rules](https://docs.ezghcloud.com/firewall-api/ReplaceFirewallRules/index.md) — The rules become exactly these (0-200). A rule whose tuple the firewall already has keeps its ID. If-Match (optional) is compared with the firewall's ETag. The per-firewall rule quota checks the net amount. - [Set a network interface's firewalls](https://docs.ezghcloud.com/firewall-api/SetInterfaceFirewalls/index.md) — The interface's firewalls become exactly these (at most 5). Checks firewall.firewalls.attach on each added, firewall.firewalls.detach on each removed and network.networkInterfaces.setFirewalls on the interface. If-Match (optional) is compared with the attachment set's ETag. - [Rename, describe or tag a firewall](https://docs.ezghcloud.com/firewall-api/UpdateFirewall/index.md) - [Change a rule's description](https://docs.ezghcloud.com/firewall-api/UpdateFirewallRule/index.md) — A rule is immutable apart from its description; change anything else by deleting it and adding another. - [Attachment](https://docs.ezghcloud.com/firewall-api/schemas/Attachment/index.md) - [AttachmentCreate](https://docs.ezghcloud.com/firewall-api/schemas/AttachmentCreate/index.md) - [AttachmentList](https://docs.ezghcloud.com/firewall-api/schemas/AttachmentList/index.md) - [EffectiveRules](https://docs.ezghcloud.com/firewall-api/schemas/EffectiveRules/index.md) — The rule IR (schema ezgh.firewall.interfaceRuleSet/1) without organizationId, projectId and digest. - [Error](https://docs.ezghcloud.com/firewall-api/schemas/Error/index.md) — Every non-2xx answer. Clients branch on code, never on message. - [Firewall](https://docs.ezghcloud.com/firewall-api/schemas/Firewall/index.md) - [FirewallCreate](https://docs.ezghcloud.com/firewall-api/schemas/FirewallCreate/index.md) - [FirewallList](https://docs.ezghcloud.com/firewall-api/schemas/FirewallList/index.md) - [FirewallUpdate](https://docs.ezghcloud.com/firewall-api/schemas/FirewallUpdate/index.md) - [InterfaceFirewalls](https://docs.ezghcloud.com/firewall-api/schemas/InterfaceFirewalls/index.md) - [InterfaceFirewallsSet](https://docs.ezghcloud.com/firewall-api/schemas/InterfaceFirewallsSet/index.md) - [Peer](https://docs.ezghcloud.com/firewall-api/schemas/Peer/index.md) - [QuotaExceeded](https://docs.ezghcloud.com/firewall-api/schemas/QuotaExceeded/index.md) — quota_exceeded: the quota that refused the request. Never with Retry-After. - [Rule](https://docs.ezghcloud.com/firewall-api/schemas/Rule/index.md) - [RuleInput](https://docs.ezghcloud.com/firewall-api/schemas/RuleInput/index.md) - [RuleUpdate](https://docs.ezghcloud.com/firewall-api/schemas/RuleUpdate/index.md) - [RulesBody](https://docs.ezghcloud.com/firewall-api/schemas/RulesBody/index.md) - [RulesWrite](https://docs.ezghcloud.com/firewall-api/schemas/RulesWrite/index.md)