Skip to main content

logging

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

Overview

Namelogging
TypeResource
Idcloudflare.zero_trust.logging

Fields

The following fields are returned by SELECT queries:

Logging settings retrieval response.

NameDatatypeDescription
redact_piibooleanIndicate 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_typeobjectConfigure logging settings for each rule type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_idRetrieve the current logging settings for the Zero Trust account.
updatereplaceaccount_idUpdate 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.

SELECT examples

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 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;