Skip to main content

alerts

Creates, updates, deletes, gets or lists an alerts resource.

Overview​

Namealerts
TypeResource
Iddigitalocean.apps.alerts

Fields​

The following fields are returned by SELECT queries:

A JSON object with a alerts key. This is list of object alerts.

NameDatatypeDescription
idstring (title: The ID of the alert, example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf)
component_namestring (title: Name of component the alert belongs to, example: backend)
emailsarray (title: Emails for alerts to go to)
phasestring (UNKNOWN, PENDING, CONFIGURING, ACTIVE, ERROR) (default: UNKNOWN, example: ACTIVE)
progressobject
slack_webhooksarray (title: Slack Webhooks to send alerts to)
specobject

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
apps_list_alertsselectapp_idList alerts associated to the app and any components. This includes configuration information about the alerts including emails, slack webhooks, and triggering events or conditions.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
app_idstringThe app ID (example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf)

SELECT examples​

List alerts associated to the app and any components. This includes configuration information about the alerts including emails, slack webhooks, and triggering events or conditions.

SELECT
id,
component_name,
emails,
phase,
progress,
slack_webhooks,
spec
FROM digitalocean.apps.alerts
WHERE app_id = '{{ app_id }}' -- required
;