Skip to main content

acls

Creates, updates, deletes, gets or lists an acls resource.

Overview

Nameacls
TypeResource
Idcloudflare.dns.acls

Fields

The following fields are returned by SELECT queries:

ACL Details response.

NameDatatypeDescription
idstring (example: 23ff594956f20c2a721606e94745a8aa)
namestringThe name of the acl. (example: my-acl-1)
ip_rangestringAllowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively. (example: 192.0.2.53/28)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectacl_id, account_idGet ACL.
listselectaccount_idList ACLs.
createinsertaccount_id, name, ip_rangeCreate ACL.
updatereplaceacl_id, account_id, name, ip_rangeModify ACL.
deletedeleteacl_id, account_idDelete ACL.

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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
acl_idstring

SELECT examples

Get ACL.

SELECT
id,
name,
ip_range
FROM cloudflare.dns.acls
WHERE acl_id = '{{ acl_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;

INSERT examples

Create ACL.

INSERT INTO cloudflare.dns.acls (
ip_range,
name,
account_id
)
SELECT
'{{ ip_range }}' /* required */,
'{{ name }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

REPLACE examples

Modify ACL.

REPLACE cloudflare.dns.acls
SET
ip_range = '{{ ip_range }}',
name = '{{ name }}'
WHERE
acl_id = '{{ acl_id }}' --required
AND account_id = '{{ account_id }}' --required
AND name = '{{ name }}' --required
AND ip_range = '{{ ip_range }}' --required
RETURNING
errors,
messages,
result,
success;

DELETE examples

Delete ACL.

DELETE FROM cloudflare.dns.acls
WHERE acl_id = '{{ acl_id }}' --required
AND account_id = '{{ account_id }}' --required
;