unifi_console_switch_port
Preview, then apply, a setting change to one port on one UniFi switch, with safety checks, approval, and automatic rollback if connections break.
Instructions
Preview, then apply, a change to ONE port of ONE switch. Tier C: a wrong setting on an uplink, AP or console port can strand it.
Two steps, always: confirm=false returns a read-only preview (only that port's before/after, how the port is classified: uplink, infrastructure, client or unused, what is connected, warnings, errors, a fingerprint); then call again with the same fields plus confirm=true, that fingerprint and an approval_note. The console needs the whole port list on every save, so the tool sends every other port back exactly as read and checks afterwards that none of them changed. Risky fields (PoE, VLANs, isolation, BPDU guard, flow control, storm control) on uplink and infrastructure ports are refused unless acknowledge_infrastructure=true; a name change is always allowed. After a change every device that was connected must still be connected, otherwise the previous settings are put back automatically, once. Disabling a port, STP edge mode, port profiles and the other switch settings are not offered. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'switch_port' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |