custom_topics
Creates, updates, deletes, gets or lists a custom_topics resource.
Overview
| Name | custom_topics |
| Type | Resource |
| Id | cloudflare.zones.custom_topics |
Fields
The following fields are returned by SELECT queries:
- list
Get Firewall for AI custom topics response.
| Name | Datatype | Description |
|---|---|---|
label | string | Unique label identifier. Must contain only lowercase letters (a–z), digits (0–9), and hyphens. (example: credit-cards) |
topic | string | Description of the topic category. Must contain only printable ASCII characters. (example: credit card numbers) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | zone_id | Get the Firewall for AI custom topic categories for a zone. | |
firewall_for_ai_custom_topics_put | replace | zone_id | Set the Firewall for AI custom topic categories for a zone. A maximum of 20 custom topics can be configured per zone. Each topic label must be 2–20 characters using only lowercase letters (a–z), digits (0–9), and hyphens. Each topic description must be 2–50 printable ASCII characters. Changes can take up to a minute to propagate to the zone. |
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 |
|---|---|---|
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- list
Get the Firewall for AI custom topic categories for a zone.
SELECT
label,
topic
FROM cloudflare.zones.custom_topics
WHERE zone_id = '{{ zone_id }}' -- required
;
REPLACE examples
- firewall_for_ai_custom_topics_put
Set the Firewall for AI custom topic categories for a zone. A maximum of 20 custom topics can be configured per zone. Each topic label must be 2–20 characters using only lowercase letters (a–z), digits (0–9), and hyphens. Each topic description must be 2–50 printable ASCII characters. Changes can take up to a minute to propagate to the zone.
REPLACE cloudflare.zones.custom_topics
SET
topics = '{{ topics }}'
WHERE
zone_id = '{{ zone_id }}' --required
RETURNING
errors,
messages,
result,
success;