Skip to main content

configs_allowlist

Creates, updates, deletes, gets or lists a configs_allowlist resource.

Overview

Nameconfigs_allowlist
TypeResource
Idcloudflare.ddos_protection.configs_allowlist

Fields

The following fields are returned by SELECT queries:

Get allowlist prefix response.

NameDatatypeDescription
idstringThe unique ID of the allowlist prefix.
commentstringAn optional comment describing the allowlist prefix.
created_onstring (date-time)The creation timestamp of the allowlist prefix.
enabledbooleanWhether to enable the allowlist prefix into effect. Defaults to false.
modified_onstring (date-time)The last modification timestamp of the allowlist prefix.
prefixstringThe allowlist prefix in CIDR format.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, prefix_idGet an allowlist prefix specified by the given UUID.
editupdateaccount_id, prefix_idUpdate an allowlist prefix specified by the given UUID.
deletedeleteaccount_id, prefix_idDelete the allowlist prefix for an account given a UUID.

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.
prefix_idstringThe IP prefix ID.

SELECT examples

Get an allowlist prefix specified by the given UUID.

SELECT
id,
comment,
created_on,
enabled,
modified_on,
prefix
FROM cloudflare.ddos_protection.configs_allowlist
WHERE account_id = '{{ account_id }}' -- required
AND prefix_id = '{{ prefix_id }}' -- required
;

UPDATE examples

Update an allowlist prefix specified by the given UUID.

UPDATE cloudflare.ddos_protection.configs_allowlist
SET
comment = '{{ comment }}',
enabled = {{ enabled }}
WHERE
account_id = '{{ account_id }}' --required
AND prefix_id = '{{ prefix_id }}' --required
RETURNING
errors,
messages,
result,
success;

DELETE examples

Delete the allowlist prefix for an account given a UUID.

DELETE FROM cloudflare.ddos_protection.configs_allowlist
WHERE account_id = '{{ account_id }}' --required
AND prefix_id = '{{ prefix_id }}' --required
;