Skip to main content

postgres_endpoints

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

Overview

Namepostgres_endpoints
TypeResource
Iddatabricks_workspace.postgres.postgres_endpoints

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. The full resource path of the endpoint. Format: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}
create_timestring (date-time)
parentstringThe branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
specobjectThe spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state.
statusobjectCurrent operational status of the compute endpoint.
uidstringSystem-generated unique ID for the endpoint.
update_timestring (date-time)A timestamp indicating when the compute endpoint was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectparent, deployment_namepage_size, page_tokenReturns a paginated list of compute endpoints in the branch.
createinsertparent, endpoint_id, deployment_name, endpointCreates a new compute endpoint in the branch.

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)
endpoint_idstringThe ID to use for the Endpoint. This becomes the final component of the endpoint's resource name. The ID is required and must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens. For example, primary becomes projects/my-app/branches/development/endpoints/primary.
parentstringThe Branch where this Endpoint will be created. Format: projects/{project_id}/branches/{branch_id}
page_sizeintegerUpper bound for items returned. Cannot be negative.
page_tokenstringPage token from a previous response. If not provided, returns the first page.

SELECT examples

Returns a paginated list of compute endpoints in the branch.

SELECT
name,
create_time,
parent,
spec,
status,
uid,
update_time
FROM databricks_workspace.postgres.postgres_endpoints
WHERE parent = '{{ parent }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;

INSERT examples

Creates a new compute endpoint in the branch.

INSERT INTO databricks_workspace.postgres.postgres_endpoints (
endpoint,
parent,
endpoint_id,
deployment_name
)
SELECT
'{{ endpoint }}' /* required */,
'{{ parent }}',
'{{ endpoint_id }}',
'{{ deployment_name }}'
;