Apps

Package: databricks.bundles.apps

Classes

class App
name: str

The name of the app. The name must contain only lowercase alphanumeric characters and hyphens. It must be unique within the workspace.

budget_policy_id: str | None = None

[Public Preview]

compute_size: ComputeSize | None = None
config: AppConfig | None = None
description: str | None = None

The description of the app.

git_repository: GitRepository | None = None

Git repository configuration for app deployments. When specified, deployments can reference code from this repository by providing only the git reference (branch, tag, or commit).

git_source: GitSource | None = None

Git source configuration for app deployments. Specifies which git reference (branch, tag, or commit) to use when deploying the app. Used in conjunction with git_repository to deploy code directly from git. The source_code_path within git_source specifies the relative path to the app code within the repository.

lifecycle: LifecycleWithStarted | None = None

Settings that control the deployment lifecycle of the resource, such as preventing it from being destroyed.

permissions: list[AppPermission]

The permissions to apply to this resource.

resources: list[AppResource]

Resources for the app.

source_code_path: str | None = None
telemetry_export_destinations: list[TelemetryExportDestination]
usage_policy_id: str | None = None

[Public Preview]

user_api_scopes: list[str]

[Public Preview]

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppConfig
command: list[str]
env: list[AppEnvVar]
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppEnvVar
name: str
value: str | None = None
value_from: str | None = None
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppPermission
level: AppPermissionLevel

The permission level to apply. The allowed levels depend on the resource type.

group_name: str | None = None

The name of the group granted the permission level.

service_principal_name: str | None = None

The name of the service principal granted the permission level.

user_name: str | None = None

The name of the user granted the permission level.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppPermissionLevel

Permission level

CAN_MANAGE = 'CAN_MANAGE'
CAN_USE = 'CAN_USE'
class AppResource
name: str

Name of the App Resource.

app: AppResourceApp | None = None
database: AppResourceDatabase | None = None
description: str | None = None

Description of the App Resource.

experiment: AppResourceExperiment | None = None
genie_space: AppResourceGenieSpace | None = None
job: AppResourceJob | None = None
postgres: AppResourcePostgres | None = None
secret: AppResourceSecret | None = None
serving_endpoint: AppResourceServingEndpoint | None = None
sql_warehouse: AppResourceSqlWarehouse | None = None
uc_securable: AppResourceUcSecurable | None = None
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppResourceApp
name: str | None = None
permission: AppResourceAppAppPermission | None = None
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppResourceAppAppPermission
CAN_USE = 'CAN_USE'
class AppResourceDatabase
database_name: str
instance_name: str
permission: AppResourceDatabaseDatabasePermission
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppResourceDatabaseDatabasePermission
CAN_CONNECT_AND_CREATE = 'CAN_CONNECT_AND_CREATE'
class AppResourceExperiment
experiment_id: str
permission: AppResourceExperimentExperimentPermission
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppResourceExperimentExperimentPermission
CAN_MANAGE = 'CAN_MANAGE'
CAN_EDIT = 'CAN_EDIT'
CAN_READ = 'CAN_READ'
class AppResourceGenieSpace
name: str
permission: AppResourceGenieSpaceGenieSpacePermission
space_id: str
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppResourceGenieSpaceGenieSpacePermission
CAN_MANAGE = 'CAN_MANAGE'
CAN_EDIT = 'CAN_EDIT'
CAN_RUN = 'CAN_RUN'
CAN_VIEW = 'CAN_VIEW'
class AppResourceJob
id: str

Id of the job to grant permission on.

permission: AppResourceJobJobPermission

Permissions to grant on the Job. Supported permissions are: “CAN_MANAGE”, “IS_OWNER”, “CAN_MANAGE_RUN”, “CAN_VIEW”.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppResourceJobJobPermission
CAN_MANAGE = 'CAN_MANAGE'
IS_OWNER = 'IS_OWNER'
CAN_MANAGE_RUN = 'CAN_MANAGE_RUN'
CAN_VIEW = 'CAN_VIEW'
class AppResourcePostgres
branch: str | None = None
database: str | None = None
permission: AppResourcePostgresPostgresPermission | None = None
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppResourcePostgresPostgresPermission
CAN_CONNECT_AND_CREATE = 'CAN_CONNECT_AND_CREATE'
class AppResourceSecret
key: str

Key of the secret to grant permission on.

permission: AppResourceSecretSecretPermission

Permission to grant on the secret scope. For secrets, only one permission is allowed. Permission must be one of: “READ”, “WRITE”, “MANAGE”.

scope: str

Scope of the secret to grant permission on.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppResourceSecretSecretPermission

Permission to grant on the secret scope. Supported permissions are: “READ”, “WRITE”, “MANAGE”.

READ = 'READ'
WRITE = 'WRITE'
MANAGE = 'MANAGE'
class AppResourceServingEndpoint
name: str

Name of the serving endpoint to grant permission on.

permission: AppResourceServingEndpointServingEndpointPermission

Permission to grant on the serving endpoint. Supported permissions are: “CAN_MANAGE”, “CAN_QUERY”, “CAN_VIEW”.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppResourceServingEndpointServingEndpointPermission
CAN_MANAGE = 'CAN_MANAGE'
CAN_QUERY = 'CAN_QUERY'
CAN_VIEW = 'CAN_VIEW'
class AppResourceSqlWarehouse
id: str

Id of the SQL warehouse to grant permission on.

permission: AppResourceSqlWarehouseSqlWarehousePermission

Permission to grant on the SQL warehouse. Supported permissions are: “CAN_MANAGE”, “CAN_USE”, “IS_OWNER”.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppResourceSqlWarehouseSqlWarehousePermission
CAN_MANAGE = 'CAN_MANAGE'
CAN_USE = 'CAN_USE'
IS_OWNER = 'IS_OWNER'
class AppResourceUcSecurable
permission: AppResourceUcSecurableUcSecurablePermission
securable_full_name: str
securable_type: AppResourceUcSecurableUcSecurableType
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class AppResourceUcSecurableUcSecurablePermission
READ_VOLUME = 'READ_VOLUME'
WRITE_VOLUME = 'WRITE_VOLUME'
SELECT = 'SELECT'
EXECUTE = 'EXECUTE'
USE_CONNECTION = 'USE_CONNECTION'
MODIFY = 'MODIFY'
class AppResourceUcSecurableUcSecurableType
VOLUME = 'VOLUME'
TABLE = 'TABLE'
FUNCTION = 'FUNCTION'
CONNECTION = 'CONNECTION'
class ComputeSize
MEDIUM = 'MEDIUM'
LARGE = 'LARGE'
XLARGE = 'XLARGE'
class GitRepository

Git repository configuration specifying the location of the repository.

provider: str

Git provider. Case insensitive. Supported values: gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit.

url: str

URL of the Git repository.

auto_deploy: bool | None = None

When true, automatically deploys the app on push events to the branch configured in the app’s deployment_source.git_source.

caller_credential_id: int | None = None

ID of a personal access token Git credential owned by the caller, used to grant the app’s service principal access to this repository.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class GitSource

Complete git source specification including repository location and reference.

branch: str | None = None

Git branch to checkout.

commit: str | None = None

Git commit SHA to checkout.

source_code_path: str | None = None

Relative path to the app source code within the Git repository. If not specified, the root of the repository is used.

tag: str | None = None

Git tag to checkout.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class LifecycleWithStarted
prevent_destroy: bool | None = None

Lifecycle setting to prevent the resource from being destroyed.

started: bool | None = None

Lifecycle setting to deploy the resource in started mode. Only supported for apps, clusters, and sql_warehouses in direct deployment mode.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class TelemetryExportDestination

A single telemetry export destination with its configuration and status.

unity_catalog: UnityCatalog | None = None

Unity Catalog Destinations for OTEL telemetry export.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class UnityCatalog

Unity Catalog Destinations for OTEL telemetry export.

logs_table: str

Unity Catalog table for OTEL logs.

metrics_table: str

Unity Catalog table for OTEL metrics.

traces_table: str

Unity Catalog table for OTEL traces (spans).

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict