DNSRecord objects¶
A DNSRecord object represents a record.
Creating a DNSRecord is done with the newDR().
Functions and methods of a DNSRecord¶
- class DNSRecord¶
A
DNSRecordobject represents a DNS record.- place¶
The place where the record is located, you can use the following constants
pdns.place.QUESTION for the question section
pdns.place.ANSWER for the answer section
pdns.place.AUTHORITY for the authority section
pdns.place.ADDITIONAL for the additional section
- ttl¶
The TTL of the record
- type¶
The type of the record (as an integer). Can for example be compared to
pdns.A
- DNSRecord:getContent() -> string
Return a string representation of the record content
- DNSRecord:getCA() -> ComboAddress
If the record type is A or AAAA, a
ComboAddressrepresenting the content is returned, nil otherwise
- DNSRecord:changeContent(newcontent)
Replace the record content with
newcontent. The type and class cannot be changed.- Parameters:¶
- newcontent : str
The replacing content