Skip to main content

posture

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

Overview

Nameposture
TypeResource
Idcloudflare.zero_trust.posture

Fields

The following fields are returned by SELECT queries:

Get device posture rule details response.

NameDatatypeDescription
idstringAPI UUID. (example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415)
namestringThe name of the device posture rule. (example: Admin Serial Numbers)
descriptionstringThe description of the device posture rule. (example: The rule for admin serial numbers)
expirationstringSets the expiration time for a posture check result. If empty, the result remains valid until it is overwritten by new data from the WARP client. (example: 1h)
inputobjectThe value to be checked against. (title: File Check)
matcharrayThe conditions that the client must match to run the rule.
schedulestringPolling frequency for the WARP client posture check. Default: 5m (poll every five minutes). Minimum: 1m. (example: 1h)
typestringThe type of device posture rule. (file, application, tanium, gateway, warp, disk_encryption, serial_number, sentinelone, carbonblack, firewall, os_version, domain_joined, client_certificate, client_certificate_v2, antivirus, unique_client_id, kolide, tanium_s2s, crowdstrike_s2s, intune, workspace_one, sentinelone_s2s, custom_s2s) (example: file)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectrule_id, account_idFetches a single device posture rule.
listselectaccount_idFetches device posture rules for a Zero Trust account.
createinsertaccount_id, name, typeCreates a new device posture rule.
updatereplacerule_id, account_id, name, typeUpdates a device posture rule.
deletedeleterule_id, account_idDeletes a device posture rule.

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.

SELECT examples

Fetches a single device posture rule.

SELECT
id,
name,
description,
expiration,
input,
match,
schedule,
type
FROM cloudflare.zero_trust.posture
WHERE rule_id = '{{ rule_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;

INSERT examples

Creates a new device posture rule.

INSERT INTO cloudflare.zero_trust.posture (
description,
expiration,
input,
match,
name,
schedule,
type,
account_id
)
SELECT
'{{ description }}',
'{{ expiration }}',
'{{ input }}',
'{{ match }}',
'{{ name }}' /* required */,
'{{ schedule }}',
'{{ type }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

REPLACE examples

Updates a device posture rule.

REPLACE cloudflare.zero_trust.posture
SET
description = '{{ description }}',
expiration = '{{ expiration }}',
input = '{{ input }}',
match = '{{ match }}',
name = '{{ name }}',
schedule = '{{ schedule }}',
type = '{{ type }}'
WHERE
rule_id = '{{ rule_id }}' --required
AND account_id = '{{ account_id }}' --required
AND name = '{{ name }}' --required
AND type = '{{ type }}' --required
RETURNING
errors,
messages,
result,
success;

DELETE examples

Deletes a device posture rule.

DELETE FROM cloudflare.zero_trust.posture
WHERE rule_id = '{{ rule_id }}' --required
AND account_id = '{{ account_id }}' --required
;