DNSResourceRecord objects

A DNSResourceRecord object represents a resource record in the DNS. Creating a DNSResourceRecord is done with the newDRR().

Functions and methods of a DNSResourceRecord

newDRR(name, type, ttl, content[, domainId[, auth]]) → DNSResourceRecord

Returns a new DNSResourceRecord object. .. todo describe the auth param

  • name (DNSName) – The name to the new record
  • type (string) – The name to create a DNSName for
  • ttl (int) – The TTL of the record
  • content (string) – The content of the record
  • domainId (int) – The optional domain ID of the zone the record belongs to
  • auth (int) –


name = newDN("www.example.org.")
rr = new DRR(name, "IN", 3600, )
class DNSResourceRecord

A DNSResourceRecord object represents a DNS record.

DNSResourceRecord:toString() -> string

Returns the full content of the record as a string

DNSResourceRecord:qname() -> DNSName

Returns the name of the record

DNSResourceRecord:wildcardName() -> DNSName

Returns the wildcard name of the record the record was matched against

DNSResourceRecord:content() -> string

Returns what the record points to

DNSResourceRecord:lastModified() -> int

If unzero, last time this record was changed

DNSResourceRecord:ttl() -> int

TTL (Time To Live) of this record

DNSResourceRecord:signttl() -> int

If non-zero, TTL that will be used in the RRSIG of the record

DNSResourceRecord:domainId() -> int

Backend related domain ID of the zone the record belongs to

DNSResourceRecord:qtype() -> int

Type of the record (A, CNAME, MX, …)

DNSResourceRecord:qclass() -> int

Class of the record (IN, CH, …)

DNSResourceRecord:scopeMask() -> int
DNSResourceRecord:auth() -> bool
DNSResourceRecord:disabled() -> bool