block_client
block_client
Section titled “block_client”Block a client by MAC so it cannot rejoin until unblocked.
Side effects:
- Adds the MAC to the controller’s user-block list. The client is
immediately disconnected and prevented from re-associating on any
SSID until
unblock_clientis called. - Mutates controller state. Use dry_run=True to preview the change without applying.
Example
Section titled “Example”block_client(mac="aa:bb:cc:00:00:01")Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
mac | string | yes | — | Client MAC address (e.g. "aa:bb:cc:00:00:01"). |
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. |