Skip to main content

health

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

Overview

Namehealth
TypeResource
Idcloudflare.load_balancers.health

Fields

The following fields are returned by SELECT queries:

Pool Health Details response.

NameDatatypeDescription
pool_idstringPool ID. (example: 17b5962d775c646f3f9725cbc7a53df4)
pop_healthobjectList of regions and associated health status.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_accountselectpool_id, account_idFetch the latest pool health status for a single pool.
list_by_userselectpool_idFetch the latest pool health status for a single pool.
createinsertpool_id, account_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
account_idstringThe Cloudflare account ID.
pool_idstringThe Load Balancer pool ID.

SELECT examples

Fetch the latest pool health status for a single pool.

SELECT
pool_id,
pop_health
FROM cloudflare.load_balancers.health
WHERE pool_id = '{{ pool_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;

INSERT examples

Preview pool health using provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.

INSERT INTO cloudflare.load_balancers.health (
allow_insecure,
consecutive_down,
consecutive_up,
description,
expected_body,
expected_codes,
follow_redirects,
header,
interval,
method,
path,
port,
probe_zone,
retries,
timeout,
type,
pool_id,
account_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 }}',
'{{ pool_id }}',
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;