update_traffic_route
update_traffic_route
Section titled “update_traffic_route”Patch fields on an existing traffic route (read-modify-write).
Side effects:
- Modifies the named policy route in place. The v2 PUT replaces the whole object, so this reads the current route first and merges your changes onto it before writing — only the keys you supply change.
- Changes where matched traffic is routed (and, via
kill_switch_enabled, whether it is dropped when the route’s interface is down). Takes effect immediately. - Mutates controller state. Use dry_run=True to preview the change without applying.
Example
Section titled “Example”update_traffic_route(route_id="65f...", kill_switch_enabled=True)Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
route_id | string | yes | — | The _id from list_traffic_routes. |
updates | `object | null` | no | null |
kill_switch_enabled | `boolean | null` | no | null |
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. |