class Pdns::API::Endpoints::Zones

Defined in:

pdns/api/endpoints/zones.cr

Instance Method Summary

Constructor methods inherited from class Pdns::API::Endpoint

new(api : API, base_path : String) new

Instance Method Detail

def axfr_retrieve(id : String) : Void #

Retrieve slave zone from its master.

Fails when zone kind is not Slave, or slave is disabled in the configuration.


[View source]
def create(zone : Zone, *, rrsets : Bool? = nil) : Zone #

Creates a new domain

rrsets - set to false to exclude rrsets from the response


[View source]
def delete(id : String) : Void #

Deletes this zone, all attached metadata and rrsets.


[View source]
def edit_metadata(id : String, &block : Zone -> ) : Void #

Modifies basic zone data (metadata).

NOTE Switching dnssec to true (from false) sets up DNSSEC signing based on the other flags, this includes running the equivalent of secure-zone and rectify-zone (if api_rectify is set to true). This also applies to newly created zones. If presigned is true, no DNSSEC changes will be made to the zone or cryptokeys.


[View source]
def edit_rrsets(id : String, &block : Array(RRSet) -> ) : Void #

Creates/modifies/deletes RRSets

Make sure to call delete! or replace! on existing RRSets


[View source]
def export(id : String) : String #

Returns the zone in AXFR format.


[View source]
def get(id : String) : Zone #

Get a zone managed by a server


[View source]
def list : Array(Zone) #

List all Zones in a server


[View source]
def notify(id : String) : Void #

Send a DNS NOTIFY to all slaves.

Fails when zone kind is not Master or Slave, or master and slave are disabled in the configuration. Only works for Slave if renotify is on.


[View source]
def rectify(id : String) : Void #

Rectify the zone data.

This does not take into account the API-RECTIFY metadata. Fails on slave zones and zones that do not have DNSSEC.


[View source]
def with(id : String, &block : Scoped -> T) : T forall T #

[View source]