Skip to main content

deployment_url

Creates, updates, deletes, gets or lists a deployment_url resource.

Overview

Namedeployment_url
TypeResource
Iddigitalocean.apps.deployment_url

Fields

The following fields are returned by SELECT queries:

A JSON object with a websocket URL that allows sending/receiving console input and output.

NameDatatypeDescription
urlstringA websocket URL that allows sending/receiving console input and receiving console output. (example: wss://exec/?token=xxx)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
apps_get_execselectapp_id, deployment_id, component_nameinstance_nameReturns a websocket URL that allows sending/receiving console input and output to a component of the specified deployment if one exists. Optionally, the instance_name parameter can be provided to retrieve the exec URL for a specific instance. Note that instances are ephemeral; therefore, we recommended to avoid making persistent changes or such scripting around them.
apps_get_exec_active_deploymentselectapp_id, component_nameinstance_nameReturns a websocket URL that allows sending/receiving console input and output to a component of the active deployment if one exists.

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)
component_namestringAn optional component name. If set, logs will be limited to this component only. (example: component)
deployment_idstringThe deployment ID (example: 3aa4d20e-5527-4c00-b496-601fbd22520a)
instance_namestringThe name of the actively running ephemeral compute instance (example: go-app-d768568df-zz77d)

SELECT examples

Returns a websocket URL that allows sending/receiving console input and output to a component of the specified deployment if one exists. Optionally, the instance_name parameter can be provided to retrieve the exec URL for a specific instance. Note that instances are ephemeral; therefore, we recommended to avoid making persistent changes or such scripting around them.

SELECT
url
FROM digitalocean.apps.deployment_url
WHERE app_id = '{{ app_id }}' -- required
AND deployment_id = '{{ deployment_id }}' -- required
AND component_name = '{{ component_name }}' -- required
AND instance_name = '{{ instance_name }}';