Skip to content

CloudflareDns

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/dns.ts:16

The Cloudflare implementation of the dns capability; finds a domain’s zone by walking from the domain up to its apex.

  • Dns

new CloudflareDns(client, accountId?): CloudflareDns

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/dns.ts:25

() => object

string

CloudflareDns

readonly key: "dns"

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/dns.ts:18

The capability this class provides, always "dns".

Dns.key


readonly providerName: "cloudflare" = "cloudflare"

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/dns.ts:20

The provider name, "cloudflare".

Dns.providerName

deleteRecord(domain, id): Promise<void>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/dns.ts:90

Deletes the DNS record with this id from the zone that holds the domain.

string

string

Promise<void>

Dns.deleteRecord


ensureRelaySource(input): Promise<EnsureRelaySourceResult>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/dns.ts:31

Makes the Cloudflare notification webhook and the policies that send to it for a relay source; needs the account id.

EnsureRelaySourceInput

Promise<EnsureRelaySourceResult>

Dns.ensureRelaySource


inspectRelaySource(input): Promise<RelaySourceState>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/dns.ts:36

Reads the relay source’s notification webhook and its policies back, changing nothing.

InspectRelaySourceInput

Promise<RelaySourceState>

Dns.inspectRelaySource


listRecords(domain): Promise<DnsRecord[]>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/dns.ts:52

Lists the DNS records in the zone that holds the domain.

string

Promise<DnsRecord[]>

Dns.listRecords


upsertRecord(domain, record): Promise<DnsRecord>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/dns.ts:59

Updates the first record of the same type and name, or creates the record when there is none; returns the stored record.

string

DnsRecord

Promise<DnsRecord>

Dns.upsertRecord


whoami(): Promise<{ ok: boolean; zones: number; }>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/dns.ts:96

holocron doctor has no specific domain to check — lists every zone the token can see instead.

Promise<{ ok: boolean; zones: number; }>

Dns.whoami