Skip to main content

checks

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

Overview

Namechecks
TypeResource
Iddigitalocean.uptime.checks

Fields

NameDatatypeDescription
idstringA unique ID that can be used to identify and reference the check.
namestringA human-friendly display name.
enabledbooleanA boolean value indicating whether the check is enabled/disabled.
regionsarrayAn array containing the selected regions to perform healthchecks from.
targetstringThe endpoint to perform healthchecks on.
typestringThe type of health check to perform.

Methods

NameAccessible byRequired ParamsDescription
uptime_get_checkSELECTcheck_idTo show information about an existing check, send a GET request to /v2/uptime/checks/$CHECK_ID.
uptime_list_checksSELECTTo list all of the Uptime checks on your account, send a GET request to /v2/uptime/checks.
uptime_create_checkINSERTTo create an Uptime check, send a POST request to /v2/uptime/checks specifying the attributes in the table below in the JSON body.
uptime_delete_checkDELETEcheck_idTo delete an Uptime check, send a DELETE request to /v2/uptime/checks/$CHECK_ID. A 204 status code with no body will be returned in response to a successful request. Deleting a check will also delete alerts associated with the check.
uptime_update_checkEXECcheck_idTo update the settings of an Uptime check, send a PUT request to /v2/uptime/checks/$CHECK_ID.

SELECT examples

To list all of the Uptime checks on your account, send a GET request to /v2/uptime/checks.

SELECT
id,
name,
enabled,
regions,
target,
type
FROM digitalocean.uptime.checks
;

INSERT example

Use the following StackQL query and manifest file to create a new checks resource.

/*+ create */
INSERT INTO digitalocean.uptime.checks (
data__name,
data__type,
data__target,
data__regions,
data__enabled
)
SELECT
'{{ name }}',
'{{ type }}',
'{{ target }}',
'{{ regions }}',
'{{ enabled }}'
;

DELETE example

Deletes the specified checks resource.

/*+ delete */
DELETE FROM digitalocean.uptime.checks
WHERE check_id = '{{ check_id }}';