Skip to main content

configs_prefixes

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

Overview

Nameconfigs_prefixes
TypeResource
Idcloudflare.ddos_protection.configs_prefixes

Fields

The following fields are returned by SELECT queries:

Get prefix response.

NameDatatypeDescription
idstringThe unique ID of the prefix.
commentstringA comment describing the prefix.
created_onstring (date-time)The creation timestamp of the prefix.
excludedbooleanWhether to exclude the prefix from protection.
modified_onstring (date-time)The last modification timestamp of the prefix.
prefixstringThe prefix in CIDR format. (example: 192.0.2.0/24)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, prefix_idGet a prefix specified by the given UUID.
editupdateaccount_id, prefix_idUpdate a prefix specified by the given UUID.
deletedeleteaccount_id, prefix_idDelete the 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 a prefix specified by the given UUID.

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

UPDATE examples

Update a prefix specified by the given UUID.

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

DELETE examples

Delete the prefix for an account given a UUID.

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