Safe Haskell | None |
---|---|
Language | Haskell2010 |
Implementation of the API endpoints described at PowerDNS Zones API
Synopsis
- data ZonesAPI f = ZonesAPI {
- apiListZones :: f :- ("servers" :> (Capture "server_id" Text :> ("zones" :> (QueryParam "zone" Text :> (QueryParam "dnssec" Bool :> Get '[JSON] [Zone])))))
- apiCreateZone :: f :- ("servers" :> (Capture "server_id" Text :> ("zones" :> (QueryParam "rrset" Bool :> (ReqBody '[JSON] Zone :> PostCreated '[JSON] Zone)))))
- apiGetZone :: f :- ("servers" :> (Capture "server_id" Text :> ("zones" :> (Capture "zone_id" Text :> (QueryParam "rrsets" Bool :> Get '[JSON] Zone)))))
- apiDeleteZone :: f :- ("servers" :> (Capture "server_id" Text :> ("zones" :> (Capture "zone_id" Text :> DeleteNoContent))))
- apiUpdateRecords :: f :- ("servers" :> (Capture "server_id" Text :> ("zones" :> (Capture "zone_id" Text :> (ReqBody '[JSON] RRSets :> PatchNoContent)))))
- apiUpdateZone :: f :- ("servers" :> (Capture "server_id" Text :> ("zones" :> (Capture "zone_id" Text :> (ReqBody '[JSON] Zone :> PutNoContent)))))
- apiTriggerAxfr :: f :- ("servers" :> (Capture "server_id" Text :> ("zones" :> (Capture "zone_id" Text :> ("axfr-retrieve" :> Put '[JSON] NoContent)))))
- apiNotifySlaves :: f :- ("servers" :> (Capture "server_id" Text :> ("zones" :> (Capture "zone_id" Text :> ("notify" :> Put '[JSON] NoContent)))))
- apiGetZoneAxfr :: f :- ("servers" :> (Capture "server_id" Text :> ("zones" :> (Capture "zone_id" Text :> ("export" :> Get '[JSON] Text)))))
- apiRectifyZone :: f :- ("servers" :> (Capture "server_id" Text :> ("zones" :> (Capture "zone_id" Text :> ("rectify" :> Put '[JSON] Text)))))
- data Zone = Zone {
- zone_id :: Maybe Text
- zone_name :: Maybe Text
- zone_type :: Maybe Text
- zone_url :: Maybe Text
- zone_kind :: Maybe Kind
- zone_rrsets :: Maybe [RRSet]
- zone_serial :: Maybe Integer
- zone_notified_serial :: Maybe Integer
- zone_edited_serial :: Maybe Integer
- zone_masters :: Maybe [Text]
- zone_dnssec :: Maybe Bool
- zone_nsec3param :: Maybe Text
- zone_nsec3narrow :: Maybe Bool
- zone_presigned :: Maybe Bool
- zone_soa_edit :: Maybe Text
- zone_soa_edit_api :: Maybe Text
- zone_api_rectify :: Maybe Bool
- zone_zone :: Maybe Text
- zone_account :: Maybe Text
- zone_nameservers :: Maybe [Text]
- zone_master_tsig_key_ids :: Maybe [Text]
- zone_slave_tsig_key_ids :: Maybe [Text]
- data Kind
- data RRSets = RRSets {}
- data RRSet = RRSet {}
- data Record = Record {}
- data Comment = Comment {}
- data ChangeType
- data RecordType
- = A
- | AAAA
- | AFSDB
- | ALIAS
- | APL
- | CAA
- | CERT
- | CDNSKEY
- | CDS
- | CNAME
- | DNSKEY
- | DNAME
- | DS
- | HINFO
- | KEY
- | LOC
- | MX
- | NAPTR
- | NS
- | NSEC
- | NSEC3
- | NSEC3PARAM
- | OPENPGPKEY
- | PTR
- | RP
- | RRSIG
- | SOA
- | SPF
- | SSHFP
- | SRV
- | TKEY
- | TSIG
- | TLSA
- | SMIMEA
- | TXT
- | URI
- | A6
- | DHCID
- | DLV
- | EUI48
- | EUI64
- | IPSECKEY
- | KX
- | MAILA
- | MAILB
- | MINFO
- | MR
- | RKEY
- | SIG
- | WKS
API
ZonesAPI | |
|
Instances
Data types
Zone according to PowerDNS Documentation. All fields are optional because the PowerDNS API differs on which fields are required depending on the endpoint.
Zone | |
|
Instances
Instances
Eq Kind Source # | |
Data Kind Source # | |
Defined in PowerDNS.API.Zones gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Kind -> c Kind # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Kind # dataTypeOf :: Kind -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Kind) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Kind) # gmapT :: (forall b. Data b => b -> b) -> Kind -> Kind # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Kind -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Kind -> r # gmapQ :: (forall d. Data d => d -> u) -> Kind -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Kind -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Kind -> m Kind # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Kind -> m Kind # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Kind -> m Kind # | |
Ord Kind Source # | |
Show Kind Source # | |
Generic Kind Source # | |
ToJSON Kind Source # | |
Defined in PowerDNS.API.Zones | |
FromJSON Kind Source # | |
NFData Kind Source # | |
Defined in PowerDNS.API.Zones | |
type Rep Kind Source # | |
Defined in PowerDNS.API.Zones |
A list of RRSets
Instances
Eq RRSets Source # | |
Data RRSets Source # | |
Defined in PowerDNS.API.Zones gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RRSets -> c RRSets # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RRSets # toConstr :: RRSets -> Constr # dataTypeOf :: RRSets -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RRSets) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RRSets) # gmapT :: (forall b. Data b => b -> b) -> RRSets -> RRSets # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RRSets -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RRSets -> r # gmapQ :: (forall d. Data d => d -> u) -> RRSets -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RRSets -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RRSets -> m RRSets # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RRSets -> m RRSets # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RRSets -> m RRSets # | |
Ord RRSets Source # | |
Show RRSets Source # | |
Generic RRSets Source # | |
ToJSON RRSets Source # | |
Defined in PowerDNS.API.Zones | |
FromJSON RRSets Source # | |
NFData RRSets Source # | |
Defined in PowerDNS.API.Zones | |
type Rep RRSets Source # | |
Defined in PowerDNS.API.Zones |
RRSet according to PowerDNS Documentation.
RRSet | |
|
Instances
Eq RRSet Source # | |
Data RRSet Source # | |
Defined in PowerDNS.API.Zones gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RRSet -> c RRSet # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RRSet # dataTypeOf :: RRSet -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RRSet) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RRSet) # gmapT :: (forall b. Data b => b -> b) -> RRSet -> RRSet # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RRSet -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RRSet -> r # gmapQ :: (forall d. Data d => d -> u) -> RRSet -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RRSet -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RRSet -> m RRSet # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RRSet -> m RRSet # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RRSet -> m RRSet # | |
Ord RRSet Source # | |
Show RRSet Source # | |
Generic RRSet Source # | |
ToJSON RRSet Source # | |
Defined in PowerDNS.API.Zones | |
FromJSON RRSet Source # | |
NFData RRSet Source # | |
Defined in PowerDNS.API.Zones | |
type Rep RRSet Source # | |
Defined in PowerDNS.API.Zones type Rep RRSet = D1 ('MetaData "RRSet" "PowerDNS.API.Zones" "powerdns-0.1.1-3L9A3UJCvVEHahQ3GibYwt" 'False) (C1 ('MetaCons "RRSet" 'PrefixI 'True) ((S1 ('MetaSel ('Just "rrset_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "rrset_type") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RecordType) :*: S1 ('MetaSel ('Just "rrset_ttl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) :*: (S1 ('MetaSel ('Just "rrset_changetype") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ChangeType)) :*: (S1 ('MetaSel ('Just "rrset_records") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Record])) :*: S1 ('MetaSel ('Just "rrset_comments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Comment])))))) |
Record according to PowerDNS Documentation
Instances
Eq Record Source # | |
Data Record Source # | |
Defined in PowerDNS.API.Zones gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Record -> c Record # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Record # toConstr :: Record -> Constr # dataTypeOf :: Record -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Record) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Record) # gmapT :: (forall b. Data b => b -> b) -> Record -> Record # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Record -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Record -> r # gmapQ :: (forall d. Data d => d -> u) -> Record -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Record -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Record -> m Record # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Record -> m Record # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Record -> m Record # | |
Ord Record Source # | |
Show Record Source # | |
Generic Record Source # | |
ToJSON Record Source # | |
Defined in PowerDNS.API.Zones | |
FromJSON Record Source # | |
NFData Record Source # | |
Defined in PowerDNS.API.Zones | |
type Rep Record Source # | |
Defined in PowerDNS.API.Zones type Rep Record = D1 ('MetaData "Record" "PowerDNS.API.Zones" "powerdns-0.1.1-3L9A3UJCvVEHahQ3GibYwt" 'False) (C1 ('MetaCons "Record" 'PrefixI 'True) (S1 ('MetaSel ('Just "record_content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "record_disabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) |
Comment according to PowerDNS Documentation
Instances
Eq Comment Source # | |
Data Comment Source # | |
Defined in PowerDNS.API.Zones gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Comment -> c Comment # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Comment # toConstr :: Comment -> Constr # dataTypeOf :: Comment -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Comment) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Comment) # gmapT :: (forall b. Data b => b -> b) -> Comment -> Comment # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Comment -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Comment -> r # gmapQ :: (forall d. Data d => d -> u) -> Comment -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Comment -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Comment -> m Comment # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Comment -> m Comment # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Comment -> m Comment # | |
Ord Comment Source # | |
Show Comment Source # | |
Generic Comment Source # | |
ToJSON Comment Source # | |
Defined in PowerDNS.API.Zones | |
FromJSON Comment Source # | |
NFData Comment Source # | |
Defined in PowerDNS.API.Zones | |
Empty Comment Source # | |
Defined in PowerDNS.API.Zones | |
type Rep Comment Source # | |
Defined in PowerDNS.API.Zones type Rep Comment = D1 ('MetaData "Comment" "PowerDNS.API.Zones" "powerdns-0.1.1-3L9A3UJCvVEHahQ3GibYwt" 'False) (C1 ('MetaCons "Comment" 'PrefixI 'True) (S1 ('MetaSel ('Just "comment_content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "comment_account") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "commant_modified_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime))))) |
data ChangeType Source #
Whether or not an RRSet
replace or delete an existing entry.
If the ChangeType
is left at Nothing
it will create a new domain entry.
Instances
data RecordType Source #