Skip to main content

custom_topics

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

Overview

Namecustom_topics
TypeResource
Idcloudflare.zones.custom_topics

Fields

The following fields are returned by SELECT queries:

Get Firewall for AI custom topics response.

NameDatatypeDescription
labelstringUnique label identifier. Must contain only lowercase letters (a–z), digits (0–9), and hyphens. (example: credit-cards)
topicstringDescription of the topic category. Must contain only printable ASCII characters. (example: credit card numbers)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectzone_idGet the Firewall for AI custom topic categories for a zone.
firewall_for_ai_custom_topics_putreplacezone_idSet 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.

NameDatatypeDescription
zone_idstringThe Cloudflare zone ID.

SELECT examples

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

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;