Skip to content

update_port_forward

Patch fields on an existing port-forward rule.

Side effects:

  • Modifies the named forward in place. Only fields supplied in updates change.
  • Takes effect immediately on the next inbound packet.
  • Mutates controller state. Use dry_run=True to preview the change without applying.
update_port_forward(forward_id="65f...", updates={"enabled": False})
ParameterTypeRequiredDefaultDescription
forward_idstringyesThe _id from list_port_forwards.
updatesobjectyesPartial record. Common keys: enabled, fwd_port, dst_port, proto, src, fwd, name.
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalsePreview the change without applying it. Returns the predicted change set.