Skip to main content

events

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

Overview

Nameevents
TypeResource
Iddigitalocean.apps.events

Fields

The following fields are returned by SELECT queries:

A JSON with key event

NameDatatypeDescription
idstring (title: The ID of the event (UUID), example: ba32b134-569c-4c0c-ba02-8ffdb0492ece)
deployment_idstringFor deployment events, this is the same as the deployment's ID. For autoscaling events, this is the deployment that was autoscaled. (title: The deployment ID associated with this event, example: c020763f-ddb7-4112-a0df-7f01c69fc00b)
autoscalingobjectAutoscaling event details. Only present for autoscaling events.
created_atstring (date-time) (title: When the event was created, example: 2023-10-01T12:00:00Z)
deploymentobject (title: An app deployment)
typestringThe type of event (UNKNOWN, DEPLOYMENT, AUTOSCALING) (example: DEPLOYMENT)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
apps_get_eventselectapp_id, event_idGet a single event for an app.
apps_list_eventsselectapp_idpage, per_page, event_typesList all events for an app, including deployments and autoscaling events.
apps_cancel_eventexecapp_id, event_idCancel an in-progress autoscaling event.

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)
event_idstringThe event ID (example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf)
event_typesarrayFilter events by event type. (example: [DEPLOYMENT])
pageintegerWhich 'page' of paginated results to return. (example: 1)
per_pageintegerNumber of items returned per page (example: 2)

SELECT examples

Get a single event for an app.

SELECT
id,
deployment_id,
autoscaling,
created_at,
deployment,
type
FROM digitalocean.apps.events
WHERE app_id = '{{ app_id }}' -- required
AND event_id = '{{ event_id }}' -- required
;

Lifecycle Methods

Cancel an in-progress autoscaling event.

EXEC digitalocean.apps.events.apps_cancel_event
@app_id='{{ app_id }}' --required,
@event_id='{{ event_id }}' --required
;