configs_prefixes
Creates, updates, deletes, gets or lists a configs_prefixes resource.
Overview
| Name | configs_prefixes |
| Type | Resource |
| Id | cloudflare.ddos_protection.configs_prefixes |
Fields
The following fields are returned by SELECT queries:
- get
Get prefix response.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the prefix. |
comment | string | A comment describing the prefix. |
created_on | string (date-time) | The creation timestamp of the prefix. |
excluded | boolean | Whether to exclude the prefix from protection. |
modified_on | string (date-time) | The last modification timestamp of the prefix. |
prefix | string | The prefix in CIDR format. (example: 192.0.2.0/24) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, prefix_id | Get a prefix specified by the given UUID. | |
edit | update | account_id, prefix_id | Update a prefix specified by the given UUID. | |
delete | delete | account_id, prefix_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
prefix_id | string | The IP prefix ID. |
SELECT examples
- get
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
- edit
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
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
;