class Pdns::Zone

Overview

This represents an authoritative DNS Zone.

Included Modules

Defined in:

pdns/zone.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, name, kind, rrsets = [] of RRSet, masters = nil, dnssec = nil, nsec3param = nil, nsec3narrow = nil, presigned = nil, soa_edit = nil, soa_edit_api = nil, api_rectify = nil, zone = nil, account = nil, nameservers = [] of String, master_tsig_key_ids = nil, slave_tsig_key_ids = nil) #

Initialize a new Zone with the given attributes

Zone.new(
  name: "powerdns.com.",
  kind: Zone::Kind::Master,
  rrsets: [
    RRSet.new(
      name: "www.powerdns.com.",
      kind: Zone::Kind::Native,
      type: "A",
      ttl: 3600_u16,
      changetype: "REPLACE",
      records: [Record.new("127.0.0.1")],
    ),
  ],
  soa_edit_api: "DEFAULT",
)

[View source]

Instance Method Detail

def account : String? #

MAY be set. Its value is defined by local policy


[View source]
def account=(account : String?) #

MAY be set. Its value is defined by local policy


[View source]
def api_rectify=(api_rectify : Bool?) #

Whether or not the zone will be rectified on data changes via the API


[View source]
def api_rectify? : Bool? #

Whether or not the zone will be rectified on data changes via the API


[View source]
def dnssec=(dnssec : Bool?) #

Whether or not this zone is DNSSEC signed (inferred from presigned being true XOR presence of at least one cryptokey with active being true)


[View source]
def dnssec? : Bool? #

Whether or not this zone is DNSSEC signed (inferred from presigned being true XOR presence of at least one cryptokey with active being true)


[View source]
def edited_serial : UInt64? #

The SOA serial as seen in query responses. Calculated using the SOA-EDIT metadata, default-soa-edit and default-soa-edit-signed settings


[View source]
def edited_serial? : UInt64 | Nil? #

The SOA serial as seen in query responses. Calculated using the SOA-EDIT metadata, default-soa-edit and default-soa-edit-signed settings


[View source]
def 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.


[View source]
def id? : String | Nil? #

Opaque zone id (string), assigned by the server, should not be interpreted by the application. Guaranteed to be safe for embedding in URLs.


[View source]
def kind : Kind? #

Zone kind, one of Kind::Native, Kind::Master, Kind::Slave


def kind=(kind : Kind?) #

Zone kind, one of Kind::Native, Kind::Master, Kind::Slave


[View source]
def kind? : Kind | Nil? #

Zone kind, one of Kind::Native, Kind::Master, Kind::Slave


def master_tsig_key_ids : Array(String)? #

The id of the TSIG keys used for master operation in this zone

See: https://doc.powerdns.com/authoritative/tsig.html#provisioning-outbound-axfr-access


[View source]
def master_tsig_key_ids=(master_tsig_key_ids : Array(String)?) #

The id of the TSIG keys used for master operation in this zone

See: https://doc.powerdns.com/authoritative/tsig.html#provisioning-outbound-axfr-access


[View source]
def masters : Array(String)? #

List of IP addresses configured as a master for this zone ("Slave" type zones only)


[View source]
def masters=(masters : Array(String)?) #

List of IP addresses configured as a master for this zone ("Slave" type zones only)


[View source]
def name : String? #

Name of the zone (e.g. "example.com.") MUST have a trailing dot


[View source]
def name=(name : String?) #

Name of the zone (e.g. "example.com.") MUST have a trailing dot


[View source]
def nameservers : Array(String)? #

MAY be sent in client bodies during creation, and MUST NOT be sent by the server. Simple list of strings of nameserver names, including the trailing dot. Not required for slave zones.


[View source]
def nameservers=(nameservers : Array(String)?) #

MAY be sent in client bodies during creation, and MUST NOT be sent by the server. Simple list of strings of nameserver names, including the trailing dot. Not required for slave zones.


[View source]
def notified_serial : UInt64? #

The SOA serial notifications have been sent out for


[View source]
def notified_serial? : UInt64 | Nil? #

The SOA serial notifications have been sent out for


[View source]
def nsec3narrow=(nsec3narrow : Bool?) #

Whether or not the zone uses NSEC3 narrow


[View source]
def nsec3narrow? : Bool? #

Whether or not the zone uses NSEC3 narrow


[View source]
def nsec3param : String? #

The NSEC3PARAM record


[View source]
def nsec3param=(nsec3param : String?) #

The NSEC3PARAM record


[View source]
def presigned=(presigned : Bool?) #

Whether or not the zone is pre-signed


[View source]
def presigned? : Bool? #

Whether or not the zone is pre-signed


[View source]
def rrsets : Array(RRSet)? #

RRSets in this zone (for zones/{zone_id} endpoint only; omitted during GET on the .../zones list endpoint)


def rrsets=(rrsets : Array(RRSet)?) #

RRSets in this zone (for zones/{zone_id} endpoint only; omitted during GET on the .../zones list endpoint)


[View source]
def rrsets? : Array(RRSet) | Nil? #

RRSets in this zone (for zones/{zone_id} endpoint only; omitted during GET on the .../zones list endpoint)


def serial : UInt64? #

The SOA serial number


[View source]
def serial? : UInt64 | Nil? #

The SOA serial number


[View source]
def slave_tsig_key_ids : Array(String)? #

The id of the TSIG keys used for slave operation in this zone

See: https://doc.powerdns.com/authoritative/tsig.html#provisioning-signed-notification-and-axfr-requests


[View source]
def slave_tsig_key_ids=(slave_tsig_key_ids : Array(String)?) #

The id of the TSIG keys used for slave operation in this zone

See: https://doc.powerdns.com/authoritative/tsig.html#provisioning-signed-notification-and-axfr-requests


[View source]
def soa_edit : String? #

The SOA-EDIT metadata item


[View source]
def soa_edit=(soa_edit : String?) #

The SOA-EDIT metadata item


[View source]
def soa_edit_api : String? #

The SOA-EDIT-API metadata item


[View source]
def soa_edit_api=(soa_edit_api : String?) #

The SOA-EDIT-API metadata item


[View source]
def type : String? #

Set to "Zone”


def type=(type : String?) #

Set to "Zone”


[View source]
def type? : String | Nil? #

Set to "Zone”


def url : String? #

API endpoint for this zone


def url=(url : String?) #

API endpoint for this zone


[View source]
def url? : String | Nil? #

API endpoint for this zone


def zone : String? #

MAY contain a BIND-style zone file when creating a zone


[View source]
def zone=(zone : String?) #

MAY contain a BIND-style zone file when creating a zone


[View source]