Skip to content

Connection

laktory.models.resources.databricks.Connection ¤

Bases: ConnectionBase

Databricks Connection

Examples:

import io

from laktory import models

connection_yaml = '''
name: my-mysql-connection
connection_type: MYSQL
comment: Connection to MySQL database
options:
  host: mysql.example.com
  port: "3306"
  user: admin
grants:
- principal: account users
  privileges:
  - USE_CONNECTION
'''
connection = models.resources.databricks.Connection.model_validate_yaml(
    io.StringIO(connection_yaml)
)
References
BASE DESCRIPTION
comment

TYPE: str | None | VariableType DEFAULT: None

connection_type

TYPE: str | None | VariableType DEFAULT: None

name

TYPE: str | None | VariableType DEFAULT: None

options

TYPE: dict[str, str] | None | VariableType DEFAULT: None

owner

TYPE: str | None | VariableType DEFAULT: None

properties

TYPE: dict[str, str] | None | VariableType DEFAULT: None

read_only

TYPE: bool | None | VariableType DEFAULT: None

LAKTORY DESCRIPTION
grant

Non-destructive grant for specific principal(s). Adds or updates privileges for the listed principal(s) and leaves grants for all other principals untouched. Use when access is managed from multiple sources (Laktory, Databricks UI, etc.). Mutually exclusive with grants.

TYPE: ConnectionGrant | list[ConnectionGrant] | VariableType DEFAULT: None

grants

Authoritative grant list for all principals. Replaces every existing grant on this Connection - including those set outside Laktory - with only the entries listed here. Use only when Laktory owns all access management for this resource. Mutually exclusive with grant.

TYPE: list[ConnectionGrant | VariableType] | VariableType DEFAULT: None

ATTRIBUTE DESCRIPTION
additional_core_resources
  • connection grants

TYPE: list

additional_core_resources property ¤

  • connection grants