delete_vlan
delete_vlan
Section titled “delete_vlan”Preview deletion of a VLAN/network.
v0.7.0: this tool no longer deletes on its own. It returns a preview
envelope with a token; call confirm_destructive_action(token)
to commit the delete. Tokens expire after 5 minutes.
Side effects:
- None until
confirm_destructive_actionruns against the token. - On confirm: removes the network record. Any WLANs, firewall rules, or DHCP reservations still referencing it must be detached first or the controller will reject the request. Clients on this VLAN lose connectivity.
dry_run=Truereturns the legacywould_deleteenvelope with no token — purely informational, no commit step possible.
Example
Section titled “Example”delete_vlan(network_id="65f...")Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
network_id | string | yes | — | The _id from list_networks. |
controller | string | no | ”default” | Name of the UniFi controller to target. Defaults to "default". |
dry_run | boolean | no | false | True skips token generation and returns the legacy {"dry_run": true, ...} envelope. False (default) generates a preview token that must be confirmed. |