set_teleport_enabled
set_teleport_enabled
Section titled “set_teleport_enabled”Toggle the Teleport VPN listener.
Side effects:
- Patches the
teleportsetting record’senabledfield. WhenFalse, the controller tears down the listener and disconnects any active sessions. Registered clients (via the mobile app) remain registered and reconnect once the listener is re-enabled. - Mutates controller state. Use dry_run=True to preview.
Example
Section titled “Example”set_teleport_enabled(enabled=True)Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | boolean | yes | — | True activates the listener; False disables it. |
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. |