class Pdns::RRSet
- Pdns::RRSet
- Reference
- Object
Overview
This represents a Resource Record Set (all records with the same name and type).
Included Modules
- JSON::Serializable
Defined in:
pdns/rrset.crConstructors
- .new(pull : JSON::PullParser)
-
.new(*, name, type, changetype = ChangeType::Replace, ttl = nil, records = nil, comments = nil)
Initialize an RRSet with the given attributes
Instance Method Summary
-
#changetype : ChangeType?
MUST be added when updating the RRSet.
-
#changetype=(changetype : ChangeType?)
MUST be added when updating the RRSet.
-
#comments : Array(Comment)?
List of Comment.
-
#comments=(comments : Array(Comment)?)
List of Comment.
-
#delete!
Sets changetype to
ChangeType::Delete
-
#name : String
Name for record set (e.g.
-
#name=(name : String)
Name for record set (e.g.
-
#records : Array(Record)?
All records in this RRSet.
-
#records=(records : Array(Record)?)
All records in this RRSet.
-
#replace!
Sets changetype to
ChangeType::Replace
-
#ttl : UInt32?
DNS TTL of the records, in seconds.
-
#ttl=(ttl : UInt32?)
DNS TTL of the records, in seconds.
-
#type : DNSRecordType
Type of this record (e.g.
-
#type=(type : DNSRecordType)
Type of this record (e.g.
Constructor Detail
Initialize an RRSet with the given attributes
RRSet.new(
name: "www.powerdns.com.",
type: "A",
ttl: 3600_u32,
records: [Record.new("127.0.0.1")],
comments: [Comment.new(content: "Testing", account: "Tester")]
)
Instance Method Detail
MUST be added when updating the RRSet. Must be ChangeType::Replace
or
ChangeType::Delete
.
With ChangeType::Delete
, all existing RRs matching name and type will
be deleted, including all comments.
With ChangeType::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.
MUST be added when updating the RRSet. Must be ChangeType::Replace
or
ChangeType::Delete
.
With ChangeType::Delete
, all existing RRs matching name and type will
be deleted, including all comments.
With ChangeType::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.
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.
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.
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).
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).
DNS TTL of the records, in seconds. MUST NOT be included when changetype is set to "DELETE”.
DNS TTL of the records, in seconds. MUST NOT be included when changetype is set to "DELETE”.