Skip to main content

dex_tests

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

Overview

Namedex_tests
TypeResource
Idcloudflare.zero_trust.dex_tests

Fields

The following fields are returned by SELECT queries:

Device DEX test details response

NameDatatypeDescription
namestringThe name of the DEX test. Must be unique. (example: HTTP dash health check)
test_idstringThe unique identifier for the test. (example: 372e67954025e0ba6aaa6d586b9e0b59)
dataobjectThe configuration object which contains the details for the WARP client to conduct the test.
descriptionstringAdditional details about the test. (example: Checks the dash endpoint every 30 minutes)
enabledbooleanDetermines whether or not the test is active.
intervalstringHow often the test will run. (example: 30m)
target_policiesarrayDEX rules targeted by this test
targetedboolean (x-stainless-terraform-configurability: computed)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, dex_test_idFetch a single DEX test.
listselectaccount_idpage, per_page, testName, kindFetch all DEX tests
createinsertaccount_id, name, interval, enabled, dataCreate a DEX test.
updatereplaceaccount_id, dex_test_id, name, interval, enabled, dataUpdate a DEX test.
deletedeleteaccount_id, dex_test_idDelete a Device DEX test. Returns the remaining device dex tests for the 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.
dex_test_idstring
kindstringFilter by test type
pagenumberPage number of paginated results
per_pagenumberNumber of items per page
testNamestringFilter by test name

SELECT examples

Fetch a single DEX test.

SELECT
name,
test_id,
data,
description,
enabled,
interval,
target_policies,
targeted
FROM cloudflare.zero_trust.dex_tests
WHERE account_id = '{{ account_id }}' -- required
AND dex_test_id = '{{ dex_test_id }}' -- required
;

INSERT examples

Create a DEX test.

INSERT INTO cloudflare.zero_trust.dex_tests (
data,
description,
enabled,
interval,
name,
target_policies,
targeted,
account_id
)
SELECT
'{{ data }}' /* required */,
'{{ description }}',
{{ enabled }} /* required */,
'{{ interval }}' /* required */,
'{{ name }}' /* required */,
'{{ target_policies }}',
{{ targeted }},
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

REPLACE examples

Update a DEX test.

REPLACE cloudflare.zero_trust.dex_tests
SET
data = '{{ data }}',
description = '{{ description }}',
enabled = {{ enabled }},
interval = '{{ interval }}',
name = '{{ name }}',
target_policies = '{{ target_policies }}',
targeted = {{ targeted }}
WHERE
account_id = '{{ account_id }}' --required
AND dex_test_id = '{{ dex_test_id }}' --required
AND name = '{{ name }}' --required
AND interval = '{{ interval }}' --required
AND enabled = {{ enabled }} --required
AND data = '{{ data }}' --required
RETURNING
errors,
messages,
result,
success;

DELETE examples

Delete a Device DEX test. Returns the remaining device dex tests for the account.

DELETE FROM cloudflare.zero_trust.dex_tests
WHERE account_id = '{{ account_id }}' --required
AND dex_test_id = '{{ dex_test_id }}' --required
;