events
Creates, updates, deletes, gets or lists an events resource.
Overview
| Name | events |
| Type | Resource |
| Id | digitalocean.apps.events |
Fields
The following fields are returned by SELECT queries:
- apps_get_event
- apps_list_events
A JSON with key event
| Name | Datatype | Description |
|---|---|---|
id | string | (title: The ID of the event (UUID), example: ba32b134-569c-4c0c-ba02-8ffdb0492ece) |
deployment_id | string | For 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) |
autoscaling | object | Autoscaling event details. Only present for autoscaling events. |
created_at | string (date-time) | (title: When the event was created, example: 2023-10-01T12:00:00Z) |
deployment | object | (title: An app deployment) |
type | string | The type of event (UNKNOWN, DEPLOYMENT, AUTOSCALING) (example: DEPLOYMENT) |
A JSON with key events
| Name | Datatype | Description |
|---|---|---|
id | string | (title: The ID of the event (UUID), example: ba32b134-569c-4c0c-ba02-8ffdb0492ece) |
deployment_id | string | For 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) |
autoscaling | object | Autoscaling event details. Only present for autoscaling events. |
created_at | string (date-time) | (title: When the event was created, example: 2023-10-01T12:00:00Z) |
deployment | object | (title: An app deployment) |
type | string | The type of event (UNKNOWN, DEPLOYMENT, AUTOSCALING) (example: DEPLOYMENT) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
apps_get_event | select | app_id, event_id | Get a single event for an app. | |
apps_list_events | select | app_id | page, per_page, event_types | List all events for an app, including deployments and autoscaling events. |
apps_cancel_event | exec | app_id, event_id | Cancel 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.
| Name | Datatype | Description |
|---|---|---|
app_id | string | The app ID (example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf) |
event_id | string | The event ID (example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf) |
event_types | array | Filter events by event type. (example: [DEPLOYMENT]) |
page | integer | Which 'page' of paginated results to return. (example: 1) |
per_page | integer | Number of items returned per page (example: 2) |
SELECT examples
- apps_get_event
- apps_list_events
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
;
List all events for an app, including deployments and autoscaling events.
SELECT
id,
deployment_id,
autoscaling,
created_at,
deployment,
type
FROM digitalocean.apps.events
WHERE app_id = '{{ app_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND event_types = '{{ event_types }}'
;
Lifecycle Methods
- apps_cancel_event
Cancel an in-progress autoscaling event.
EXEC digitalocean.apps.events.apps_cancel_event
@app_id='{{ app_id }}' --required,
@event_id='{{ event_id }}' --required
;