create_dynamic_dns
create_dynamic_dns
Section titled “create_dynamic_dns”Create a Dynamic DNS update configuration.
Side effects:
- Adds a DDNS config: the gateway will push the WAN IP to
serviceforhost_namewhenever the WAN address changes. Takes effect immediately (the gateway sends an update on the next IP check). - Mutates controller state. Use dry_run=True to preview the change without applying.
Example
Section titled “Example”create_dynamic_dns(service="namecheap", host_name="home.example.com", login="example.com", password="<token>")Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
service | string | yes | — | Provider keyword (e.g. "dyndns", "namecheap", "cloudflare", "noip", or "custom"). |
host_name | string | yes | — | The FQDN to keep pointed at the WAN IP ("home.example.com"). |
login | string | yes | — | Provider account / username. For some providers (e.g. Namecheap) this is the zone/domain. |
password | string | yes | — | Provider password or API token. Stored write-only and redacted in reads. |
server | string | no | "" | Custom update-URL host. Only used (and required) when service == "custom"; leave empty otherwise. |
interface | string | no | ”wan” | WAN interface whose IP is tracked. Defaults to "wan" (the primary WAN on a single-WAN gateway). |
enabled | boolean | no | true | False creates the config disabled for staging. |
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 (with the password redacted). |