Apps¶
Package: databricks.bundles.apps
Classes¶
- class App¶
An app that runs on Databricks Apps. The app runs on managed compute in the workspace and is deployed from a workspace folder or a Git repository. Each app acts as its own dedicated service principal.
- 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] ID of the serverless budget policy that the app’s compute usage is attributed to. Budget policies and usage policies are alternatives: set at most one of budget_policy_id and usage_policy_id.
- compute_max_instances: int | None = None¶
Maximum number of app instances the app is configured to run. Must be set together with compute_min_instances.
- compute_min_instances: int | None = None¶
Minimum number of app instances the app is configured to run. Must be set together with compute_max_instances.
- compute_size: ComputeSize | None = None¶
Size of the compute instances the app runs on. Defaults to MEDIUM. Larger sizes provide more CPU and memory at a higher hourly cost. See https://docs.databricks.com/aws/en/dev-tools/databricks-apps/compute-size.
- 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]¶
Databricks resources the app depends on. Each entry grants the app’s service principal the listed permission on one resource and makes that resource available to the app under the entry’s name.
- source_code_path: str | None = None¶
Workspace file system path of the app source code. On create, the app is deployed from this path. Alternative to git_source.
- telemetry_export_destinations: list[TelemetryExportDestination]¶
Destinations that receive the app’s OpenTelemetry logs, metrics and traces. Changes take effect when the app is next deployed.
- thumbnail_path: str | None = None¶
The local path of a PNG or JPEG image of at most 250 KB to show as the app’s thumbnail in the Apps UI, relative to the defining YAML file. Removing it deletes the thumbnail.
- usage_policy_id: str | None = None¶
[Public Preview] ID of the usage policy that the app’s compute usage is attributed to. Alternative to budget_policy_id.
- user_api_scopes: list[str]¶
[Public Preview] API scopes the app requests for user authorization. The user access token that Databricks forwards to the app is limited to these scopes plus the default identity scopes, so the app can act on the user’s behalf only within them. Workspace admins can restrict which scopes apps in the workspace may request. See https://docs.databricks.com/aws/en/dev-tools/databricks-apps/auth.
- class AppConfig¶
- class AppEnvVar¶
- class AppPermission¶
- level: AppPermissionLevel¶
The permission level to apply. The allowed levels depend on the resource type.
- class AppResource¶
- name: str¶
Key that identifies the resource within the app. The app configuration (app.yaml) references the resource by this key.
- app: AppResourceApp | None = None¶
Another app in the workspace that this app is granted access to.
- database: AppResourceDatabase | None = None¶
Lakebase Provisioned database the app is granted access to.
- experiment: AppResourceExperiment | None = None¶
MLflow experiment the app is granted access to.
- genie_space: AppResourceGenieSpace | None = None¶
Genie space the app is granted access to.
- job: AppResourceJob | None = None¶
Lakeflow job the app is granted access to.
- postgres: AppResourcePostgres | None = None¶
Lakebase Autoscaling Postgres database the app is granted access to.
- secret: AppResourceSecret | None = None¶
Secret the app is granted access to.
- serving_endpoint: AppResourceServingEndpoint | None = None¶
Model serving endpoint the app is granted access to.
- sql_warehouse: AppResourceSqlWarehouse | None = None¶
SQL warehouse the app is granted access to.
- uc_securable: AppResourceUcSecurable | None = None¶
Unity Catalog securable (volume, table, function, connection or model service) the app is granted a privilege on.
- class AppResourceApp¶
-
- permission: AppResourceAppAppPermission | None = None¶
Permission to grant on that app.
- class AppResourceDatabase¶
-
- permission: AppResourceDatabaseDatabasePermission¶
Permission to grant the app on the database.
- class AppResourceExperiment¶
-
- permission: AppResourceExperimentExperimentPermission¶
Permission to grant the app on the experiment.
- class AppResourceExperimentExperimentPermission¶
- CAN_MANAGE = 'CAN_MANAGE'¶
- CAN_EDIT = 'CAN_EDIT'¶
- CAN_READ = 'CAN_READ'¶
- class AppResourceGenieSpace¶
-
- permission: AppResourceGenieSpaceGenieSpacePermission¶
Permission to grant the app on the Genie space.
- class AppResourceGenieSpaceGenieSpacePermission¶
- CAN_MANAGE = 'CAN_MANAGE'¶
- CAN_EDIT = 'CAN_EDIT'¶
- CAN_RUN = 'CAN_RUN'¶
- CAN_VIEW = 'CAN_VIEW'¶
- class AppResourceJob¶
-
- permission: AppResourceJobJobPermission¶
Permissions to grant on the Job. Supported permissions are: “CAN_MANAGE”, “IS_OWNER”, “CAN_MANAGE_RUN”, “CAN_VIEW”.
- 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¶
Resource name of the Lakebase Autoscaling branch, in the form projects/{project}/branches/{branch}.
- database: str | None = None¶
Resource name of the database within the branch, in the form projects/{project}/branches/{branch}/databases/{database}.
- permission: AppResourcePostgresPostgresPermission | None = None¶
Permission to grant the app on the database.
- class AppResourceSecret¶
-
- permission: AppResourceSecretSecretPermission¶
Permission to grant on the secret scope. For secrets, only one permission is allowed. Permission must be one of: “READ”, “WRITE”, “MANAGE”.
- class AppResourceSecretSecretPermission¶
Permission to grant on the secret scope. Supported permissions are: “READ”, “WRITE”, “MANAGE”.
- READ = 'READ'¶
- WRITE = 'WRITE'¶
- MANAGE = 'MANAGE'¶
- class AppResourceServingEndpoint¶
-
- permission: AppResourceServingEndpointServingEndpointPermission¶
Permission to grant on the serving endpoint. Supported permissions are: “CAN_MANAGE”, “CAN_QUERY”, “CAN_VIEW”.
- class AppResourceServingEndpointServingEndpointPermission¶
- CAN_MANAGE = 'CAN_MANAGE'¶
- CAN_QUERY = 'CAN_QUERY'¶
- CAN_VIEW = 'CAN_VIEW'¶
- class AppResourceSqlWarehouse¶
-
- permission: AppResourceSqlWarehouseSqlWarehousePermission¶
Permission to grant on the SQL warehouse. Supported permissions are: “CAN_MANAGE”, “CAN_USE”, “IS_OWNER”.
- class AppResourceSqlWarehouseSqlWarehousePermission¶
- CAN_MANAGE = 'CAN_MANAGE'¶
- CAN_USE = 'CAN_USE'¶
- IS_OWNER = 'IS_OWNER'¶
- class AppResourceUcSecurable¶
- permission: AppResourceUcSecurableUcSecurablePermission¶
Privilege to grant the app on the securable. The privilege must be valid for the securable type, such as READ_VOLUME for a volume or SELECT for a table.
- securable_full_name: str¶
Full name of the Unity Catalog securable. For volumes, tables and functions this is the three-level catalog.schema.object name.
- securable_type: AppResourceUcSecurableUcSecurableType¶
Kind of Unity Catalog securable that securable_full_name refers to.
- 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'¶
- MODEL_SERVICE = 'MODEL_SERVICE'¶
- class DependsOn¶
- 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.
- 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.
- class GitSource¶
Complete git source specification including repository location and reference.
- class LifecycleWithStarted¶
- depends_on: list[DependsOn]¶
Resources that must be deployed before this resource and deleted after it. Unlike variable references, this only affects ordering.
- prevent_destroy: bool | None = None¶
Lifecycle setting to prevent the resource from being destroyed.
- class TelemetryExportDestination¶
A single telemetry export destination with its configuration and status.
- unity_catalog: UnityCatalog | None = None¶
Unity Catalog tables that receive the telemetry.
- class UnityCatalog¶
Unity Catalog Destinations for OTEL telemetry export.
- logs_table: str¶
Three-level name of the Unity Catalog table that receives OpenTelemetry logs. The table is created if it does not exist.
- metrics_table: str¶
Three-level name of the Unity Catalog table that receives OpenTelemetry metrics. The table is created if it does not exist.