create_acl_rule
Create a new ACL rule for intra-VLAN and inter-network L3 traffic filtering on a UniFi site. Specify type, action, and filters; missing required fields are caught locally before sending.
Instructions
Create a new ACL rule on a site.
host: console name, ID, or composite ID (MAC:numericId format). site: site name or ID.
Validated locally before the request (a missing field raises ValueError naming it):
type — the discriminator the controller validates first (verified live: an empty
body is rejected with Missing $.type value; observed value: 'MAC'). The remaining
fields are type-specific and enforced by the controller.
rule: for a MAC-type rule the live object also carries: name (str), action, enabled
(bool), sourceFilter, networkIdFilter. Read an existing rule with get_acl_rule to see
the exact shape for the type you want.
Note: ACL rules are for intra-VLAN/inter-network L3 filtering. For zone-based
perimeter firewall rules, use create_firewall_policy instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| rule | Yes | ||
| site | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||