Skip to main content

settings

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

Overview

Namesettings
TypeResource
Idcloudflare.zones.settings

Fields

The following fields are returned by SELECT queries:

Get zone setting response

NameDatatypeDescription
idstringID of the zone setting. (0rtt) (example: 0rtt)
editablebooleanWhether or not this setting can be modified for this zone (based on your Cloudflare plan level). (true, false)
enabledbooleanssl-recommender enrollment setting.
modified_onstring (date-time)last time this setting was modified. (example: 2014-01-01T05:20:00.12345Z)
time_remainingnumberValue of the zone setting. Notes: The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is false.
valuestringCurrent value of the zone setting. (on, off) (example: on, default: off)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectzone_id, setting_idFetch a single zone setting by name
editupdatezone_id, setting_idUpdates a single zone setting by the identifier
zone_settings_edit_zone_settings_infoupdatezone_idEdit settings for a zone.
firewall_for_ai_settings_putreplacezone_idEnable or disable Firewall for AI for a zone. 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
setting_idstring
zone_idstringThe Cloudflare zone ID.

SELECT examples

Fetch a single zone setting by name

SELECT
id,
editable,
enabled,
modified_on,
time_remaining,
value
FROM cloudflare.zones.settings
WHERE zone_id = '{{ zone_id }}' -- required
AND setting_id = '{{ setting_id }}' -- required
;

UPDATE examples

Updates a single zone setting by the identifier

UPDATE cloudflare.zones.settings
SET
enabled = {{ enabled }},
value = '{{ value }}'
WHERE
zone_id = '{{ zone_id }}' --required
AND setting_id = '{{ setting_id }}' --required
RETURNING
errors,
messages,
result,
success;

REPLACE examples

Enable or disable Firewall for AI for a zone. Changes can take up to a minute to propagate to the zone.

REPLACE cloudflare.zones.settings
SET
enabled = {{ enabled }}
WHERE
zone_id = '{{ zone_id }}' --required
RETURNING
errors,
messages,
result,
success;