account
Creates, updates, deletes, gets or lists an account resource.
Overview
| Name | account |
| Type | Resource |
| Id | cloudflare.dns.account |
Fields
The following fields are returned by SELECT queries:
- list
Show DNS Settings response
| Name | Datatype | Description |
|---|---|---|
enforce_dns_only | boolean | When enabled, forces all proxied DNS records in the account to behave as DNS-only at the edge, regardless of each record's individual proxy setting. Note that this account-level override does not modify the records themselves; it only affects how they are served at the edge. See more on Enforce DNS-only. |
zone_defaults | object |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | account_id | Show DNS settings for an account | |
edit | update | account_id | Update DNS settings for an account |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
SELECT examples
- list
Show DNS settings for an account
SELECT
enforce_dns_only,
zone_defaults
FROM cloudflare.dns.account
WHERE account_id = '{{ account_id }}' -- required
;
UPDATE examples
- edit
Update DNS settings for an account
UPDATE cloudflare.dns.account
SET
enforce_dns_only = {{ enforce_dns_only }},
zone_defaults = '{{ zone_defaults }}'
WHERE
account_id = '{{ account_id }}' --required
RETURNING
errors,
messages,
result,
success;