uptime_alert
Generated on 3 Apr 2026
from digitalocean.cloud version
v1.2.1
Synopsis
Create or delete alerts for uptime checks. Alerts notify you when an uptime check fails or recovers. View the API documentation at https://docs.digitalocean.com/reference/api/api-reference/#tag/Uptime.
Requirements
- pydo >= 0.1.3
- azure-core >= 1.26.1
Parameters
| Parameter | Choices / Default | Description |
|---|---|---|
check_idstr / required |
The unique identifier of the uptime check. | |
client_override_optionsdict |
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. | |
comparisonstr |
Choices:
|
The comparison operator for the threshold. |
idstr |
The unique identifier of the alert. Used for lookup when updating or deleting. | |
module_override_optionsdict |
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. | |
namestr / required |
The name of the alert. | |
notificationsdict |
Notification settings for the alert. | |
periodstr |
Choices:
|
The period of time the threshold must be breached to trigger the alert. |
statestr |
Choices:
|
State of the resource, present to create, absent to destroy. |
thresholdint |
The threshold at which the alert triggers. For latency alerts, this is in milliseconds. For ssl_expiry alerts, this is in days. | |
timeoutint |
Default: 300 |
Polling timeout in seconds. |
tokenstr |
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 |
|
typestr |
Choices:
|
The type of alert. |
Examples
- name: Create uptime alert
digitalocean.cloud.uptime_alert:
token: "{{ token }}"
state: present
check_id: 5a4981aa-9653-4bd1-bef5-d6bff52042e4
name: high-latency-alert
type: latency
threshold: 500
comparison: greater_than
notifications:
email:
- [email protected]
period: 5m
- name: Delete uptime alert
digitalocean.cloud.uptime_alert:
token: "{{ token }}"
state: absent
check_id: 5a4981aa-9653-4bd1-bef5-d6bff52042e4
name: high-latency-alertReturn Values
| Key | Returned | Description |
|---|---|---|
alertdict |
always | Uptime alert information. Sample: |
errordict |
failure | DigitalOcean API error. Sample: |
msgstr |
always | Uptime alert result information. Sample: |