create_dns_policy
Create a new DNS policy on a specified UniFi site by supplying host, site, and policy details. Define the policy type and network scope to enforce DNS rules across your fabric.
Instructions
Create a new DNS policy 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). The remaining fields are type-specific
and enforced by the controller.
policy: for a typical policy also include a name and the network scope; read an
existing policy with get_dns_policy to confirm the exact shape for the type you want.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| site | Yes | ||
| policy | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||