cloudflare-api-0.1.0.0: Haskell bindings for the Cloudflare API
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.Cloudflare.DNS.Record

Synopsis

Documentation

createDNSRecord Source #

Arguments

:: DNSRecord record 
=> CloudflareAuth 
-> Text

Zone Identifier

-> CreateDNSRecord record 
-> IO (Either String (ResultResponse (DNSRecordEntry record))) 

Create a new DNS record for a zone

listDNSRecords Source #

Arguments

:: CloudflareAuth 
-> Text

Zone Identifier

-> IO (Either String (ResultWithInfo [DNSEntry])) 

List DNS records for a zone

exportDNSRecords Source #

Arguments

:: CloudflareAuth 
-> Text

Zone identifier

-> IO Text

Exported BIND zone file

Export a zone's DNS records in BIND format

importDNSRecords Source #

Arguments

:: CloudflareAuth 
-> Text

Zone identifier

-> Text

Bind config

-> Bool

If true, proxy the DNS record through Cloudflare

-> IO (Either String (ResultResponse ImportResponse)) 

Import DNS records in BIND format

scanDNSRecords Source #

Arguments

:: CloudflareAuth 
-> Text

Zone identifier

-> IO (Either String (ResultResponse ImportResponse)) 

Scan DNS records for a zone

deleteDNSRecord Source #

Arguments

:: CloudflareAuth 
-> Text

Zone identifier

-> Text

DNS identifier

-> IO (Either String (ResultOnly DNSIdentifier)) 

Delete a DNS record

dnsRecordDetails Source #

Arguments

:: CloudflareAuth 
-> Text

Zone identifier

-> Text

DNS identifier

-> IO (Response (ResultResponse DNSEntry)) 

Get a single DNS record for

patchDNSRecord Source #

Arguments

:: DNSRecord record 
=> CloudflareAuth 
-> Text

Zone identifier

-> Text

DNS identifier

-> CreateDNSRecord record 
-> IO (Either String (ResultResponse DNSEntry)) 

Patch a DNS record

updateDNSRecord Source #

Arguments

:: DNSRecord record 
=> CloudflareAuth 
-> Text

Zone identifier

-> Text

DNS identifier

-> CreateDNSRecord record 
-> IO (Either String (ResultResponse DNSEntry)) 

Update a DNS record

data DNSEntry Source #

withDNSEntry :: (forall record. DNSRecord record => DNSRecordEntry record -> a) -> DNSEntry -> a Source #

class DNSRecord record where Source #

Methods

dnsRecordToJSON Source #

Arguments

:: record 
-> [Pair]

Type of the record and a list the fields of the record

dnsRecordType Source #

Arguments

:: record 
-> Text

DNS record type

dnsRecordParse Source #

Arguments

:: Object 
-> Parser record

Parse the fields of the record

Instances

Instances details
DNSRecord AAAARecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord ARecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord CAARecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord CERTRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord CNAMERecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord DNSKEYRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord DSRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord HTTPSRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord LOCRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord MXRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord NAPTRRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord NSRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord PTRRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord SMIMEARecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord SRVRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord SSHFPRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord SVCBRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord TLSARecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord TXTRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

DNSRecord URIRecord Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

data DNSRecordEntry record Source #

DNS entries returned by the Cloudflare API

Constructors

DNSRecordEntry 

Fields

Instances

Instances details
DNSRecord record => FromJSON (DNSRecordEntry record) Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

Methods

parseJSON :: Value -> Parser (DNSRecordEntry record)

parseJSONList :: Value -> Parser [DNSRecordEntry record]

omittedField :: Maybe (DNSRecordEntry record)

Show record => Show (DNSRecordEntry record) Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

Eq record => Eq (DNSRecordEntry record) Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

Methods

(==) :: DNSRecordEntry record -> DNSRecordEntry record -> Bool Source #

(/=) :: DNSRecordEntry record -> DNSRecordEntry record -> Bool Source #

Ord record => Ord (DNSRecordEntry record) Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

Methods

compare :: DNSRecordEntry record -> DNSRecordEntry record -> Ordering Source #

(<) :: DNSRecordEntry record -> DNSRecordEntry record -> Bool Source #

(<=) :: DNSRecordEntry record -> DNSRecordEntry record -> Bool Source #

(>) :: DNSRecordEntry record -> DNSRecordEntry record -> Bool Source #

(>=) :: DNSRecordEntry record -> DNSRecordEntry record -> Bool Source #

max :: DNSRecordEntry record -> DNSRecordEntry record -> DNSRecordEntry record Source #

min :: DNSRecordEntry record -> DNSRecordEntry record -> DNSRecordEntry record Source #

data CreateDNSRecord record Source #

Create a new DNS record for a zone

Constructors

CreateDNSRecord 

Fields

Instances

Instances details
DNSRecord record => ToJSON (CreateDNSRecord record) Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

Methods

toJSON :: CreateDNSRecord record -> Value

toEncoding :: CreateDNSRecord record -> Encoding

toJSONList :: [CreateDNSRecord record] -> Value

toEncodingList :: [CreateDNSRecord record] -> Encoding

omitField :: CreateDNSRecord record -> Bool

Show record => Show (CreateDNSRecord record) Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

Eq record => Eq (CreateDNSRecord record) Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

Methods

(==) :: CreateDNSRecord record -> CreateDNSRecord record -> Bool Source #

(/=) :: CreateDNSRecord record -> CreateDNSRecord record -> Bool Source #

Ord record => Ord (CreateDNSRecord record) Source # 
Instance details

Defined in Network.Cloudflare.DNS.Record

data ARecord Source #

RFC 1035 A record

Constructors

ARecord 

Fields

data CAARecord Source #

RFC 6844 CAA record

Constructors

CAARecord 

Fields

  • caaRecordFlags :: Word8

    Flags for the CAA record see RFC 6844 section 1

  • caaRecordTag :: Text

    Name of the property controlled by this record (e.g.: issue, issuewild, iodef). TODO make a specific type

  • caaRecordValue :: Text

    Value of the record. This field's semantics depend on the chosen tag.

data CERTRecord Source #

RFC4398 CERT record

Constructors

CERTRecord 

Fields

data DNSKEYRecord Source #

RFC4034 DNSKEY record, defined in section 2

Constructors

DNSKEYRecord 

Fields

data DSRecord Source #

RFC4034 DS record, defined in section 5.1

Constructors

DSRecord 

Fields

data HTTPSRecord Source #

Defined in section 1.2 of draft-ietf-dnsop-svcb-https-12, it shares the same structure as the SVCB record

Constructors

HTTPSRecord 

Fields

data LOCRecord Source #

RFC 1876 LOC record, defined in section 2

Constructors

LOCRecord 

Fields

data MXRecord Source #

RFC 1035 MX record, defined in section 3.3.9

Constructors

MXRecord 

Fields

data NAPTRRecord Source #

RFC 3403 NAPTR, Name Authority Pointer record

Constructors

NAPTRRecord 

Fields

data NSRecord Source #

RFC 1035 NS, name server record defined in section 3.3.11

Constructors

NSRecord 

Fields

data PTRRecord Source #

RFC 1035 PTR, pointer record defined in section 3.3.12

Constructors

PTRRecord 

Fields

data SRVRecord Source #

RFC 2782 SRV, service record

Constructors

SRVRecord 

Fields

data SVCBRecord Source #

draft-ietf-dnsop-svcb-https-12 SVCB record

Constructors

SVCBRecord 

Fields

data TLSARecord Source #

RFC 6698 TLSA record, defined in section 2

Constructors

TLSARecord 

Fields

  • tlsaRecordCertificate :: Text

    Certificate, either raw data (full certificate or SubjectPublicKeyInfo based on the selector) for matching type 0, or the hash of the raw certificate data for types 1 and 2. The hash is in binary form, not hex-encoded. Defined in section 2.1.4

  • tlsaRecordMatchingType :: Word8

    Matching type specifies how the certificate association is presented, defined in section 2.1.3

  • tlsaRecordSelector :: Word8

    Selector the part of the TLS certificate to match against, defined in section 2.1.2

  • tlsaRecordUsage :: Word8

    Usage of the certificate, defined in section 2.1.1

data TXTRecord Source #

RFC 1035 TXT record, defined in section 3.3.14

Constructors

TXTRecord 

Fields

data URIRecord Source #

RFC 7553 URI record

Constructors

URIRecord 

Fields