logging
Creates, updates, deletes, gets or lists a logging resource.
Overview
| Name | logging |
| Type | Resource |
| Id | cloudflare.zero_trust.logging |
Fields
The following fields are returned by SELECT queries:
- list
Logging settings retrieval response.
| Name | Datatype | Description |
|---|---|---|
redact_pii | boolean | Indicate whether to redact personally identifiable information from activity logging (PII fields include source IP, user email, user ID, device ID, URL, referrer, and user agent). |
settings_by_rule_type | object | Configure logging settings for each rule type. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | account_id | Retrieve the current logging settings for the Zero Trust account. | |
update | replace | account_id | Update logging settings for the current Zero Trust account. |
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. |
SELECT examples
- list
Retrieve the current logging settings for the Zero Trust account.
SELECT
redact_pii,
settings_by_rule_type
FROM cloudflare.zero_trust.logging
WHERE account_id = '{{ account_id }}' -- required
;
REPLACE examples
- update
Update logging settings for the current Zero Trust account.
REPLACE cloudflare.zero_trust.logging
SET
redact_pii = {{ redact_pii }},
settings_by_rule_type = '{{ settings_by_rule_type }}'
WHERE
account_id = '{{ account_id }}' --required
RETURNING
errors,
messages,
result,
success;