Skip to main content

instances

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

Overview

Nameinstances
TypeResource
Iddigitalocean.apps.instances

Fields

The following fields are returned by SELECT queries:

A JSON with key instances

NameDatatypeDescription
component_namestringName of the component, from the app spec. (example: sample-golang)
instance_namestringName of the instance, which is a unique identifier for the instance. (example: sample-golang-76b84c7fb8-6p8kq)
component_typestringSupported compute component by DigitalOcean App Platform. (example: SERVICE)
instance_aliasstringReadable identifier, an alias of the instance name, reference for mapping insights to instance names. (example: sample-golang-0)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
apps_get_instancesselectapp_idRetrieve the list of running instances for a given application, including instance names and component types. Please note that these instances are ephemeral and may change over time. It is recommended not to make persistent changes or develop scripts that rely on their persistence.

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

Retrieve the list of running instances for a given application, including instance names and component types. Please note that these instances are ephemeral and may change over time. It is recommended not to make persistent changes or develop scripts that rely on their persistence.

SELECT
component_name,
instance_name,
component_type,
instance_alias
FROM digitalocean.apps.instances
WHERE app_id = '{{ app_id }}' -- required;