postgres_projects
Creates, updates, deletes, gets or lists a postgres_projects resource.
Overview
| Name | postgres_projects |
| Type | Resource |
| Id | databricks_workspace.postgres.postgres_projects |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The full resource path of the project. Format: projects/{project_id} |
create_time | string (date-time) | |
spec | object | The spec contains the project configuration, including display_name, pg_version (Postgres version), history_retention_duration, and default_endpoint_settings. |
status | object | The current status of a Project. |
uid | string | System-generated unique ID for the project. |
update_time | string (date-time) | A timestamp indicating when the project was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | deployment_name | page_size, page_token | Returns a paginated list of database projects in the workspace that the user has permission to access. |
create | insert | project_id, deployment_name, project | Creates a new Lakebase Autoscaling Postgres database project, which contains branches and compute | |
update | update | name, update_mask, deployment_name, project | Updates the specified database project. |
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) |
name | string | Output only. The full resource path of the project. Format: projects/{project_id} |
project_id | string | The ID to use for the Project. This becomes the final component of the project'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, my-app becomes projects/my-app. |
update_mask | object | The list of fields to update. If unspecified, all fields will be updated when possible. |
page_size | integer | Upper bound for items returned. Cannot be negative. |
page_token | string | Page token from a previous response. If not provided, returns the first page. |
SELECT examples
- list
Returns a paginated list of database projects in the workspace that the user has permission to access.
SELECT
name,
create_time,
spec,
status,
uid,
update_time
FROM databricks_workspace.postgres.postgres_projects
WHERE deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Creates a new Lakebase Autoscaling Postgres database project, which contains branches and compute
INSERT INTO databricks_workspace.postgres.postgres_projects (
project,
project_id,
deployment_name
)
SELECT
'{{ project }}' /* required */,
'{{ project_id }}',
'{{ deployment_name }}'
;
# Description fields are for documentation purposes
- name: postgres_projects
props:
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the postgres_projects resource.
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the postgres_projects resource.
- name: project
description: |
The Project to create.
value:
create_time: "{{ create_time }}"
name: "{{ name }}"
spec:
default_endpoint_settings:
autoscaling_limit_max_cu: {{ autoscaling_limit_max_cu }}
autoscaling_limit_min_cu: {{ autoscaling_limit_min_cu }}
no_suspension: {{ no_suspension }}
pg_settings: "{{ pg_settings }}"
suspend_timeout_duration: "{{ suspend_timeout_duration }}"
display_name: "{{ display_name }}"
history_retention_duration: "{{ history_retention_duration }}"
pg_version: {{ pg_version }}
status:
branch_logical_size_limit_bytes: {{ branch_logical_size_limit_bytes }}
default_endpoint_settings:
autoscaling_limit_max_cu: {{ autoscaling_limit_max_cu }}
autoscaling_limit_min_cu: {{ autoscaling_limit_min_cu }}
no_suspension: {{ no_suspension }}
pg_settings: "{{ pg_settings }}"
suspend_timeout_duration: "{{ suspend_timeout_duration }}"
display_name: "{{ display_name }}"
history_retention_duration: "{{ history_retention_duration }}"
owner: "{{ owner }}"
pg_version: {{ pg_version }}
synthetic_storage_size_bytes: {{ synthetic_storage_size_bytes }}
uid: "{{ uid }}"
update_time: "{{ update_time }}"
UPDATE examples
- update
Updates the specified database project.
UPDATE databricks_workspace.postgres.postgres_projects
SET
project = '{{ project }}'
WHERE
name = '{{ name }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND project = '{{ project }}' --required;