overrides
Creates, updates, deletes, gets or lists an overrides resource.
Overview
| Name | overrides |
| Type | Resource |
| Id | cloudflare.firewall.overrides |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get a WAF override response
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the WAF override. (example: de677e5818985db1285d0e80225f06e5) |
description | string | An informative summary of the current URI-based WAF override. (example: Enable Cloudflare Magento ruleset for shop.example.com) |
groups | object | An object that allows you to enable or disable WAF rule groups for the current WAF override. Each key of this object must be the ID of a WAF rule group, and each value must be a valid WAF action (usually default or disable). When creating a new URI-based WAF override, you must provide a groups object or a rules object. |
paused | boolean | When true, indicates that the rule is currently paused. |
priority | number | The relative priority of the current URI-based WAF override when multiple overrides match a single URL. A lower number indicates higher priority. Higher priority overrides may overwrite values set by lower priority overrides. |
rewrite_action | object | Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object. |
rules | object | An object that allows you to override the action of specific WAF rules. Each key of this object must be the ID of a WAF rule, and each value must be a valid WAF action. Unless you are disabling a rule, ensure that you also enable the rule group that this WAF rule belongs to. When creating a new URI-based WAF override, you must provide a groups object or a rules object. |
urls | array | The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. |
List WAF overrides response
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the WAF override. (example: de677e5818985db1285d0e80225f06e5) |
description | string | An informative summary of the current URI-based WAF override. (example: Enable Cloudflare Magento ruleset for shop.example.com) |
groups | object | An object that allows you to enable or disable WAF rule groups for the current WAF override. Each key of this object must be the ID of a WAF rule group, and each value must be a valid WAF action (usually default or disable). When creating a new URI-based WAF override, you must provide a groups object or a rules object. |
paused | boolean | When true, indicates that the rule is currently paused. |
priority | number | The relative priority of the current URI-based WAF override when multiple overrides match a single URL. A lower number indicates higher priority. Higher priority overrides may overwrite values set by lower priority overrides. |
rewrite_action | object | Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object. |
rules | object | An object that allows you to override the action of specific WAF rules. Each key of this object must be the ID of a WAF rule, and each value must be a valid WAF action. Unless you are disabling a rule, ensure that you also enable the rule group that this WAF rule belongs to. When creating a new URI-based WAF override, you must provide a groups object or a rules object. |
urls | array | The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | overrides_id, zone_id | Fetches the details of a URI-based WAF override. Note: Applies only to the previous version of WAF managed rules. | |
list | select | zone_id | page, per_page | Fetches the URI-based WAF overrides in a zone. Note: Applies only to the previous version of WAF managed rules. |
create | insert | zone_id, urls | Creates a URI-based WAF override for a zone. Note: Applies only to the previous version of WAF managed rules. | |
update | replace | overrides_id, zone_id, id, urls, rules, rewrite_action | Updates an existing URI-based WAF override. Note: Applies only to the previous version of WAF managed rules. | |
delete | delete | overrides_id, zone_id | Deletes an existing URI-based WAF override. 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.
| Name | Datatype | Description |
|---|---|---|
overrides_id | string | |
zone_id | string | The Cloudflare zone ID. |
page | number | |
per_page | number |
SELECT examples
- get
- list
Fetches the details of a URI-based WAF override. Note: Applies only to the previous version of WAF managed rules.
SELECT
id,
description,
groups,
paused,
priority,
rewrite_action,
rules,
urls
FROM cloudflare.firewall.overrides
WHERE overrides_id = '{{ overrides_id }}' -- required
AND zone_id = '{{ zone_id }}' -- required
;
Fetches the URI-based WAF overrides in a zone. Note: Applies only to the previous version of WAF managed rules.
SELECT
id,
description,
groups,
paused,
priority,
rewrite_action,
rules,
urls
FROM cloudflare.firewall.overrides
WHERE zone_id = '{{ zone_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;
INSERT examples
- create
- Manifest
Creates a URI-based WAF override for a zone. Note: Applies only to the previous version of WAF managed rules.
INSERT INTO cloudflare.firewall.overrides (
urls,
zone_id
)
SELECT
'{{ urls }}' /* required */,
'{{ zone_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: overrides
props:
- name: zone_id
value: "{{ zone_id }}"
description: Required parameter for the overrides resource.
- name: urls
value:
- "{{ urls }}"
description: |
The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.
REPLACE examples
- update
Updates an existing URI-based WAF override. Note: Applies only to the previous version of WAF managed rules.
REPLACE cloudflare.firewall.overrides
SET
id = '{{ id }}',
rewrite_action = '{{ rewrite_action }}',
rules = '{{ rules }}',
urls = '{{ urls }}'
WHERE
overrides_id = '{{ overrides_id }}' --required
AND zone_id = '{{ zone_id }}' --required
AND id = '{{ id }}' --required
AND urls = '{{ urls }}' --required
AND rules = '{{ rules }}' --required
AND rewrite_action = '{{ rewrite_action }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Deletes an existing URI-based WAF override. Note: Applies only to the previous version of WAF managed rules.
DELETE FROM cloudflare.firewall.overrides
WHERE overrides_id = '{{ overrides_id }}' --required
AND zone_id = '{{ zone_id }}' --required
;