instances
Creates, updates, deletes, gets or lists an instances
resource.
Overview
Name | instances |
Type | Resource |
Id | digitalocean.apps.instances |
Fields
The following fields are returned by SELECT
queries:
- apps_get_instances
A JSON with key instances
Name | Datatype | Description |
---|---|---|
component_name | string | Name of the component, from the app spec. (example: sample-golang) |
instance_name | string | Name of the instance, which is a unique identifier for the instance. (example: sample-golang-76b84c7fb8-6p8kq) |
component_type | string | Supported compute component by DigitalOcean App Platform. (example: SERVICE) |
instance_alias | string | Readable 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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
apps_get_instances | select | app_id | 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. |
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) |
SELECT
examples
- apps_get_instances
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;