Skip to content

update_vlan

Patch fields on an existing VLAN/network record.

Side effects:

  • Modifies the named network in place. Only fields supplied in updates change; everything else is preserved.
  • Changes to vlan or ip_subnet may disconnect clients on the affected network.
  • Mutates controller state. Use dry_run=True to preview the change without applying.
update_vlan(network_id="65f...", updates={"enabled": False})
ParameterTypeRequiredDefaultDescription
network_idstringyesThe _id from list_networks.
updatesobjectyesPartial 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.
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalsePreview the change without applying it. Returns the predicted change set.