Skip to main content

configuration

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

Overview

Nameconfiguration
TypeResource
Idcloudflare.billing.configuration

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
bot_overridesobject
enabledboolean
price_usd_microcentsinteger

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectzone_idGets the pay-per-crawl config for a zone including the bot configuration.
pay_per_crawl_create_configinsertzone_idCreates the pay-per-crawl config for a zone.
pay_per_crawl_patch_configupdatezone_idChanges the pay-per-crawl config for a 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

Gets the pay-per-crawl config for a zone including the bot configuration.

SELECT
bot_overrides,
enabled,
price_usd_microcents
FROM cloudflare.billing.configuration
WHERE zone_id = '{{ zone_id }}' -- required
;

INSERT examples

Creates the pay-per-crawl config for a zone.

INSERT INTO cloudflare.billing.configuration (
bot_overrides,
enabled,
price_usd_microcents,
zone_id
)
SELECT
'{{ bot_overrides }}',
{{ enabled }},
{{ price_usd_microcents }},
'{{ zone_id }}'
RETURNING
errors,
messages,
result,
result_info,
success
;

UPDATE examples

Changes the pay-per-crawl config for a zone.

UPDATE cloudflare.billing.configuration
SET
bot_overrides = '{{ bot_overrides }}',
enabled = {{ enabled }},
price_usd_microcents = {{ price_usd_microcents }}
WHERE
zone_id = '{{ zone_id }}' --required
RETURNING
errors,
messages,
result,
result_info,
success;