Skip to main content

postgres_compute_instances

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

Overview

Namepostgres_compute_instances
TypeResource
Iddatabricks_workspace.postgres.postgres_compute_instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestring
compute_instance_idstringThe unique ID for this compute.
compute_hoststringA host scoped directly to the enclosing compute. This host is guaranteed to resolve to the specific compute instance.
current_statestringThe current state of the compute. (ACTIVE, IDLE, INIT)
pending_statestringThe desired pending state of the compute, if a state transition is in progress. (ACTIVE, IDLE, INIT)
rolestringThe role of this compute within the endpoint. (HOT_STANDBY, READ_ONLY, READ_WRITE)
start_timestring (date-time)A timestamp indicating when the compute was last started.
suspend_timestring (date-time)A timestamp indicating when the compute was last suspended.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectparent, deployment_namepage_size, page_tokenLists all compute instances that have been created under the specified endpoint. Note:

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
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
parentstringThe parent, which owns the compute instances.
page_sizeintegerThe maximum number of compute instances to return. The service may return fewer than this value. If unspecified, at most 50 compute instances will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_tokenstringA page token, received from a previous ListInstances call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListInstances must match the call that provided the page token.

SELECT examples

Lists all compute instances that have been created under the specified endpoint. Note:

SELECT
name,
compute_instance_id,
compute_host,
current_state,
pending_state,
role,
start_time,
suspend_time
FROM databricks_workspace.postgres.postgres_compute_instances
WHERE parent = '{{ parent }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;