Skip to main content

groups

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

Overview

Namegroups
TypeResource
Idcloudflare.firewall.groups

Fields

The following fields are returned by SELECT queries:

Get a WAF rule group 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
getselectgroup_id, package_id, zone_idFetches the details of a WAF rule group. Note: Applies only to the previous version of WAF managed rules.
listselectpackage_id, zone_idmode, page, per_page, order, direction, match, name, rules_countFetches the WAF rule groups in a WAF package. Note: Applies only to the previous version of WAF managed rules.
editupdategroup_id, package_id, zone_idUpdates a WAF rule group. You can update the state (mode parameter) of a rule group. 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
group_idstringThe Access group ID.
package_idstring
zone_idstringThe Cloudflare zone ID.
directionstring
matchstring
modestring
namestring
orderstring
pagenumber
per_pagenumber
rules_countnumber

SELECT examples

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

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

UPDATE examples

Updates a WAF rule group. You can update the state (mode parameter) of a rule group. Note: Applies only to the previous version of WAF managed rules.

UPDATE cloudflare.firewall.groups
SET
mode = '{{ mode }}'
WHERE
group_id = '{{ group_id }}' --required
AND package_id = '{{ package_id }}' --required
AND zone_id = '{{ zone_id }}' --required
RETURNING
errors,
messages,
result,
success;