uptime_check
Generated on 22 Apr 2025
from digitalocean.cloud
version
v1.0.0
Synopsis
- Create or delete Uptime checks.
- View the API documentation at https://docs.digitalocean.com/reference/api/api-reference/#operation/uptime_create_check.
Requirements
- pydo >= 0.1.6
- azure-core >= 1.26.1
Parameters
Parameter | Choices | Default | Comments |
---|---|---|---|
check_id (str) |
Required when state=absent . The Uptime check UUID to delete. |
||
client_override_options (dict) |
Client override options (developer use). For example, can be used to override the DigitalOcean API endpoint for an internal test suite. If provided, these options will knock out existing options. | ||
enabled (bool) |
True | Required when state=present . A boolean value indicating whether the check is enabled/disabled. |
|
module_override_options (dict) |
Module override options (developer use). Can be used to override module options to support experimental or future options. If provided, these options will knock out existing options. | ||
name (str) |
Required when state=present . A human-friendly display name. |
||
regions (list) |
|
Required when state=present . An array containing the selected regions to perform healthchecks from. |
|
state (str) |
|
present | State of the resource, present to create, absent to destroy. |
target (str) |
Required when state=present . The endpoint to perform healthchecks on. |
||
timeout (int) |
300 | Polling timeout in seconds. | |
token (str) |
DigitalOcean API token. There are several environment variables which can be used to provide this value. DIGITALOCEAN_ACCESS_TOKEN , DIGITALOCEAN_TOKEN , DO_API_TOKEN , DO_API_KEY , DO_OAUTH_TOKEN and OAUTH_TOKEN |
||
type (str) |
|
Required when state=present . The type of health check to perform. |
|
unique_name (bool) |
False | When true for state=present the Uptime check will only be created if it is uniquely named. When true for state=absent the Uptime check will only be deleted if it is uniquely named. |
Examples
- name: Create Uptime ping check
digitalocean.cloud.uptime_check:
token: "{{ token }}"
name: my-ping-check
type: ping
target: my-droplet-ip
regions: [us_east]
enabled: true
Return Values
Key | Returned | Description |
---|---|---|
check (dict) |
always |
Uptime check.
Sample:
|
error (dict) |
failure |
DigitalOcean API error.
Sample:
|
msg (str) |
always |
Uptime checks result information.
Sample:
|