uptime_check

Generated on 30 Jun 2025 from digitalocean.cloud version v1.2.1

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 Description
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
Default: 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 / elements=str
Choices:
  • us_east
  • us_west
  • eu_west
  • se_asia
Required when state=present. An array containing the selected regions to perform healthchecks from.
state
str
Choices:
  • present (default)
  • absent
State of the resource, present to create, absent to destroy.
target
str
Required when state=present. The endpoint to perform healthchecks on.
timeout
int
Default: 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
Choices:
  • ping
  • http
  • https
Required when state=present. The type of health check to perform.
unique_name
bool
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

KeyReturnedDescription
check
dict
always Uptime check.
Sample:
[
  {
    "enabled": true,
    "id": "5a4981aa-9653-4bd1-bef5-d6bff52042e4",
    "name": "Landing page check",
    "regions": [
      "us_east",
      "eu_west"
    ],
    "target": "https://www.landingpage.com",
    "type": "https"
  }
]
error
dict
failure DigitalOcean API error.
Sample:
{
  "Message": "Informational error message.",
  "Reason": "Unauthorized",
  "Status Code": 401
}
msg
str
always Uptime checks result information.
Sample:
[
  "Would create Uptime check Landing page check",
  "Created Uptime check named Landing page check (5a4981aa-9653-4bd1-bef5-d6bff52042e4)",
  "Would delete Uptime check 5a4981aa-9653-4bd1-bef5-d6bff52042e4",
  "Deleted Uptime check 4981aa-9653-4bd1-bef5-d6bff52042e4",
  "No Uptime check 5a4981aa-9653-4bd1-bef5-d6bff52042e4",
  "Uptime check 5a4981aa-9653-4bd1-bef5-d6bff52042e4",
  "Uptime check named Landing page check (5a4981aa-9653-4bd1-bef5-d6bff52042e4) exists",
  "There are 3 Uptime checks named Landing page check",
  "There are 3 Uptime checks 5a4981aa-9653-4bd1-bef5-d6bff52042e4, this should not happen"
]

We can't find any results for your search.

Try using different keywords or simplifying your search terms.