checks
Creates, updates, deletes, gets or lists a checks
resource.
Overview
Name | checks |
Type | Resource |
Id | digitalocean.uptime.checks |
Fields
Name | Datatype | Description |
---|---|---|
id | string | A unique ID that can be used to identify and reference the check. |
name | string | A human-friendly display name. |
enabled | boolean | A boolean value indicating whether the check is enabled/disabled. |
regions | array | An array containing the selected regions to perform healthchecks from. |
target | string | The endpoint to perform healthchecks on. |
type | string | The type of health check to perform. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
uptime_get_check | SELECT | check_id | To show information about an existing check, send a GET request to /v2/uptime/checks/$CHECK_ID . |
uptime_list_checks | SELECT |
| To list all of the Uptime checks on your account, send a GET request to /v2/uptime/checks . |
uptime_create_check | INSERT |
| To 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_check | DELETE | check_id | To 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_check | EXEC | check_id | To 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO digitalocean.uptime.checks (
data__name,
data__type,
data__target,
data__regions,
data__enabled
)
SELECT
'{{ name }}',
'{{ type }}',
'{{ target }}',
'{{ regions }}',
'{{ enabled }}'
;
- name: checks
props:
- name: name
value: string
- name: type
value: string
- name: target
value: string
- name: regions
value: array
- name: enabled
value: boolean
DELETE
example
Deletes the specified checks
resource.
/*+ delete */
DELETE FROM digitalocean.uptime.checks
WHERE check_id = '{{ check_id }}';