Postgres

These dataclasses are used in the SDK to represent API requests and responses for services in the databricks.sdk.service.postgres module.

class databricks.sdk.service.postgres.Branch(branch_id: 'Optional[str]' = None, create_time: 'Optional[Timestamp]' = None, name: 'Optional[str]' = None, parent: 'Optional[str]' = None, spec: 'Optional[BranchSpec]' = None, status: 'Optional[BranchStatus]' = None, uid: 'Optional[str]' = None, update_time: 'Optional[Timestamp]' = None)
branch_id: str | None = None

The part of the name, chosen by the user when the resource was created.

create_time: Timestamp | None = None

A timestamp indicating when the branch was created.

name: str | None = None

Output only. The full resource path of the branch. Format: projects/{project_id}/branches/{branch_id}

parent: str | None = None

The project containing this branch (API resource hierarchy). Format: projects/{project_id}

Note: This field indicates where the branch exists in the resource hierarchy. For point-in-time branching from another branch, see status.source_branch.

spec: BranchSpec | None = None

The spec contains the branch configuration.

status: BranchStatus | None = None

The current status of a Branch.

uid: str | None = None

System-generated unique ID for the branch.

update_time: Timestamp | None = None

A timestamp indicating when the branch was last updated.

as_dict() dict

Serializes the Branch into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the Branch into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) Branch

Deserializes the Branch from a dictionary.

class databricks.sdk.service.postgres.BranchOperationMetadata
as_dict() dict

Serializes the BranchOperationMetadata into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the BranchOperationMetadata into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) BranchOperationMetadata

Deserializes the BranchOperationMetadata from a dictionary.

class databricks.sdk.service.postgres.BranchSpec(expire_time: 'Optional[Timestamp]' = None, is_protected: 'Optional[bool]' = None, no_expiry: 'Optional[bool]' = None, source_branch: 'Optional[str]' = None, source_branch_lsn: 'Optional[str]' = None, source_branch_time: 'Optional[Timestamp]' = None, ttl: 'Optional[Duration]' = None)
expire_time: Timestamp | None = None

Absolute expiration timestamp. When set, the branch will expire at this time. Mutually exclusive with ttl and no_expiry. When updating, use spec.expiration in the update_mask.

is_protected: bool | None = None

When set to true, protects the branch from deletion and reset. Associated compute endpoints and the project cannot be deleted while the branch is protected.

no_expiry: bool | None = None

Explicitly disable expiration. When set to true, the branch will not expire. If set to false, the request is invalid; provide either ttl or expire_time instead. Mutually exclusive with expire_time and ttl. When updating, use spec.expiration in the update_mask.

source_branch: str | None = None

The name of the source branch from which this branch was created (data lineage for point-in-time recovery). If not specified, defaults to the project’s default branch. Format: projects/{project_id}/branches/{branch_id}

source_branch_lsn: str | None = None

The Log Sequence Number (LSN) on the source branch from which this branch was created.

source_branch_time: Timestamp | None = None

The point in time on the source branch from which this branch was created.

ttl: Duration | None = None

Relative time-to-live duration. When set, the branch will expire at creation_time + ttl. Mutually exclusive with expire_time and no_expiry. When updating, use spec.expiration in the update_mask.

as_dict() dict

Serializes the BranchSpec into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the BranchSpec into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) BranchSpec

Deserializes the BranchSpec from a dictionary.

class databricks.sdk.service.postgres.BranchStatus(branch_id: 'Optional[str]' = None, current_state: 'Optional[BranchStatusState]' = None, default: 'Optional[bool]' = None, delete_time: 'Optional[Timestamp]' = None, expire_time: 'Optional[Timestamp]' = None, is_protected: 'Optional[bool]' = None, logical_size_bytes: 'Optional[int]' = None, pending_state: 'Optional[BranchStatusState]' = None, purge_time: 'Optional[Timestamp]' = None, source_branch: 'Optional[str]' = None, source_branch_lsn: 'Optional[str]' = None, source_branch_time: 'Optional[Timestamp]' = None, state_change_time: 'Optional[Timestamp]' = None)
branch_id: str | None = None

Part of the resource name.

current_state: BranchStatusState | None = None

The branch’s state, indicating if it is initializing, ready for use, or archived.

default: bool | None = None

Whether the branch is the project’s default branch.

delete_time: Timestamp | None = None

A timestamp indicating when the branch was deleted. Empty if the branch is not deleted.

expire_time: Timestamp | None = None

Absolute expiration time for the branch. Empty if expiration is disabled.

is_protected: bool | None = None

Whether the branch is protected.

logical_size_bytes: int | None = None

The logical size of the branch.

pending_state: BranchStatusState | None = None

The pending state of the branch, if a state transition is in progress.

purge_time: Timestamp | None = None

A timestamp indicating when the branch is scheduled to be purged. Empty if the branch is not deleted, otherwise set to a timestamp in the future.

source_branch: str | None = None

The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}

source_branch_lsn: str | None = None

The Log Sequence Number (LSN) on the source branch from which this branch was created.

source_branch_time: Timestamp | None = None

The point in time on the source branch from which this branch was created.

state_change_time: Timestamp | None = None

A timestamp indicating when the current_state began.

as_dict() dict

Serializes the BranchStatus into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the BranchStatus into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) BranchStatus

Deserializes the BranchStatus from a dictionary.

class databricks.sdk.service.postgres.BranchStatusState

The state of the branch.

ARCHIVED = "ARCHIVED"
DELETED = "DELETED"
IMPORTING = "IMPORTING"
INIT = "INIT"
READY = "READY"
RESETTING = "RESETTING"
class databricks.sdk.service.postgres.Catalog(catalog_id: 'Optional[str]' = None, create_time: 'Optional[Timestamp]' = None, name: 'Optional[str]' = None, spec: 'Optional[CatalogCatalogSpec]' = None, status: 'Optional[CatalogCatalogStatus]' = None, uid: 'Optional[str]' = None, update_time: 'Optional[Timestamp]' = None)
catalog_id: str | None = None

The part of the name, chosen by the user when the resource was created.

create_time: Timestamp | None = None

A timestamp indicating when the catalog was created.

name: str | None = None

Output only. The full resource path of the catalog.

Format: “catalogs/{catalog_id}”.

spec: CatalogCatalogSpec | None = None

The desired state of the Catalog.

status: CatalogCatalogStatus | None = None

The observed state of the Catalog.

uid: str | None = None

System-generated unique identifier for the catalog.

update_time: Timestamp | None = None

A timestamp indicating when the catalog was last updated.

as_dict() dict

Serializes the Catalog into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the Catalog into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) Catalog

Deserializes the Catalog from a dictionary.

class databricks.sdk.service.postgres.CatalogCatalogSpec(postgres_database: str, branch: str | None = None, create_database_if_missing: bool | None = None)

The desired state of the Catalog.

postgres_database: str

The name of the Postgres database inside the specified Lakebase project and branch to be associated with the UC catalog. This database must already exist, unless create_database_if_missing is set to true on creation.

A database can only be registered with one UC catalog at a time. To re-register a database with a different catalog, the existing catalog must be deleted first.

A child branch inherits the fact of parent’s registration. This means the same-named database in a child branch cannot be registered with a second catalog while the parent’s registration exists. To allow registering the database of a child branch, drop and recreate the database on the child branch. This removes the fact of parent’s registration from this branch only.

Doing Point In Time Restore (PITR) prior to the moment before the Postgres DB was registered in the Catalog drops the fact of registration of the database. So the user should avoid doing so.

branch: str | None = None

The resource path of the branch associated with the catalog.

Format: projects/{project_id}/branches/{branch_id}.

create_database_if_missing: bool | None = None

If set to true, the specified postgres_database is created on behalf of the calling user if it does not already exist. In this case, the calling user has a role created for them in Postgres if they do not already have one.

Defaults to false, meaning that the request fails if the specified postgres_database does not already exist.

as_dict() dict

Serializes the CatalogCatalogSpec into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the CatalogCatalogSpec into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) CatalogCatalogSpec

Deserializes the CatalogCatalogSpec from a dictionary.

class databricks.sdk.service.postgres.CatalogCatalogStatus(branch: str | None = None, postgres_database: str | None = None, project: str | None = None)

The observed state of the Catalog.

branch: str | None = None

The resource path of the branch associated with the catalog.

Format: projects/{project_id}/branches/{branch_id}.

postgres_database: str | None = None

The name of the Postgres database associated with the catalog.

project: str | None = None

The resource path of the project associated with the catalog.

Format: projects/{project_id}.

as_dict() dict

Serializes the CatalogCatalogStatus into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the CatalogCatalogStatus into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) CatalogCatalogStatus

Deserializes the CatalogCatalogStatus from a dictionary.

class databricks.sdk.service.postgres.CatalogOperationMetadata
as_dict() dict

Serializes the CatalogOperationMetadata into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the CatalogOperationMetadata into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) CatalogOperationMetadata

Deserializes the CatalogOperationMetadata from a dictionary.

class databricks.sdk.service.postgres.Database(create_time: Timestamp | None = None, database_id: str | None = None, name: str | None = None, parent: str | None = None, spec: DatabaseDatabaseSpec | None = None, status: DatabaseDatabaseStatus | None = None, update_time: Timestamp | None = None)

Database represents a Postgres database within a Branch.

create_time: Timestamp | None = None

A timestamp indicating when the database was created.

database_id: str | None = None

The part of the name, chosen by the user when the resource was created.

name: str | None = None

The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}

parent: str | None = None

The branch containing this database. Format: projects/{project_id}/branches/{branch_id}

spec: DatabaseDatabaseSpec | None = None

The desired state of the Database.

status: DatabaseDatabaseStatus | None = None

The observed state of the Database.

update_time: Timestamp | None = None

A timestamp indicating when the database was last updated.

as_dict() dict

Serializes the Database into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the Database into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) Database

Deserializes the Database from a dictionary.

class databricks.sdk.service.postgres.DatabaseCredential(expire_time: 'Optional[Timestamp]' = None, token: 'Optional[str]' = None)
expire_time: Timestamp | None = None

Timestamp in UTC of when this credential expires.

token: str | None = None

The OAuth token that can be used as a password when connecting to a database.

as_dict() dict

Serializes the DatabaseCredential into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the DatabaseCredential into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) DatabaseCredential

Deserializes the DatabaseCredential from a dictionary.

class databricks.sdk.service.postgres.DatabaseDatabaseSpec(postgres_database: 'Optional[str]' = None, role: 'Optional[str]' = None)
postgres_database: str | None = None

The name of the Postgres database.

This expects a valid Postgres identifier as specified in the link below. https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS Required when creating the Database.

To rename, pass a valid postgres identifier when updating the Database.

role: str | None = None

The name of the role that owns the database. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}

To change the owner, pass valid existing Role name when updating the Database

A database always has an owner.

as_dict() dict

Serializes the DatabaseDatabaseSpec into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the DatabaseDatabaseSpec into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) DatabaseDatabaseSpec

Deserializes the DatabaseDatabaseSpec from a dictionary.

class databricks.sdk.service.postgres.DatabaseDatabaseStatus(database_id: 'Optional[str]' = None, postgres_database: 'Optional[str]' = None, role: 'Optional[str]' = None)
database_id: str | None = None

Part of the resource name.

postgres_database: str | None = None

The name of the Postgres database.

role: str | None = None

The name of the role that owns the database. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}

as_dict() dict

Serializes the DatabaseDatabaseStatus into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the DatabaseDatabaseStatus into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) DatabaseDatabaseStatus

Deserializes the DatabaseDatabaseStatus from a dictionary.

class databricks.sdk.service.postgres.DatabaseOperationMetadata
as_dict() dict

Serializes the DatabaseOperationMetadata into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the DatabaseOperationMetadata into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) DatabaseOperationMetadata

Deserializes the DatabaseOperationMetadata from a dictionary.

class databricks.sdk.service.postgres.DatabricksServiceExceptionWithDetailsProto(details: List[dict] | None = None, error_code: ErrorCode | None = None, message: str | None = None, stack_trace: str | None = None)

Databricks Error that is returned by all Databricks APIs.

details: List[dict] | None = None
error_code: ErrorCode | None = None
message: str | None = None
stack_trace: str | None = None
as_dict() dict

Serializes the DatabricksServiceExceptionWithDetailsProto into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the DatabricksServiceExceptionWithDetailsProto into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) DatabricksServiceExceptionWithDetailsProto

Deserializes the DatabricksServiceExceptionWithDetailsProto from a dictionary.

class databricks.sdk.service.postgres.DeltaTableSyncInfo(delta_commit_time: 'Optional[Timestamp]' = None, delta_commit_version: 'Optional[int]' = None)
delta_commit_time: Timestamp | None = None

The timestamp when the above Delta version was committed in the source Delta table. Note: This is the Delta commit time, not the time the data was written to the synced table.

delta_commit_version: int | None = None

The Delta Lake commit version that was last successfully synced.

as_dict() dict

Serializes the DeltaTableSyncInfo into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the DeltaTableSyncInfo into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) DeltaTableSyncInfo

Deserializes the DeltaTableSyncInfo from a dictionary.

class databricks.sdk.service.postgres.Endpoint(create_time: 'Optional[Timestamp]' = None, endpoint_id: 'Optional[str]' = None, name: 'Optional[str]' = None, parent: 'Optional[str]' = None, spec: 'Optional[EndpointSpec]' = None, status: 'Optional[EndpointStatus]' = None, uid: 'Optional[str]' = None, update_time: 'Optional[Timestamp]' = None)
create_time: Timestamp | None = None

A timestamp indicating when the compute endpoint was created.

endpoint_id: str | None = None

The part of the name, chosen by the user when the resource was created.

name: str | None = None

Output only. The full resource path of the endpoint. Format: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}

parent: str | None = None

The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}

spec: EndpointSpec | None = None

The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state.

status: EndpointStatus | None = None

Current operational status of the compute endpoint.

uid: str | None = None

System-generated unique ID for the endpoint.

update_time: Timestamp | None = None

A timestamp indicating when the compute endpoint was last updated.

as_dict() dict

Serializes the Endpoint into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the Endpoint into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) Endpoint

Deserializes the Endpoint from a dictionary.

class databricks.sdk.service.postgres.EndpointGroupSpec(min: 'int', max: 'int', enable_readable_secondaries: 'Optional[bool]' = None)
min: int

The minimum number of computes in the endpoint group. Currently, this must be equal to max. This must be greater than or equal to 1.

max: int

The maximum number of computes in the endpoint group. Currently, this must be equal to min. Set to 1 for single compute endpoints, to disable HA. To manually suspend all computes in an endpoint group, set disabled to true on the EndpointSpec.

enable_readable_secondaries: bool | None = None

Whether to allow read-only connections to read-write endpoints. Only relevant for read-write endpoints where size.max > 1.

as_dict() dict

Serializes the EndpointGroupSpec into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the EndpointGroupSpec into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) EndpointGroupSpec

Deserializes the EndpointGroupSpec from a dictionary.

class databricks.sdk.service.postgres.EndpointGroupStatus(min: 'int', max: 'int', enable_readable_secondaries: 'Optional[bool]' = None)
min: int

The minimum number of computes in the endpoint group. Currently, this must be equal to max. This must be greater than or equal to 1.

max: int

The maximum number of computes in the endpoint group. Currently, this must be equal to min. Set to 1 for single compute endpoints, to disable HA. To manually suspend all computes in an endpoint group, set disabled to true on the EndpointSpec.

enable_readable_secondaries: bool | None = None

Whether read-only connections to read-write endpoints are allowed. Only relevant if read replicas are configured by specifying size.max > 1.

as_dict() dict

Serializes the EndpointGroupStatus into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the EndpointGroupStatus into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) EndpointGroupStatus

Deserializes the EndpointGroupStatus from a dictionary.

class databricks.sdk.service.postgres.EndpointHosts(host: str | None = None, read_only_host: str | None = None)

Encapsulates various hostnames (r/w or r/o, pooled or not) for an endpoint.

host: str | None = None

The hostname to connect to this endpoint. For read-write endpoints, this is a read-write hostname which connects to the primary compute. For read-only endpoints, this is a read-only hostname which allows read-only operations.

read_only_host: str | None = None

An optionally defined read-only host for the endpoint, without pooling. For read-only endpoints, this attribute is always defined and is equivalent to host. For read-write endpoints, this attribute is defined if the enclosing endpoint is a group with greater than 1 computes configured, and has readable secondaries enabled.

as_dict() dict

Serializes the EndpointHosts into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the EndpointHosts into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) EndpointHosts

Deserializes the EndpointHosts from a dictionary.

class databricks.sdk.service.postgres.EndpointOperationMetadata
as_dict() dict

Serializes the EndpointOperationMetadata into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the EndpointOperationMetadata into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) EndpointOperationMetadata

Deserializes the EndpointOperationMetadata from a dictionary.

class databricks.sdk.service.postgres.EndpointSettings(pg_settings: Dict[str, str] | None = None)

A collection of settings for a compute endpoint.

pg_settings: Dict[str, str] | None = None

A raw representation of Postgres settings.

as_dict() dict

Serializes the EndpointSettings into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the EndpointSettings into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) EndpointSettings

Deserializes the EndpointSettings from a dictionary.

class databricks.sdk.service.postgres.EndpointSpec(endpoint_type: 'EndpointType', autoscaling_limit_max_cu: 'Optional[float]' = None, autoscaling_limit_min_cu: 'Optional[float]' = None, disabled: 'Optional[bool]' = None, group: 'Optional[EndpointGroupSpec]' = None, no_suspension: 'Optional[bool]' = None, settings: 'Optional[EndpointSettings]' = None, suspend_timeout_duration: 'Optional[Duration]' = None)
endpoint_type: EndpointType

The endpoint type. A branch can only have one READ_WRITE endpoint.

autoscaling_limit_max_cu: float | None = None

The maximum number of Compute Units. The maximum value is 64. The difference between the minimum and maximum Compute Units (max - min) must not exceed 16.

autoscaling_limit_min_cu: float | None = None

The minimum number of Compute Units. Minimum value is 0.5.

disabled: bool | None = None

Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action.

group: EndpointGroupSpec | None = None

Settings for optional HA configuration of the endpoint. If unspecified, the endpoint defaults to non HA settings, with a single compute backing the endpoint (and no readable secondaries for Read/Write endpoints).

no_suspension: bool | None = None

When set to true, explicitly disables automatic suspension (never suspend). Should be set to true when provided. Mutually exclusive with suspend_timeout_duration. When updating, use spec.suspension in the update_mask.

settings: EndpointSettings | None = None
suspend_timeout_duration: Duration | None = None

Duration of inactivity after which the compute endpoint is automatically suspended. If specified should be between 60s and 604800s (1 minute to 1 week). Mutually exclusive with no_suspension. When updating, use spec.suspension in the update_mask.

as_dict() dict

Serializes the EndpointSpec into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the EndpointSpec into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) EndpointSpec

Deserializes the EndpointSpec from a dictionary.

class databricks.sdk.service.postgres.EndpointStatus(autoscaling_limit_max_cu: 'Optional[float]' = None, autoscaling_limit_min_cu: 'Optional[float]' = None, current_state: 'Optional[EndpointStatusState]' = None, disabled: 'Optional[bool]' = None, endpoint_id: 'Optional[str]' = None, endpoint_type: 'Optional[EndpointType]' = None, group: 'Optional[EndpointGroupStatus]' = None, hosts: 'Optional[EndpointHosts]' = None, pending_state: 'Optional[EndpointStatusState]' = None, settings: 'Optional[EndpointSettings]' = None, suspend_timeout_duration: 'Optional[Duration]' = None)
autoscaling_limit_max_cu: float | None = None

The maximum number of Compute Units. The maximum value is 64. The difference between the minimum and maximum Compute Units (max - min) must not exceed 16.

autoscaling_limit_min_cu: float | None = None

The minimum number of Compute Units.

current_state: EndpointStatusState | None = None
disabled: bool | None = None

Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action.

endpoint_id: str | None = None

Part of the resource name.

endpoint_type: EndpointType | None = None

The endpoint type. A branch can only have one READ_WRITE endpoint.

group: EndpointGroupStatus | None = None

Details on the HA configuration of the endpoint.

hosts: EndpointHosts | None = None

Contains host information for connecting to the endpoint.

pending_state: EndpointStatusState | None = None
settings: EndpointSettings | None = None
suspend_timeout_duration: Duration | None = None

Duration of inactivity after which the compute endpoint is automatically suspended.

as_dict() dict

Serializes the EndpointStatus into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the EndpointStatus into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) EndpointStatus

Deserializes the EndpointStatus from a dictionary.

class databricks.sdk.service.postgres.EndpointStatusState

The state of the compute endpoint.

ACTIVE = "ACTIVE"
DEGRADED = "DEGRADED"
IDLE = "IDLE"
INIT = "INIT"
class databricks.sdk.service.postgres.EndpointType

The compute endpoint type. Either read_write or read_only.

ENDPOINT_TYPE_READ_ONLY = "ENDPOINT_TYPE_READ_ONLY"
ENDPOINT_TYPE_READ_WRITE = "ENDPOINT_TYPE_READ_WRITE"
class databricks.sdk.service.postgres.ErrorCode

Error codes returned by Databricks APIs to indicate specific failure conditions.

ABORTED = "ABORTED"
ALREADY_EXISTS = "ALREADY_EXISTS"
BAD_REQUEST = "BAD_REQUEST"
CANCELLED = "CANCELLED"
CATALOG_ALREADY_EXISTS = "CATALOG_ALREADY_EXISTS"
CATALOG_DOES_NOT_EXIST = "CATALOG_DOES_NOT_EXIST"
CATALOG_NOT_EMPTY = "CATALOG_NOT_EMPTY"
COULD_NOT_ACQUIRE_LOCK = "COULD_NOT_ACQUIRE_LOCK"
CUSTOMER_UNAUTHORIZED = "CUSTOMER_UNAUTHORIZED"
DAC_ALREADY_EXISTS = "DAC_ALREADY_EXISTS"
DAC_DOES_NOT_EXIST = "DAC_DOES_NOT_EXIST"
DATA_LOSS = "DATA_LOSS"
DEADLINE_EXCEEDED = "DEADLINE_EXCEEDED"
DEPLOYMENT_TIMEOUT = "DEPLOYMENT_TIMEOUT"
DIRECTORY_NOT_EMPTY = "DIRECTORY_NOT_EMPTY"
DIRECTORY_PROTECTED = "DIRECTORY_PROTECTED"
DRY_RUN_FAILED = "DRY_RUN_FAILED"
ENDPOINT_NOT_FOUND = "ENDPOINT_NOT_FOUND"
EXTERNAL_LOCATION_ALREADY_EXISTS = "EXTERNAL_LOCATION_ALREADY_EXISTS"
EXTERNAL_LOCATION_DOES_NOT_EXIST = "EXTERNAL_LOCATION_DOES_NOT_EXIST"
FEATURE_DISABLED = "FEATURE_DISABLED"
GIT_CONFLICT = "GIT_CONFLICT"
GIT_REMOTE_ERROR = "GIT_REMOTE_ERROR"
GIT_SENSITIVE_TOKEN_DETECTED = "GIT_SENSITIVE_TOKEN_DETECTED"
GIT_UNKNOWN_REF = "GIT_UNKNOWN_REF"
GIT_URL_NOT_ON_ALLOW_LIST = "GIT_URL_NOT_ON_ALLOW_LIST"
INSECURE_PARTNER_RESPONSE = "INSECURE_PARTNER_RESPONSE"
INTERNAL_ERROR = "INTERNAL_ERROR"
INVALID_PARAMETER_VALUE = "INVALID_PARAMETER_VALUE"
INVALID_STATE = "INVALID_STATE"
INVALID_STATE_TRANSITION = "INVALID_STATE_TRANSITION"
IO_ERROR = "IO_ERROR"
IPYNB_FILE_IN_REPO = "IPYNB_FILE_IN_REPO"
MALFORMED_PARTNER_RESPONSE = "MALFORMED_PARTNER_RESPONSE"
MALFORMED_REQUEST = "MALFORMED_REQUEST"
MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST = "MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST"
MAX_BLOCK_SIZE_EXCEEDED = "MAX_BLOCK_SIZE_EXCEEDED"
MAX_CHILD_NODE_SIZE_EXCEEDED = "MAX_CHILD_NODE_SIZE_EXCEEDED"
MAX_LIST_SIZE_EXCEEDED = "MAX_LIST_SIZE_EXCEEDED"
MAX_NOTEBOOK_SIZE_EXCEEDED = "MAX_NOTEBOOK_SIZE_EXCEEDED"
MAX_READ_SIZE_EXCEEDED = "MAX_READ_SIZE_EXCEEDED"
METASTORE_ALREADY_EXISTS = "METASTORE_ALREADY_EXISTS"
METASTORE_DOES_NOT_EXIST = "METASTORE_DOES_NOT_EXIST"
METASTORE_NOT_EMPTY = "METASTORE_NOT_EMPTY"
NOT_FOUND = "NOT_FOUND"
NOT_IMPLEMENTED = "NOT_IMPLEMENTED"
PARTIAL_DELETE = "PARTIAL_DELETE"
PERMISSION_DENIED = "PERMISSION_DENIED"
PERMISSION_NOT_PROPAGATED = "PERMISSION_NOT_PROPAGATED"
PRINCIPAL_DOES_NOT_EXIST = "PRINCIPAL_DOES_NOT_EXIST"
PROJECTS_OPERATION_TIMEOUT = "PROJECTS_OPERATION_TIMEOUT"
PROVIDER_ALREADY_EXISTS = "PROVIDER_ALREADY_EXISTS"
PROVIDER_DOES_NOT_EXIST = "PROVIDER_DOES_NOT_EXIST"
PROVIDER_SHARE_NOT_ACCESSIBLE = "PROVIDER_SHARE_NOT_ACCESSIBLE"
QUOTA_EXCEEDED = "QUOTA_EXCEEDED"
RECIPIENT_ALREADY_EXISTS = "RECIPIENT_ALREADY_EXISTS"
RECIPIENT_DOES_NOT_EXIST = "RECIPIENT_DOES_NOT_EXIST"
REQUEST_LIMIT_EXCEEDED = "REQUEST_LIMIT_EXCEEDED"
RESOURCE_ALREADY_EXISTS = "RESOURCE_ALREADY_EXISTS"
RESOURCE_CONFLICT = "RESOURCE_CONFLICT"
RESOURCE_DOES_NOT_EXIST = "RESOURCE_DOES_NOT_EXIST"
RESOURCE_EXHAUSTED = "RESOURCE_EXHAUSTED"
RESOURCE_LIMIT_EXCEEDED = "RESOURCE_LIMIT_EXCEEDED"
SCHEMA_ALREADY_EXISTS = "SCHEMA_ALREADY_EXISTS"
SCHEMA_DOES_NOT_EXIST = "SCHEMA_DOES_NOT_EXIST"
SCHEMA_NOT_EMPTY = "SCHEMA_NOT_EMPTY"
SEARCH_QUERY_TOO_LONG = "SEARCH_QUERY_TOO_LONG"
SEARCH_QUERY_TOO_SHORT = "SEARCH_QUERY_TOO_SHORT"
SERVICE_UNDER_MAINTENANCE = "SERVICE_UNDER_MAINTENANCE"
SHARE_ALREADY_EXISTS = "SHARE_ALREADY_EXISTS"
SHARE_DOES_NOT_EXIST = "SHARE_DOES_NOT_EXIST"
STORAGE_CREDENTIAL_ALREADY_EXISTS = "STORAGE_CREDENTIAL_ALREADY_EXISTS"
STORAGE_CREDENTIAL_DOES_NOT_EXIST = "STORAGE_CREDENTIAL_DOES_NOT_EXIST"
TABLE_ALREADY_EXISTS = "TABLE_ALREADY_EXISTS"
TABLE_DOES_NOT_EXIST = "TABLE_DOES_NOT_EXIST"
TEMPORARILY_UNAVAILABLE = "TEMPORARILY_UNAVAILABLE"
UNAUTHENTICATED = "UNAUTHENTICATED"
UNAVAILABLE = "UNAVAILABLE"
UNKNOWN = "UNKNOWN"
UNPARSEABLE_HTTP_ERROR = "UNPARSEABLE_HTTP_ERROR"
WORKSPACE_TEMPORARILY_UNAVAILABLE = "WORKSPACE_TEMPORARILY_UNAVAILABLE"
class databricks.sdk.service.postgres.InitialEndpointSpec(group: EndpointGroupSpec | None = None)

Configuration for the initial Read/Write endpoint created during project creation.

group: EndpointGroupSpec | None = None

Settings for HA configuration of the endpoint.

as_dict() dict

Serializes the InitialEndpointSpec into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the InitialEndpointSpec into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) InitialEndpointSpec

Deserializes the InitialEndpointSpec from a dictionary.

class databricks.sdk.service.postgres.ListBranchesResponse(branches: 'Optional[List[Branch]]' = None, next_page_token: 'Optional[str]' = None)
branches: List[Branch] | None = None

List of branches in the project.

next_page_token: str | None = None

Token to request the next page of branches.

as_dict() dict

Serializes the ListBranchesResponse into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ListBranchesResponse into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ListBranchesResponse

Deserializes the ListBranchesResponse from a dictionary.

class databricks.sdk.service.postgres.ListDatabasesResponse(databases: 'Optional[List[Database]]' = None, next_page_token: 'Optional[str]' = None)
databases: List[Database] | None = None

List of databases.

next_page_token: str | None = None

Pagination token to request the next page of databases.

as_dict() dict

Serializes the ListDatabasesResponse into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ListDatabasesResponse into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ListDatabasesResponse

Deserializes the ListDatabasesResponse from a dictionary.

class databricks.sdk.service.postgres.ListEndpointsResponse(endpoints: 'Optional[List[Endpoint]]' = None, next_page_token: 'Optional[str]' = None)
endpoints: List[Endpoint] | None = None

List of compute endpoints in the branch.

next_page_token: str | None = None

Token to request the next page of compute endpoints.

as_dict() dict

Serializes the ListEndpointsResponse into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ListEndpointsResponse into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ListEndpointsResponse

Deserializes the ListEndpointsResponse from a dictionary.

class databricks.sdk.service.postgres.ListProjectsResponse(next_page_token: 'Optional[str]' = None, projects: 'Optional[List[Project]]' = None)
next_page_token: str | None = None

Token to request the next page of projects.

projects: List[Project] | None = None

List of all projects in the workspace that the user has permission to access.

as_dict() dict

Serializes the ListProjectsResponse into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ListProjectsResponse into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ListProjectsResponse

Deserializes the ListProjectsResponse from a dictionary.

class databricks.sdk.service.postgres.ListRolesResponse(next_page_token: 'Optional[str]' = None, roles: 'Optional[List[Role]]' = None)
next_page_token: str | None = None

Token to request the next page of Postgres roles.

roles: List[Role] | None = None

List of Postgres roles in the branch.

as_dict() dict

Serializes the ListRolesResponse into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ListRolesResponse into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ListRolesResponse

Deserializes the ListRolesResponse from a dictionary.

class databricks.sdk.service.postgres.NewPipelineSpec(budget_policy_id: 'Optional[str]' = None, storage_catalog: 'Optional[str]' = None, storage_schema: 'Optional[str]' = None)
budget_policy_id: str | None = None

Budget policy to set on the newly created pipeline.

storage_catalog: str | None = None

UC catalog for the pipeline to store intermediate files (checkpoints, event logs etc). This needs to be a standard catalog where the user has permissions to create Delta tables.

storage_schema: str | None = None

UC schema for the pipeline to store intermediate files (checkpoints, event logs etc). This needs to be in the standard catalog where the user has permissions to create Delta tables.

as_dict() dict

Serializes the NewPipelineSpec into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the NewPipelineSpec into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) NewPipelineSpec

Deserializes the NewPipelineSpec from a dictionary.

class databricks.sdk.service.postgres.Operation(done: bool | None = None, error: DatabricksServiceExceptionWithDetailsProto | None = None, metadata: dict | None = None, name: str | None = None, response: dict | None = None)

This resource represents a long-running operation that is the result of a network API call.

done: bool | None = None

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

error: DatabricksServiceExceptionWithDetailsProto | None = None

The error result of the operation in case of failure or cancellation.

metadata: dict | None = None

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata.

name: str | None = None

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.

response: dict | None = None

The normal, successful response of the operation.

as_dict() dict

Serializes the Operation into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the Operation into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) Operation

Deserializes the Operation from a dictionary.

class databricks.sdk.service.postgres.Project(create_time: 'Optional[Timestamp]' = None, delete_time: 'Optional[Timestamp]' = None, initial_endpoint_spec: 'Optional[InitialEndpointSpec]' = None, name: 'Optional[str]' = None, project_id: 'Optional[str]' = None, purge_time: 'Optional[Timestamp]' = None, spec: 'Optional[ProjectSpec]' = None, status: 'Optional[ProjectStatus]' = None, uid: 'Optional[str]' = None, update_time: 'Optional[Timestamp]' = None)
create_time: Timestamp | None = None

A timestamp indicating when the project was created.

delete_time: Timestamp | None = None

A timestamp indicating when the project was soft-deleted. Empty if the project is not deleted, otherwise set to a timestamp in the past.

initial_endpoint_spec: InitialEndpointSpec | None = None

Configuration settings for the initial Read/Write endpoint created inside the initial branch for a newly created project. If omitted, the initial endpoint created will have default settings, without high availability configured. This field does not apply to any endpoints created after project creation. Use spec.default_endpoint_settings to configure default settings for endpoints created after project creation.

name: str | None = None

Output only. The full resource path of the project. Format: projects/{project_id}

project_id: str | None = None

The part of the name, chosen by the user when the resource was created.

purge_time: Timestamp | None = None

A timestamp indicating when the project is scheduled for permanent deletion. Empty if the project is not deleted, otherwise set to a timestamp in the future.

spec: ProjectSpec | None = None

The spec contains the project configuration, including display_name, pg_version (Postgres version), history_retention_duration, and default_endpoint_settings.

status: ProjectStatus | None = None

The current status of a Project.

uid: str | None = None

System-generated unique ID for the project.

update_time: Timestamp | None = None

A timestamp indicating when the project was last updated.

as_dict() dict

Serializes the Project into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the Project into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) Project

Deserializes the Project from a dictionary.

class databricks.sdk.service.postgres.ProjectCustomTag(key: 'Optional[str]' = None, value: 'Optional[str]' = None)
key: str | None = None

The key of the custom tag.

value: str | None = None

The value of the custom tag.

as_dict() dict

Serializes the ProjectCustomTag into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ProjectCustomTag into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ProjectCustomTag

Deserializes the ProjectCustomTag from a dictionary.

class databricks.sdk.service.postgres.ProjectDefaultEndpointSettings(autoscaling_limit_max_cu: float | None = None, autoscaling_limit_min_cu: float | None = None, no_suspension: bool | None = None, pg_settings: Dict[str, str] | None = None, suspend_timeout_duration: Duration | None = None)

A collection of settings for a compute endpoint.

autoscaling_limit_max_cu: float | None = None

The maximum number of Compute Units. Minimum value is 0.5.

autoscaling_limit_min_cu: float | None = None

The minimum number of Compute Units. Minimum value is 0.5.

no_suspension: bool | None = None

When set to true, explicitly disables automatic suspension (never suspend). Should be set to true when provided. Mutually exclusive with suspend_timeout_duration. When updating, use spec.project_default_settings.suspension in the update_mask.

pg_settings: Dict[str, str] | None = None

A raw representation of Postgres settings.

suspend_timeout_duration: Duration | None = None

Duration of inactivity after which the compute endpoint is automatically suspended. If specified should be between 60s and 604800s (1 minute to 1 week). Mutually exclusive with no_suspension. When updating, use spec.project_default_settings.suspension in the update_mask.

as_dict() dict

Serializes the ProjectDefaultEndpointSettings into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ProjectDefaultEndpointSettings into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ProjectDefaultEndpointSettings

Deserializes the ProjectDefaultEndpointSettings from a dictionary.

class databricks.sdk.service.postgres.ProjectOperationMetadata
as_dict() dict

Serializes the ProjectOperationMetadata into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ProjectOperationMetadata into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ProjectOperationMetadata

Deserializes the ProjectOperationMetadata from a dictionary.

class databricks.sdk.service.postgres.ProjectSpec(budget_policy_id: 'Optional[str]' = None, custom_tags: 'Optional[List[ProjectCustomTag]]' = None, default_branch: 'Optional[str]' = None, default_endpoint_settings: 'Optional[ProjectDefaultEndpointSettings]' = None, display_name: 'Optional[str]' = None, enable_pg_native_login: 'Optional[bool]' = None, history_retention_duration: 'Optional[Duration]' = None, pg_version: 'Optional[int]' = None)
budget_policy_id: str | None = None

The desired budget policy to associate with the project. See status.budget_policy_id for the policy that is actually applied to the project.

custom_tags: List[ProjectCustomTag] | None = None

Custom tags to associate with the project. Forwarded to LBM for billing and cost tracking. To update tags, provide the new tag list and include “spec.custom_tags” in the update_mask. To clear all tags, provide an empty list and include “spec.custom_tags” in the update_mask. To preserve existing tags, omit this field from the update_mask (or use wildcard “*” which auto-excludes empty tags).

default_branch: str | None = None

The full resource path for the default branch of the project Format: projects/{project_id}/branches/{branch_id}

default_endpoint_settings: ProjectDefaultEndpointSettings | None = None
display_name: str | None = None

Human-readable project name. Length should be between 1 and 256 characters.

enable_pg_native_login: bool | None = None

Whether to enable PG native password login on all endpoints in this project. Defaults to false.

history_retention_duration: Duration | None = None

The number of seconds to retain the shared history for point in time recovery for all branches in this project. Value should be between 172800s (2 days) and 3024000s (35 days).

pg_version: int | None = None

The major Postgres version number. The set of supported versions may vary; consult the API documentation for currently accepted values.

as_dict() dict

Serializes the ProjectSpec into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ProjectSpec into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ProjectSpec

Deserializes the ProjectSpec from a dictionary.

class databricks.sdk.service.postgres.ProjectStatus(branch_logical_size_limit_bytes: 'Optional[int]' = None, budget_policy_id: 'Optional[str]' = None, custom_tags: 'Optional[List[ProjectCustomTag]]' = None, default_branch: 'Optional[str]' = None, default_endpoint_settings: 'Optional[ProjectDefaultEndpointSettings]' = None, display_name: 'Optional[str]' = None, enable_pg_native_login: 'Optional[bool]' = None, history_retention_duration: 'Optional[Duration]' = None, owner: 'Optional[str]' = None, pg_version: 'Optional[int]' = None, project_id: 'Optional[str]' = None, synthetic_storage_size_bytes: 'Optional[int]' = None)
branch_logical_size_limit_bytes: int | None = None

The logical size limit for a branch.

budget_policy_id: str | None = None

The budget policy that is applied to the project.

custom_tags: List[ProjectCustomTag] | None = None

The effective custom tags associated with the project.

default_branch: str | None = None

The full resource path of the default branch of the project

default_endpoint_settings: ProjectDefaultEndpointSettings | None = None

The effective default endpoint settings.

display_name: str | None = None

The effective human-readable project name.

enable_pg_native_login: bool | None = None

Whether to enable PG native password login on all endpoints in this project.

history_retention_duration: Duration | None = None

The effective number of seconds to retain the shared history for point in time recovery.

owner: str | None = None

The email of the project owner.

pg_version: int | None = None

The effective major Postgres version number.

project_id: str | None = None

Part of the resource name.

synthetic_storage_size_bytes: int | None = None

The current space occupied by the project in storage.

as_dict() dict

Serializes the ProjectStatus into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ProjectStatus into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ProjectStatus

Deserializes the ProjectStatus from a dictionary.

class databricks.sdk.service.postgres.ProvisioningInfoState
ACTIVE = "ACTIVE"
DEGRADED = "DEGRADED"
DELETING = "DELETING"
FAILED = "FAILED"
PROVISIONING = "PROVISIONING"
UPDATING = "UPDATING"
class databricks.sdk.service.postgres.ProvisioningPhase

The current phase of the data synchronization pipeline.

PROVISIONING_PHASE_INDEX_SCAN = "PROVISIONING_PHASE_INDEX_SCAN"
PROVISIONING_PHASE_INDEX_SORT = "PROVISIONING_PHASE_INDEX_SORT"
PROVISIONING_PHASE_MAIN = "PROVISIONING_PHASE_MAIN"
class databricks.sdk.service.postgres.RequestedClaims(permission_set: 'Optional[RequestedClaimsPermissionSet]' = None, resources: 'Optional[List[RequestedResource]]' = None)
permission_set: RequestedClaimsPermissionSet | None = None
resources: List[RequestedResource] | None = None
as_dict() dict

Serializes the RequestedClaims into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the RequestedClaims into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) RequestedClaims

Deserializes the RequestedClaims from a dictionary.

class databricks.sdk.service.postgres.RequestedClaimsPermissionSet
READ_ONLY = "READ_ONLY"
class databricks.sdk.service.postgres.RequestedResource(table_name: 'Optional[str]' = None)
table_name: str | None = None

The full Unity Catalog table name.

as_dict() dict

Serializes the RequestedResource into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the RequestedResource into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) RequestedResource

Deserializes the RequestedResource from a dictionary.

class databricks.sdk.service.postgres.Role(create_time: Timestamp | None = None, name: str | None = None, parent: str | None = None, role_id: str | None = None, spec: RoleRoleSpec | None = None, status: RoleRoleStatus | None = None, update_time: Timestamp | None = None)

Role represents a Postgres role within a Branch.

create_time: Timestamp | None = None
name: str | None = None

Output only. The full resource path of the role. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}

parent: str | None = None

The Branch where this Role exists. Format: projects/{project_id}/branches/{branch_id}

role_id: str | None = None

The part of the name, chosen by the user when the resource was created.

spec: RoleRoleSpec | None = None

The spec contains the role configuration, including identity type, authentication method, and role attributes.

status: RoleRoleStatus | None = None

Current status of the role, including its identity type, authentication method, and role attributes.

update_time: Timestamp | None = None
as_dict() dict

Serializes the Role into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the Role into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) Role

Deserializes the Role from a dictionary.

class databricks.sdk.service.postgres.RoleAttributes(bypassrls: bool | None = None, createdb: bool | None = None, createrole: bool | None = None)

Attributes that can be granted to a Postgres role. We are only implementing a subset for now, see xref: https://www.postgresql.org/docs/16/sql-createrole.html The values follow Postgres keyword naming e.g. CREATEDB, BYPASSRLS, etc. which is why they don’t include typical underscores between words.

bypassrls: bool | None = None
createdb: bool | None = None
createrole: bool | None = None
as_dict() dict

Serializes the RoleAttributes into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the RoleAttributes into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) RoleAttributes

Deserializes the RoleAttributes from a dictionary.

class databricks.sdk.service.postgres.RoleAuthMethod

How the role is authenticated when connecting to Postgres.

LAKEBASE_OAUTH_V1 = "LAKEBASE_OAUTH_V1"
NO_LOGIN = "NO_LOGIN"
PG_PASSWORD_SCRAM_SHA_256 = "PG_PASSWORD_SCRAM_SHA_256"
class databricks.sdk.service.postgres.RoleIdentityType

The type of the Databricks managed identity that this Role represents. Leave empty if you wish to create a regular Postgres role not associated with a Databricks identity.

GROUP = "GROUP"
SERVICE_PRINCIPAL = "SERVICE_PRINCIPAL"
USER = "USER"
class databricks.sdk.service.postgres.RoleMembershipRole

Roles that the DatabaseInstanceRole can be a member of.

DATABRICKS_SUPERUSER = "DATABRICKS_SUPERUSER"
class databricks.sdk.service.postgres.RoleOperationMetadata
as_dict() dict

Serializes the RoleOperationMetadata into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the RoleOperationMetadata into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) RoleOperationMetadata

Deserializes the RoleOperationMetadata from a dictionary.

class databricks.sdk.service.postgres.RoleRoleSpec(attributes: 'Optional[RoleAttributes]' = None, auth_method: 'Optional[RoleAuthMethod]' = None, identity_type: 'Optional[RoleIdentityType]' = None, membership_roles: 'Optional[List[RoleMembershipRole]]' = None, postgres_role: 'Optional[str]' = None)
attributes: RoleAttributes | None = None

The desired API-exposed Postgres role attribute to associate with the role. Optional.

auth_method: RoleAuthMethod | None = None

Controls how the Postgres role authenticates when a client opens a database connection. Supported values:

  • LAKEBASE_OAUTH_V1: the role authenticates by presenting a Databricks OAuth access token

derived from the backing managed identity (the Databricks user, service principal, or group named by the role’s postgres_role). No static password exists for roles using this method. * PG_PASSWORD_SCRAM_SHA_256: the role authenticates with a Postgres password verified server-side using the SCRAM-SHA-256 mechanism. Lakebase generates a password for the role. * NO_LOGIN: the role cannot open a Postgres session at all. Useful for roles that exist only to own objects or to aggregate privileges that are then granted to other, loginable roles.

If auth_method is left unspecified, a meaningful authentication method is derived from the identity_type: * For the managed identities, OAUTH is used. * For the regular postgres roles, authentication based on postgres passwords is used.

NOTE: for the Databricks identity type GROUP, LAKEBASE_OAUTH_V1 is the default auth method (group can login as well).

identity_type: RoleIdentityType | None = None

The type of role. When specifying a managed-identity, the chosen role_id must be a valid:

  • application ID for SERVICE_PRINCIPAL * user email for USER * group name for GROUP

membership_roles: List[RoleMembershipRole] | None = None

An enum value for a standard role that this role is a member of.

postgres_role: str | None = None

The name of the Postgres role.

This expects a valid Postgres identifier as specified in the link below. https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS

Required when creating the Role.

If you wish to create a Postgres Role backed by a managed Databricks identity, then postgres_role must be one of the following:

1. user email for IdentityType.USER 2. app ID for IdentityType.SERVICE_PRINCIPAL 2. group name for IdentityType.GROUP

as_dict() dict

Serializes the RoleRoleSpec into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the RoleRoleSpec into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) RoleRoleSpec

Deserializes the RoleRoleSpec from a dictionary.

class databricks.sdk.service.postgres.RoleRoleStatus(attributes: 'Optional[RoleAttributes]' = None, auth_method: 'Optional[RoleAuthMethod]' = None, identity_type: 'Optional[RoleIdentityType]' = None, membership_roles: 'Optional[List[RoleMembershipRole]]' = None, postgres_role: 'Optional[str]' = None, role_id: 'Optional[str]' = None)
attributes: RoleAttributes | None = None

The PG role attributes associated with the role.

auth_method: RoleAuthMethod | None = None
identity_type: RoleIdentityType | None = None

The type of the role.

membership_roles: List[RoleMembershipRole] | None = None

An enum value for a standard role that this role is a member of.

postgres_role: str | None = None

The name of the Postgres role.

role_id: str | None = None

Part of the resource name.

as_dict() dict

Serializes the RoleRoleStatus into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the RoleRoleStatus into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) RoleRoleStatus

Deserializes the RoleRoleStatus from a dictionary.

class databricks.sdk.service.postgres.SyncedTable(create_time: 'Optional[Timestamp]' = None, name: 'Optional[str]' = None, spec: 'Optional[SyncedTableSyncedTableSpec]' = None, status: 'Optional[SyncedTableSyncedTableStatus]' = None, synced_table_id: 'Optional[str]' = None, uid: 'Optional[str]' = None)
create_time: Timestamp | None = None
name: str | None = None

Output only. The Full resource name of the synced table in Postgres where (catalog, schema, table) are the UC entity names.

Format “synced_tables/{catalog}.{schema}.{table}”

For the corresponding source table in the Unity catalog look for the “source_table_full_name” attribute.

spec: SyncedTableSyncedTableSpec | None = None

Configuration details of the synced table, such as the source table, scheduling policy, etc. This attribute is specified at creation time and most fields are returned as is on subsequent queries.

status: SyncedTableSyncedTableStatus | None = None

Synced Table data synchronization status.

synced_table_id: str | None = None

The part of the name, chosen by the user when the resource was created.

uid: str | None = None

The Unity Catalog table ID for this synced table.

as_dict() dict

Serializes the SyncedTable into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the SyncedTable into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) SyncedTable

Deserializes the SyncedTable from a dictionary.

class databricks.sdk.service.postgres.SyncedTableOperationMetadata

Metadata for SyncedTable long-running operations.

as_dict() dict

Serializes the SyncedTableOperationMetadata into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the SyncedTableOperationMetadata into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) SyncedTableOperationMetadata

Deserializes the SyncedTableOperationMetadata from a dictionary.

class databricks.sdk.service.postgres.SyncedTablePipelineProgress(estimated_completion_time_seconds: float | None = None, latest_version_currently_processing: int | None = None, sync_progress_completion: float | None = None, synced_row_count: int | None = None, total_row_count: int | None = None)

Progress information of the Synced Table data synchronization pipeline.

estimated_completion_time_seconds: float | None = None

The estimated time remaining to complete this update in seconds.

latest_version_currently_processing: int | None = None

The source table Delta version that was last processed by the pipeline. The pipeline may not have completely processed this version yet.

sync_progress_completion: float | None = None

The completion ratio of this update. This is a number between 0 and 1.

synced_row_count: int | None = None

The number of rows that have been synced in this update.

total_row_count: int | None = None

The total number of rows that need to be synced in this update. This number may be an estimate.

as_dict() dict

Serializes the SyncedTablePipelineProgress into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the SyncedTablePipelineProgress into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) SyncedTablePipelineProgress

Deserializes the SyncedTablePipelineProgress from a dictionary.

class databricks.sdk.service.postgres.SyncedTablePosition(delta_table_sync_info: 'Optional[DeltaTableSyncInfo]' = None, sync_end_time: 'Optional[Timestamp]' = None, sync_start_time: 'Optional[Timestamp]' = None)
delta_table_sync_info: DeltaTableSyncInfo | None = None
sync_end_time: Timestamp | None = None

The end timestamp of the most recent successful synchronization. This is the time when the data is available in the synced table.

sync_start_time: Timestamp | None = None

The starting timestamp of the most recent successful synchronization from the source table to the destination (synced) table. Note this is the starting timestamp of the sync operation, not the end time. E.g., for a batch, this is the time when the sync operation started.

as_dict() dict

Serializes the SyncedTablePosition into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the SyncedTablePosition into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) SyncedTablePosition

Deserializes the SyncedTablePosition from a dictionary.

class databricks.sdk.service.postgres.SyncedTableState

The state of a synced table.

SYNCED_TABLE_OFFLINE = "SYNCED_TABLE_OFFLINE"
SYNCED_TABLE_OFFLINE_FAILED = "SYNCED_TABLE_OFFLINE_FAILED"
SYNCED_TABLE_ONLINE = "SYNCED_TABLE_ONLINE"
SYNCED_TABLE_ONLINE_CONTINUOUS_UPDATE = "SYNCED_TABLE_ONLINE_CONTINUOUS_UPDATE"
SYNCED_TABLE_ONLINE_NO_PENDING_UPDATE = "SYNCED_TABLE_ONLINE_NO_PENDING_UPDATE"
SYNCED_TABLE_ONLINE_PIPELINE_FAILED = "SYNCED_TABLE_ONLINE_PIPELINE_FAILED"
SYNCED_TABLE_ONLINE_TRIGGERED_UPDATE = "SYNCED_TABLE_ONLINE_TRIGGERED_UPDATE"
SYNCED_TABLE_ONLINE_UPDATING_PIPELINE_RESOURCES = "SYNCED_TABLE_ONLINE_UPDATING_PIPELINE_RESOURCES"
SYNCED_TABLE_PROVISIONING = "SYNCED_TABLE_PROVISIONING"
SYNCED_TABLE_PROVISIONING_INITIAL_SNAPSHOT = "SYNCED_TABLE_PROVISIONING_INITIAL_SNAPSHOT"
SYNCED_TABLE_PROVISIONING_PIPELINE_RESOURCES = "SYNCED_TABLE_PROVISIONING_PIPELINE_RESOURCES"
class databricks.sdk.service.postgres.SyncedTableSyncedTableSpec(accelerated_sync: 'Optional[bool]' = None, branch: 'Optional[str]' = None, create_database_objects_if_missing: 'Optional[bool]' = None, existing_pipeline_id: 'Optional[str]' = None, new_pipeline_spec: 'Optional[NewPipelineSpec]' = None, postgres_database: 'Optional[str]' = None, primary_key_columns: 'Optional[List[str]]' = None, scheduling_policy: 'Optional[SyncedTableSyncedTableSpecSyncedTableSchedulingPolicy]' = None, source_table_full_name: 'Optional[str]' = None, timeseries_key: 'Optional[str]' = None, type_overrides: 'Optional[List[SyncedTableSyncedTableSpecTypeOverride]]' = None)
accelerated_sync: bool | None = None

When true, enables accelerated sync mode for the initial data load. This significantly improves performance for large tables. Requires workspace-level enablement through Lakebase Accelerated Sync preview.

branch: str | None = None

The full resource name the branch associated with the table.

Format: “projects/{project_id}/branches/{branch_id}”.

create_database_objects_if_missing: bool | None = None

If true, the synced table’s logical database and schema resources in PG will be created if they do not already exist. The request will fail if this is false and the database/schema do not exist.

Defaults to true if omitted.

existing_pipeline_id: str | None = None

ID of an existing pipeline to bin-pack this synced table into. At most one of existing_pipeline_id and new_pipeline_spec should be defined.

The pipeline used for the synced table is returned via the top level pipeline_id attribute.

new_pipeline_spec: NewPipelineSpec | None = None

Specification for creating a new pipeline. At most one of existing_pipeline_id and new_pipeline_spec should be defined.

The pipeline used for the synced table is returned via the top level pipeline_id attribute.

postgres_database: str | None = None

The Postgres database name where the synced table will be created in.

If this synced table is created inside a Lakebase Catalog, this attribute can be omitted on creation and is inferred from the postgres_database associated with the Lakebase Catalog. If specified when inside a Lakebase Catalog, the value must match.

A value must be specified when creating a synced table inside a Standard Catalog.

primary_key_columns: List[str] | None = None

Primary Key columns to be used for data insert/update in the destination.

scheduling_policy: SyncedTableSyncedTableSpecSyncedTableSchedulingPolicy | None = None

Scheduling policy of the underlying pipeline.

source_table_full_name: str | None = None

Three-part (catalog, schema, table) name of the source Delta table.

For the corresponding destination table, use any of the two:

  • synced_table_id used at the creation of the SyncedTable * “name” consisting of

“synced_tables/” prefix and the full name of the destination table.

timeseries_key: str | None = None

Time series key to deduplicate (tie-break) rows with the same primary key.

type_overrides: List[SyncedTableSyncedTableSpecTypeOverride] | None = None

Override the default Delta->PG type mapping for specific columns. A TypeOverride with PG_SPECIFIC_TYPE_UNSPECIFIED is rejected; a valid pg_type must be set.

as_dict() dict

Serializes the SyncedTableSyncedTableSpec into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the SyncedTableSyncedTableSpec into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) SyncedTableSyncedTableSpec

Deserializes the SyncedTableSyncedTableSpec from a dictionary.

class databricks.sdk.service.postgres.SyncedTableSyncedTableSpecPgSpecificType

PostgreSQL-specific target types that can override the default Delta-to-PG mapping.

PG_SPECIFIC_TYPE_VECTOR = "PG_SPECIFIC_TYPE_VECTOR"
class databricks.sdk.service.postgres.SyncedTableSyncedTableSpecSyncedTableSchedulingPolicy

Scheduling policy of the synced table’s underlying pipeline.

CONTINUOUS = "CONTINUOUS"
SNAPSHOT = "SNAPSHOT"
TRIGGERED = "TRIGGERED"
class databricks.sdk.service.postgres.SyncedTableSyncedTableSpecTypeOverride(column_name: str, pg_type: SyncedTableSyncedTableSpecPgSpecificType, size: int | None = None)

Overrides the default Delta-to-PostgreSQL type mapping for a single column.

column_name: str

Name of the source column whose target PostgreSQL type should be overridden.

pg_type: SyncedTableSyncedTableSpecPgSpecificType

PostgreSQL-specific target type to use for the column.

size: int | None = None

Size parameter for the target type. Required when pg_type is PG_SPECIFIC_TYPE_VECTOR (specifies the vector dimension, e.g., 1024).

as_dict() dict

Serializes the SyncedTableSyncedTableSpecTypeOverride into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the SyncedTableSyncedTableSpecTypeOverride into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) SyncedTableSyncedTableSpecTypeOverride

Deserializes the SyncedTableSyncedTableSpecTypeOverride from a dictionary.

class databricks.sdk.service.postgres.SyncedTableSyncedTableStatus(detailed_state: 'Optional[SyncedTableState]' = None, last_processed_commit_version: 'Optional[int]' = None, last_sync: 'Optional[SyncedTablePosition]' = None, last_sync_time: 'Optional[Timestamp]' = None, message: 'Optional[str]' = None, ongoing_sync_progress: 'Optional[SyncedTablePipelineProgress]' = None, pipeline_id: 'Optional[str]' = None, project: 'Optional[str]' = None, provisioning_phase: 'Optional[ProvisioningPhase]' = None, unity_catalog_provisioning_state: 'Optional[ProvisioningInfoState]' = None)
detailed_state: SyncedTableState | None = None

The state of the synced table.

last_processed_commit_version: int | None = None

The last source table Delta version that was successfully synced to the synced table.

last_sync: SyncedTablePosition | None = None

Summary of the last successful synchronization from source to destination.

last_sync_time: Timestamp | None = None

The end timestamp of the last time any data was synchronized from the source table to the synced table. This is when the data is available in the synced table.

message: str | None = None

A text description of the current state of the synced table.

ongoing_sync_progress: SyncedTablePipelineProgress | None = None
pipeline_id: str | None = None

ID of the associated pipeline.

project: str | None = None

The full resource name of the project associated with the table.

Format: “projects/{project_id}”.

provisioning_phase: ProvisioningPhase | None = None

The current phase of the data synchronization pipeline.

unity_catalog_provisioning_state: ProvisioningInfoState | None = None

The provisioning state of the synced table entity in Unity Catalog.

as_dict() dict

Serializes the SyncedTableSyncedTableStatus into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the SyncedTableSyncedTableStatus into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) SyncedTableSyncedTableStatus

Deserializes the SyncedTableSyncedTableStatus from a dictionary.