update_vlan
update_vlan
Section titled “update_vlan”Patch fields on an existing VLAN/network record.
Side effects:
- Modifies the named network in place. Only fields supplied in
updateschange; everything else is preserved. - Changes to
vlanorip_subnetmay disconnect clients on the affected network. - Mutates controller state. Use dry_run=True to preview the change without applying.
Example
Section titled “Example”update_vlan(network_id="65f...", updates={"enabled": False})Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
network_id | string | yes | — | The _id from list_networks. |
updates | object | yes | — | Partial network record. Common keys: name, vlan, ip_subnet, dhcpd_start, dhcpd_stop, enabled, mdns_enabled (toggle the per-VLAN mDNS reflector independently of network creation), purpose. |
controller | string | no | ”default” | Name of the UniFi controller to target. Defaults to "default". |
dry_run | boolean | no | false | Preview the change without applying it. Returns the predicted change set. |