Skip to main content

Cloudflare/dns

@swamp/cloudflare/dnsv2026.06.08.2· 28d agoMODELS
01README

Cloudflare dns infrastructure models

02Release Notes
  • Updated: dns_firewall
  • Updated: dns_records
  • Updated: views
03Models3
dns_firewall.tsv2026.06.08.2

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
attack_mitigation?objectAttack mitigation settings
deprecate_any_requests?booleanWhether to refuse to answer queries for the ANY type
ecs_fallback?booleanWhether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent
maximum_cache_ttl?numberBy default, Cloudflare attempts to cache responses for as long as\nindicated by the TTL received from upstream nameservers. This setting\nsets an upper bound on this duration. For caching purposes, higher TTLs\nwill be decreased to the maximum value defined by this setting.\n\nThis setting does not affect the TTL value in the DNS response\nCloudflare returns to clients. Cloudflare will always forward the TTL\nvalue received from upstream nameservers.\n
minimum_cache_ttl?numberBy default, Cloudflare attempts to cache responses for as long as\nindicated by the TTL received from upstream nameservers. This setting\nsets a lower bound on this duration. For caching purposes, lower TTLs\nwill be increased to the minimum value defined by this setting.\n\nThis setting does not affect the TTL value in the DNS response\nCloudflare returns to clients. Cloudflare will always forward the TTL\nvalue received from upstream nameservers.\n\nNote that, even with this setting, there is no guarantee that a\nresponse will be cached for at least the specified duration. Cached\nresponses may be removed earlier for capacity or other operational\nreasons.\n
name?stringDNS Firewall cluster name
negative_cache_ttl?numberThis setting controls how long DNS Firewall should cache negative\nresponses (e.g., NXDOMAIN) from the upstream servers.\n\nThis setting does not affect the TTL value in the DNS response\nCloudflare returns to clients. Cloudflare will always forward the TTL\nvalue received from upstream nameservers.\n
ratelimit?numberMaximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting.
retries?numberNumber of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt)
upstream_ips?array
dns_firewall_ip_count?numberNumber of IPv4 addresses to assign to the DNS Firewall cluster. Only used during cluster creation and cannot be changed later.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Dns Firewall
fn get(id: string)
Get a Dns Firewall
ArgumentTypeDescription
idstringThe ID of the Dns Firewall
fn update()
Update Dns Firewall attributes
fn delete(id: string)
Delete the Dns Firewall
ArgumentTypeDescription
idstringThe ID of the Dns Firewall
fn sync()
Sync Dns Firewall state from Cloudflare
dns_records.tsv2026.06.08.1

Global Arguments

ArgumentTypeDescription
zone_idstringCloudflare zone ID
comment?stringComments or notes about the DNS record. This field has no effect on DNS responses.
name?stringComplete DNS record name, including the zone name, in Punycode.
proxied?booleanWhether the record is receiving the performance and security benefits of Cloudflare.
settings?objectSettings for the DNS record.
tags?arrayCustom tags for the DNS record. This field has no effect on DNS responses.
ttl?number
content?stringA valid IPv4 address.
private_routing?booleanEnables private network routing to the origin.
type?enumRecord type.
priority?numberRequired for MX and URI records; ignored for other record types (but may still be returned by the API). Records with lower priorities are preferred. This field is to be deprecated in favor of the priority field within the data map.
data?objectComponents of a CAA record.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Dns Records
fn get(id: string)
Get a Dns Records
ArgumentTypeDescription
idstringThe ID of the Dns Records
fn update()
Update Dns Records attributes
fn delete(id: string)
Delete the Dns Records
ArgumentTypeDescription
idstringThe ID of the Dns Records
fn sync()
Sync Dns Records state from Cloudflare
views.tsv2026.06.08.1

Global Arguments

ArgumentTypeDescription
account_idstringCloudflare account ID
created_time?stringWhen the view was created.
modified_time?stringWhen the view was last modified.
name?stringThe name of the view.
zones?arrayThe list of zones linked to this view.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Views
fn get(id: string)
Get a Views
ArgumentTypeDescription
idstringThe ID of the Views
fn update()
Update Views attributes
fn delete(id: string)
Delete the Views
ArgumentTypeDescription
idstringThe ID of the Views
fn sync()
Sync Views state from Cloudflare
04Previous Versions2
2026.05.29.1May 29, 2026
  • Updated: dns_firewall
  • Updated: dns_records
  • Updated: views
2026.05.22.1May 22, 2026
  • Added: dns_firewall
  • Added: dns_records
  • Added: views
05Stats
A
100 / 100
Downloads
2
Archive size
17.3 KB
Verified by Swamp
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels