Manage DNS Entry
manage_dns_entryAdd or remove static DNS records on MikroTik RouterOS by name and type, handling conflicts and supporting dry-run previews.
Instructions
Add or remove a static DNS entry, found by name (case-insensitive) and type. add returns already_exists if such a record already has the requested value and disabled state (and ttl/comment, when given), and throws CONFLICT if it differs; add never creates a second record with the same name and type. remove deletes the one matching record; when several share the name (round-robin), pass address/cname/text to pick one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | TTL value (e.g. 1d, 00:05:00) | |
| name | Yes | Hostname for the DNS record (e.g. server.example.com); matched case-insensitively | |
| text | No | Text value (required for TXT records; on remove, picks the record when several share the name) | |
| type | No | DNS record type | A |
| cname | No | Target hostname (required for CNAME records; on remove, picks the record when several share the name) | |
| action | Yes | Action to perform | |
| dryRun | No | Preview changes without applying. | |
| address | No | IP address (required for A records; on remove, picks the record when several share the name) | |
| comment | No | Optional comment | |
| disabled | No | Whether the entry should be disabled | |
| routerId | No | Router ID; omit to use the default router. | |
| confirmationToken | No | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |