Skip to content

set_threat_management

Update Threat Management (IDS/IPS) configuration.

Side effects:

  • Patches the controller’s ips setting record. When enabled=False the mode is forced to off; the controller then disables packet inspection on every network. When enabled=True, mode selects detection-only (ids) or inline blocking (ips).
  • Untouched fields (signature categories, network bindings, ad blocking, DNS filtering) are preserved by the controller’s merge semantics. Supplying signature_categories replaces the active list wholesale; None leaves it unchanged.
  • Mutates controller state. Use dry_run=True to preview the change.
set_threat_management(enabled=True, mode="ips")
ParameterTypeRequiredDefaultDescription
enabledbooleanyesTrue activates inspection; False sets mode=off and overrides any mode argument.
modestringno”ids”When enabled=True, one of "ids" (detection-only, default) or "ips" (inline blocking). Ignored when enabled=False.
signature_categories`arraynull`nonull
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalsePreview the change without applying it. Returns the predicted patch envelope.