postgres_compute_instances
Creates, updates, deletes, gets or lists a postgres_compute_instances resource.
Overview
| Name | postgres_compute_instances |
| Type | Resource |
| Id | databricks_workspace.postgres.postgres_compute_instances |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
name | string | |
compute_instance_id | string | The unique ID for this compute. |
compute_host | string | A host scoped directly to the enclosing compute. This host is guaranteed to resolve to the specific compute instance. |
current_state | string | The current state of the compute. (ACTIVE, IDLE, INIT) |
pending_state | string | The desired pending state of the compute, if a state transition is in progress. (ACTIVE, IDLE, INIT) |
role | string | The role of this compute within the endpoint. (HOT_STANDBY, READ_ONLY, READ_WRITE) |
start_time | string (date-time) | A timestamp indicating when the compute was last started. |
suspend_time | string (date-time) | A timestamp indicating when the compute was last suspended. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | parent, deployment_name | page_size, page_token | Lists 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.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
parent | string | The parent, which owns the compute instances. |
page_size | integer | The 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_token | string | A 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
- list
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 }}'
;