Skip to main content

preview

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

Overview

Namepreview
TypeResource
Idcloudflare.load_balancers.preview

Fields

The following fields are returned by SELECT queries:

Preview Result response.

NameDatatypeDescription
errorsarray
messagesarray
resultobjectResulting health data from a preview operation.
successbooleanWhether the API call was successful. (true)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpreview_idGet the result of a previous preview operation using the provided preview_id.
load_balancer_monitors_preview_monitorinsertmonitor_idPreview pools using the specified monitor with provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.
load_balancer_pools_preview_poolinsertpool_idPreview pool health using provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.

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
monitor_idstringThe Load Balancer monitor ID.
pool_idstringThe Load Balancer pool ID.
preview_idstring

SELECT examples

Get the result of a previous preview operation using the provided preview_id.

SELECT
errors,
messages,
result,
success
FROM cloudflare.load_balancers.preview
WHERE preview_id = '{{ preview_id }}' -- required
;

INSERT examples

Preview pools using the specified monitor with provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.

INSERT INTO cloudflare.load_balancers.preview (
allow_insecure,
consecutive_down,
consecutive_up,
description,
expected_body,
expected_codes,
follow_redirects,
header,
interval,
method,
path,
port,
probe_zone,
retries,
timeout,
type,
monitor_id
)
SELECT
{{ allow_insecure }},
{{ consecutive_down }},
{{ consecutive_up }},
'{{ description }}',
'{{ expected_body }}',
'{{ expected_codes }}',
{{ follow_redirects }},
'{{ header }}',
{{ interval }},
'{{ method }}',
'{{ path }}',
{{ port }},
'{{ probe_zone }}',
{{ retries }},
{{ timeout }},
'{{ type }}',
'{{ monitor_id }}'
RETURNING
errors,
messages,
result,
success
;