Zones

Zone

A Zone object represents an 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

RRSet

RRSet

This represents a Resource Record set (all record 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.

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