unifi_console_firewall_policy
Preview and apply changes to a single custom zone-based firewall policy, with diff and fingerprint confirmation before create, update, enable/disable, delete, or move actions.
Instructions
Preview, then apply, a change to one custom zone-based firewall policy. Tier C: it can cut or expose the network.
Actions: create (switched off unless enabled=true), update, enable, disable, delete, move (position first, last, before or after relative_to, inside the policy's own zone pair). Two steps, always: call with confirm=false for a read-only preview (before, after, diff, what the policy matches in words, hits, warnings, errors, a fingerprint); call again with the same fields plus confirm=true, that fingerprint and an approval_note to apply. System-defined policies and the generated "(Return)" copies are never changed. An enabled ALLOW from External that matches everything, or an enabled BLOCK/REJECT that cuts DNS/DHCP/internet for the console's own network, is refused unless acknowledge_exposure / acknowledge_outage is passed. A change touching an enabled policy is wrapped in a DNS test before and after; if it fails afterwards the previous state is put back automatically, once. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'firewall_policy' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |