Skip to content

delete_static_dhcp_lease

Preview deletion of a static DHCP reservation.

v0.7.0: this tool no longer deletes on its own. It returns a preview envelope with a token; call confirm_destructive_action(token) to commit the delete. Tokens expire after 5 minutes.

Side effects:

  • None until confirm_destructive_action runs against the token.
  • On confirm: removes the fixed-IP entry. The client returns to dynamic DHCP on its next renewal and may receive a different address.
  • dry_run=True returns the legacy would_delete envelope with no token — purely informational, no commit step possible.
delete_static_dhcp_lease(lease_id="65f...")
ParameterTypeRequiredDefaultDescription
lease_idstringyesThe _id from list_dhcp_leases.
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalseTrue skips token generation and returns the legacy {"dry_run": true, ...} envelope. False (default) generates a preview token that must be confirmed.