This function edits a DNS zone record. To effectively use this function, use the following workflow:
dumpzone
function on the DNS zone record to edit.Line
value that corresponds to the data to edit.editzonerecord
parameters.Important:
swapip
script or the setsiteip
function instead.Note:
On servers that run CentOS 7, you may see a named
warning about the absence of SPF resource records on DNS.
bind-9.9.4-23.el7
, which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors.Important:
When you disable the DNS role, the system disables this function.
The updated DNS Zone Record.
string or string The record's class. If you do not use this parameter, the system retains the current setting. | |
domain required | string <domain> The zone record's domain. |
line required | integer >= 1 The zone record's file line number. |
name | string <domain> The record's name. If you do not use this parameter, the system retains the current setting. Note: Do not omit any necessary trailing periods. |
ttl required | integer >= 1 The record's Time To Live (TTL), in seconds. |
type | string The DNS record type:
If you do not use this parameter, the system retains the current setting. Warning: Additional properties may be required based on the When you call this function, you must include the additional parameters for the desired zone record type if you use this parameter. Select a zone record from the menu to view the required additional parameters: |
address required | string <ipv4> |
HTTP Request was successful.
object |
class=IN&domain=example.com&line=24&name=hostname.example.com.&ttl=86400&type=A&address=192.168.0.20
{- "metadata": {
- "command": "editzonerecord",
- "reason": "Bind reloading on hostname using rndc zone: [example.com]\n",
- "result": 1,
- "version": 1
}
}