Skip to main content

packages

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

Overview

Namepackages
TypeResource
Idcloudflare.firewall.packages

Fields

The following fields are returned by SELECT queries:

Get a WAF package response

NameDatatypeDescription
errorsarray
messagesarray
resultobject
successbooleanDefines whether the API call was successful. (true)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpackage_id, zone_idFetches the details of a WAF package. Note: Applies only to the previous version of WAF managed rules.
listselectzone_idpage, per_page, order, direction, match, nameFetches WAF packages for a zone. Note: Applies only to the previous version of WAF managed rules.
waf_packages_update_a_waf_packageupdatepackage_id, zone_idUpdates a WAF package. You can update the sensitivity and the action of an anomaly detection WAF package. Note: Applies only to the previous version of WAF managed rules.

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
package_idstring
zone_idstringThe Cloudflare zone ID.
directionstring
matchstring
namestring
orderstring
pagenumber
per_pagenumber

SELECT examples

Fetches the details of a WAF package. Note: Applies only to the previous version of WAF managed rules.

SELECT
errors,
messages,
result,
success
FROM cloudflare.firewall.packages
WHERE package_id = '{{ package_id }}' -- required
AND zone_id = '{{ zone_id }}' -- required
;

UPDATE examples

Updates a WAF package. You can update the sensitivity and the action of an anomaly detection WAF package. Note: Applies only to the previous version of WAF managed rules.

UPDATE cloudflare.firewall.packages
SET
action_mode = '{{ action_mode }}',
sensitivity = '{{ sensitivity }}'
WHERE
package_id = '{{ package_id }}' --required
AND zone_id = '{{ zone_id }}' --required
RETURNING
errors,
messages,
result,
success;