Zones

Zone

A Zone object represents a forward or authoritative DNS Zone.

A Resource Record Set (below as “RRset”) are all records for a given name and type.

Comments are per-RRset.

Zone

Represents a configured zone in the PowerDNS server.

Object Properties:
 
  • id (string) – Opaque zone id (string), assigned by the server, should not be interpreted by the application. Guaranteed to be safe for embedding in URLs.
  • name (string) – Name of the zone (e.g. “example.com.”) MUST have a trailing dot
  • type (string) – Set to “Zone”
  • url (string) – API endpoint for this zone
  • kind (string) – Zone kind, one of “Native”, “Forwarded”.
  • rrsets ([RRSet]) – RRSets in this zone
  • servers ([str]) – For zones of type “Forwarded”, addresses to send the queries to
  • recursion_desired (bool) – For zones of type “Forwarded”, Whether or not the RD bit should be set in the query
  • notify_allowed (bool) – For zones of type “Forwarded”, Whether or not to permit incoming NOTIFY to wipe cache for the domain

To properly process new zones, the following conditions must be true:

  • forward-zones, forward-zones-recurse and/or auth-zones settings must be set (possibly to the empty string) in a configuration file. These settings must not be overridden on the command line. Setting these options on the command line will override what has been set in the dynamically generated configuration files.
  • For configuration changes to work include-dir and api-config-dir should have the same value for old-style settings. When using YAML settings recursor.include_dir and webservice.api_dir must have a different value.

RRSet

RRSet

This represents a Resource Record set (all records with the same name and type).

Object Properties:
 
  • name (string) – Name for record set (e.g. “www.powerdns.com.”)
  • type (string) – Type of this record (e.g. “A”, “PTR”, “MX”)
  • ttl (integer) – DNS TTL of the records, in seconds. MUST NOT be included when changetype is set to “DELETE”.
  • changetype (string) – MUST be added when updating the RRSet. Must be REPLACE or DELETE. With DELETE, all existing RRs matching name and type will be deleted, including all comments. With REPLACE: when records is present, all existing RRs matching name and type will be deleted, and then new records given in records will be created. If no records are left, any existing comments will be deleted as well. When comments is present, all existing comments for the RRs matching name and type will be deleted, and then new comments given in comments will be created.
  • records ([RREntry]) – All records in this RRSet. When updating records, this is the list of new records (replacing the old ones). Must be empty when changetype is set to DELETE. An empty list results in deletion of all records (and comments).
  • comments ([Comment]) – List of Comment. Must be empty when changetype is set to DELETE. An empty list results in deletion of all comments. modified_at is optional and defaults to the current server time.

RREntry

RREntry

The RREntry object represents a single record in an RRSet.

Object Properties:
 
  • content (string) – The content of this record
  • disabled (bool) – Whether or not this record is disabled
  • set-ptr (bool) – If set to true, the server will find the matching reverse zone and create a PTR there. Existing PTR records are replaced. If no matching reverse Zone, an error is thrown. Only valid in client bodies, only valid for A and AAAA types. Not returned by the server. This feature (set-ptr) has been removed in 4.4.0.

Comment

Comment
Object Properties:
 
  • content (string) – The actual comment
  • account (string) – Name of an account that added the comment
  • modified_at (integer) – Timestamp of the last change to the comment