rules
Creates, updates, deletes, gets or lists a rules resource.
Overview
| Name | rules |
| Type | Resource |
| Id | cloudflare.zero_trust.rules |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
bulk_edit | update | account_id, new_priorities | Reorders DLP email scanning rules by updating their priority values. Higher priority rules are evaluated first. | |
reset_expiration | exec | rule_id, account_id | Resets the expiration of a Zero Trust Gateway Rule if its duration elapsed and it has a default duration. The Zero Trust Gateway Rule must have values for both expiration.expires_at and expiration.duration. |
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 |
|---|---|---|
account_id | string | The Cloudflare account ID. |
rule_id | string | The rule ID. |
UPDATE examples
- bulk_edit
Reorders DLP email scanning rules by updating their priority values. Higher priority rules are evaluated first.
UPDATE cloudflare.zero_trust.rules
SET
new_priorities = '{{ new_priorities }}'
WHERE
account_id = '{{ account_id }}' --required
AND new_priorities = '{{ new_priorities }}' --required
RETURNING
errors,
messages,
result,
success;
Lifecycle Methods
- reset_expiration
Resets the expiration of a Zero Trust Gateway Rule if its duration elapsed and it has a default duration. The Zero Trust Gateway Rule must have values for both expiration.expires_at and expiration.duration.
EXEC cloudflare.zero_trust.rules.reset_expiration
@rule_id='{{ rule_id }}' --required,
@account_id='{{ account_id }}' --required
;