Skip to main content

rules

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

Overview

Namerules
TypeResource
Idcloudflare.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:

NameAccessible byRequired ParamsOptional ParamsDescription
bulk_editupdateaccount_id, new_prioritiesReorders DLP email scanning rules by updating their priority values. Higher priority rules are evaluated first.
reset_expirationexecrule_id, account_idResets 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
rule_idstringThe rule ID.

UPDATE examples

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

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
;