Bundle Deployments¶
These dataclasses are used in the SDK to represent API requests and responses for services in the databricks.sdk.service.bundledeployments module.
- class databricks.sdk.service.bundledeployments.Deployment(create_time: Timestamp | None = None, created_by: str | None = None, deployment_mode: DeploymentMode | None = None, destroy_time: Timestamp | None = None, destroyed_by: str | None = None, display_name: str | None = None, git_info: GitInfo | None = None, initial_parent_path: str | None = None, last_version_id: str | None = None, name: str | None = None, status: DeploymentStatus | None = None, target_name: str | None = None, update_time: Timestamp | None = None, workspace_info: WorkspaceInfo | None = None)¶
A bundle deployment registered with the control plane.
- create_time: Timestamp | None = None¶
When the deployment was created.
- created_by: str | None = None¶
The user who created the deployment (email or principal name).
- deployment_mode: DeploymentMode | None = None¶
Bundle target deployment mode (development or production), derived from the most recent version’s mode.
- destroy_time: Timestamp | None = None¶
When the deployment was destroyed (i.e.
bundle destroycompleted). Unset if the deployment has not been destroyed. Named destroy_time (not delete_time) because this tracks thedatabricks bundle destroycommand, not the API-level deletion.
- destroyed_by: str | None = None¶
The user who destroyed the deployment (email or principal name). Unset if the deployment has not been destroyed.
- display_name: str | None = None¶
Human-readable name for the deployment. Output only: it is denormalized from the latest version, not set directly on the deployment.
- git_info: GitInfo | None = None¶
Git provenance of the deployment’s source, derived from the latest version.
- initial_parent_path: str | None = None¶
The workspace path of the folder where the deployment is initially created. Includes a leading slash and no trailing slash. On create, the deployment is registered as a typed BUNDLE_DEPLOYMENT tree node under this folder, which must already exist. This field is input only and is not returned in create, get, or list responses. The service rejects create requests that omit it.
- last_version_id: str | None = None¶
The version_id of the most recent deployment version.
- name: str | None = None¶
Resource name of the deployment. Format: deployments/{deployment_id}
- status: DeploymentStatus | None = None¶
Current status of the deployment.
- target_name: str | None = None¶
The bundle target name associated with this deployment. Output only: it is denormalized from the latest version, not set directly on the deployment.
- update_time: Timestamp | None = None¶
When the deployment was last updated.
- workspace_info: WorkspaceInfo | None = None¶
Workspace location of the deployment, derived from the latest version.
- as_dict() dict¶
Serializes the Deployment into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Deployment into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) Deployment¶
Deserializes the Deployment from a dictionary.
- class databricks.sdk.service.bundledeployments.DeploymentMode¶
Bundle target deployment mode. Mirrors the
modefield on a bundle target indatabricks.yml(see https://docs.databricks.com/dev-tools/bundles/deployment-modes).- DEPLOYMENT_MODE_DEVELOPMENT = "DEPLOYMENT_MODE_DEVELOPMENT"¶
- DEPLOYMENT_MODE_PRODUCTION = "DEPLOYMENT_MODE_PRODUCTION"¶
- class databricks.sdk.service.bundledeployments.DeploymentResourceType¶
Type of a deployment resource.
- DEPLOYMENT_RESOURCE_TYPE_ALERT = "DEPLOYMENT_RESOURCE_TYPE_ALERT"¶
- DEPLOYMENT_RESOURCE_TYPE_APP = "DEPLOYMENT_RESOURCE_TYPE_APP"¶
- DEPLOYMENT_RESOURCE_TYPE_CATALOG = "DEPLOYMENT_RESOURCE_TYPE_CATALOG"¶
- DEPLOYMENT_RESOURCE_TYPE_CLUSTER = "DEPLOYMENT_RESOURCE_TYPE_CLUSTER"¶
- DEPLOYMENT_RESOURCE_TYPE_DASHBOARD = "DEPLOYMENT_RESOURCE_TYPE_DASHBOARD"¶
- DEPLOYMENT_RESOURCE_TYPE_DATABASE_CATALOG = "DEPLOYMENT_RESOURCE_TYPE_DATABASE_CATALOG"¶
- DEPLOYMENT_RESOURCE_TYPE_DATABASE_INSTANCE = "DEPLOYMENT_RESOURCE_TYPE_DATABASE_INSTANCE"¶
- DEPLOYMENT_RESOURCE_TYPE_EXPERIMENT = "DEPLOYMENT_RESOURCE_TYPE_EXPERIMENT"¶
- DEPLOYMENT_RESOURCE_TYPE_EXTERNAL_LOCATION = "DEPLOYMENT_RESOURCE_TYPE_EXTERNAL_LOCATION"¶
- DEPLOYMENT_RESOURCE_TYPE_JOB = "DEPLOYMENT_RESOURCE_TYPE_JOB"¶
- DEPLOYMENT_RESOURCE_TYPE_MODEL = "DEPLOYMENT_RESOURCE_TYPE_MODEL"¶
- DEPLOYMENT_RESOURCE_TYPE_MODEL_SERVING_ENDPOINT = "DEPLOYMENT_RESOURCE_TYPE_MODEL_SERVING_ENDPOINT"¶
- DEPLOYMENT_RESOURCE_TYPE_PIPELINE = "DEPLOYMENT_RESOURCE_TYPE_PIPELINE"¶
- DEPLOYMENT_RESOURCE_TYPE_POSTGRES_BRANCH = "DEPLOYMENT_RESOURCE_TYPE_POSTGRES_BRANCH"¶
- DEPLOYMENT_RESOURCE_TYPE_POSTGRES_ENDPOINT = "DEPLOYMENT_RESOURCE_TYPE_POSTGRES_ENDPOINT"¶
- DEPLOYMENT_RESOURCE_TYPE_POSTGRES_PROJECT = "DEPLOYMENT_RESOURCE_TYPE_POSTGRES_PROJECT"¶
- DEPLOYMENT_RESOURCE_TYPE_QUALITY_MONITOR = "DEPLOYMENT_RESOURCE_TYPE_QUALITY_MONITOR"¶
- DEPLOYMENT_RESOURCE_TYPE_REGISTERED_MODEL = "DEPLOYMENT_RESOURCE_TYPE_REGISTERED_MODEL"¶
- DEPLOYMENT_RESOURCE_TYPE_SCHEMA = "DEPLOYMENT_RESOURCE_TYPE_SCHEMA"¶
- DEPLOYMENT_RESOURCE_TYPE_SECRET_SCOPE = "DEPLOYMENT_RESOURCE_TYPE_SECRET_SCOPE"¶
- DEPLOYMENT_RESOURCE_TYPE_SQL_WAREHOUSE = "DEPLOYMENT_RESOURCE_TYPE_SQL_WAREHOUSE"¶
- DEPLOYMENT_RESOURCE_TYPE_SYNCED_DATABASE_TABLE = "DEPLOYMENT_RESOURCE_TYPE_SYNCED_DATABASE_TABLE"¶
- DEPLOYMENT_RESOURCE_TYPE_VOLUME = "DEPLOYMENT_RESOURCE_TYPE_VOLUME"¶
- class databricks.sdk.service.bundledeployments.DeploymentStatus¶
Status of a deployment.
- DEPLOYMENT_STATUS_ACTIVE = "DEPLOYMENT_STATUS_ACTIVE"¶
- DEPLOYMENT_STATUS_DELETED = "DEPLOYMENT_STATUS_DELETED"¶
- DEPLOYMENT_STATUS_FAILED = "DEPLOYMENT_STATUS_FAILED"¶
- DEPLOYMENT_STATUS_IN_PROGRESS = "DEPLOYMENT_STATUS_IN_PROGRESS"¶
- class databricks.sdk.service.bundledeployments.GitInfo(branch: str | None = None, commit: str | None = None, origin_url: str | None = None)¶
Git provenance of a bundle’s source, captured at deploy time. Lets consumers link a deployed resource back to its source in version control.
- branch: str | None = None¶
Branch the source was deployed from.
- commit: str | None = None¶
Commit SHA of the deployed source.
- origin_url: str | None = None¶
URL of the git remote the source was deployed from.
- as_dict() dict¶
Serializes the GitInfo into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the GitInfo into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.bundledeployments.HeartbeatResponse(expire_time: Timestamp | None = None)¶
Response for Heartbeat.
- expire_time: Timestamp | None = None¶
The new lock expiry time after renewal.
- as_dict() dict¶
Serializes the HeartbeatResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the HeartbeatResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) HeartbeatResponse¶
Deserializes the HeartbeatResponse from a dictionary.
- class databricks.sdk.service.bundledeployments.ListDeploymentsResponse(deployments: List[Deployment] | None = None, next_page_token: str | None = None)¶
Response for ListDeployments.
- deployments: List[Deployment] | None = None¶
The deployments from the queried workspace.
- next_page_token: str | None = None¶
A token, which can be sent as
page_tokento retrieve the next page. If this field is omitted, there are no subsequent pages.
- as_dict() dict¶
Serializes the ListDeploymentsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListDeploymentsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListDeploymentsResponse¶
Deserializes the ListDeploymentsResponse from a dictionary.
- class databricks.sdk.service.bundledeployments.ListOperationsResponse(next_page_token: str | None = None, operations: List[Operation] | None = None)¶
Response for ListOperations.
- next_page_token: str | None = None¶
A token, which can be sent as
page_tokento retrieve the next page. If this field is omitted, there are no subsequent pages.
- as_dict() dict¶
Serializes the ListOperationsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListOperationsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListOperationsResponse¶
Deserializes the ListOperationsResponse from a dictionary.
- class databricks.sdk.service.bundledeployments.ListResourcesResponse(next_page_token: str | None = None, resources: List[Resource] | None = None)¶
Response for ListResources.
- next_page_token: str | None = None¶
A token, which can be sent as
page_tokento retrieve the next page. If this field is omitted, there are no subsequent pages.
- as_dict() dict¶
Serializes the ListResourcesResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListResourcesResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListResourcesResponse¶
Deserializes the ListResourcesResponse from a dictionary.
- class databricks.sdk.service.bundledeployments.ListVersionsResponse(next_page_token: str | None = None, versions: List[Version] | None = None)¶
Response for ListVersions.
- next_page_token: str | None = None¶
A token, which can be sent as
page_tokento retrieve the next page. If this field is omitted, there are no subsequent pages.
- as_dict() dict¶
Serializes the ListVersionsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListVersionsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListVersionsResponse¶
Deserializes the ListVersionsResponse from a dictionary.
- class databricks.sdk.service.bundledeployments.Operation(action_type: OperationActionType, status: OperationStatus, create_time: Timestamp | None = None, error_message: str | None = None, name: str | None = None, resource_id: str | None = None, resource_key: str | None = None, resource_type: DeploymentResourceType | None = None, state: any | None = None)¶
An operation on a single resource performed during a version. Operations record the result of applying a resource change to the workspace. Most fields are immutable once recorded;
state,error_message,resource_id, andstatusmay be updated afterwards (via UpdateOperation), guarded bysequence_idfor optimistic concurrency control.- action_type: OperationActionType¶
The type of operation performed on this resource.
- status: OperationStatus¶
Whether the operation succeeded or failed. Mutable: may be updated after creation via UpdateOperation, e.g. when an operation recorded as failed is retried and eventually succeeds. A succeeded operation cannot carry an
error_message.
- create_time: Timestamp | None = None¶
When the operation was recorded.
- error_message: str | None = None¶
Error message if the operation failed. Set when status is OPERATION_STATUS_FAILED. Captures the error encountered while applying the resource to the workspace. Mutable: may be updated after creation via UpdateOperation; setting it to an empty string clears it. After an update is applied, an operation whose status is OPERATION_STATUS_SUCCEEDED cannot carry an error_message.
- name: str | None = None¶
Resource name of the operation. Format: deployments/{deployment_id}/versions/{version_id}/operations/{resource_key}
- resource_id: str | None = None¶
ID of the actual resource in the workspace (e.g. the job ID, pipeline ID). Optional at creation: CREATE and RECREATE operations produce a new resource whose ID is not yet known when the operation is recorded. Mutable: may be filled in (or corrected) later via UpdateOperation once the ID is known.
- resource_key: str | None = None¶
Resource identifier within the bundle (e.g. “jobs.foo”, “pipelines.bar”, “jobs.foo.permissions”, “files.<rel-path>”). Can be an arbitrary UTF-8 encoded string key. This key links the operation to the corresponding deployment-level Resource.
- resource_type: DeploymentResourceType | None = None¶
The type of the deployment resource this operation applies to. Derived from the
resource_keyprefix (e.g. “jobs” → JOB); the caller does not set this field.
- state: any | None = None¶
Serialized local config state after the operation. Should be unset for delete operations. Mutable: may be updated after creation via UpdateOperation. When updating, the caller must echo the last-observed
sequence_idas a concurrency precondition.
- 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.
- class databricks.sdk.service.bundledeployments.OperationActionType¶
Type of action performed on a resource during a deployment.
- OPERATION_ACTION_TYPE_BIND = "OPERATION_ACTION_TYPE_BIND"¶
- OPERATION_ACTION_TYPE_BIND_AND_UPDATE = "OPERATION_ACTION_TYPE_BIND_AND_UPDATE"¶
- OPERATION_ACTION_TYPE_CREATE = "OPERATION_ACTION_TYPE_CREATE"¶
- OPERATION_ACTION_TYPE_DELETE = "OPERATION_ACTION_TYPE_DELETE"¶
- OPERATION_ACTION_TYPE_INITIAL_REGISTER = "OPERATION_ACTION_TYPE_INITIAL_REGISTER"¶
- OPERATION_ACTION_TYPE_RECREATE = "OPERATION_ACTION_TYPE_RECREATE"¶
- OPERATION_ACTION_TYPE_RESIZE = "OPERATION_ACTION_TYPE_RESIZE"¶
- OPERATION_ACTION_TYPE_UPDATE = "OPERATION_ACTION_TYPE_UPDATE"¶
- OPERATION_ACTION_TYPE_UPDATE_WITH_ID = "OPERATION_ACTION_TYPE_UPDATE_WITH_ID"¶
- class databricks.sdk.service.bundledeployments.OperationStatus¶
Status of a resource operation.
- OPERATION_STATUS_FAILED = "OPERATION_STATUS_FAILED"¶
- OPERATION_STATUS_SUCCEEDED = "OPERATION_STATUS_SUCCEEDED"¶
- class databricks.sdk.service.bundledeployments.Resource(resource_type: DeploymentResourceType, last_action_type: OperationActionType | None = None, last_version_id: str | None = None, name: str | None = None, resource_id: str | None = None, resource_key: str | None = None, state: any | None = None, update_time: Timestamp | None = None)¶
A resource managed by a deployment. Resources are implicitly created, updated, or deleted when operations are recorded on a version.
- resource_type: DeploymentResourceType¶
The type of the deployment resource.
- last_action_type: OperationActionType | None = None¶
The action performed on this resource during the last version.
- last_version_id: str | None = None¶
The version_id of the last version where this resource was updated.
- name: str | None = None¶
Resource name. Format: deployments/{deployment_id}/resources/{resource_key}
- resource_id: str | None = None¶
ID that references the actual resource in the workspace (e.g. the job ID, pipeline ID).
- resource_key: str | None = None¶
Resource identifier within the bundle (e.g. “jobs.foo”, “pipelines.bar”, “jobs.foo.permissions”).
- state: any | None = None¶
Serialized local config state (what the CLI deployed).
- update_time: Timestamp | None = None¶
When the last operation that updated this resource’s recorded state was applied. Pairs with last_action_type and last_version_id (all three advance together on that write).
- as_dict() dict¶
Serializes the Resource into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Resource into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.bundledeployments.Version(cli_version: str, version_type: VersionType, complete_time: Timestamp | None = None, completed_by: str | None = None, completion_reason: VersionComplete | None = None, create_time: Timestamp | None = None, created_by: str | None = None, deployment_mode: DeploymentMode | None = None, display_name: str | None = None, git_info: GitInfo | None = None, name: str | None = None, status: VersionStatus | None = None, target_name: str | None = None, version_id: str | None = None, workspace_info: WorkspaceInfo | None = None)¶
A single invocation of a deploy or destroy command against a deployment. Creating a version acquires an exclusive lock on the parent deployment.
- cli_version: str¶
CLI version used to initiate the version.
- version_type: VersionType¶
Type of version (deploy or destroy).
- complete_time: Timestamp | None = None¶
When the version completed. Unset while the version is in progress.
- completed_by: str | None = None¶
The user who completed the version (email or principal name). May differ from
created_bywhen another user force-completes the version.
- completion_reason: VersionComplete | None = None¶
Why the version was completed. Unset while in progress. Set when status transitions to COMPLETED.
- create_time: Timestamp | None = None¶
When the version was created.
- created_by: str | None = None¶
The user who created the version (email or principal name).
- deployment_mode: DeploymentMode | None = None¶
Bundle target deployment mode (development or production), captured at the time of this version.
- display_name: str | None = None¶
Display name for the deployment, captured at the time of this version.
- git_info: GitInfo | None = None¶
Git provenance of the source, captured at the time of this version.
- name: str | None = None¶
Resource name of the version. Format: deployments/{deployment_id}/versions/{version_id}
- status: VersionStatus | None = None¶
Status of the version: IN_PROGRESS or COMPLETED.
- target_name: str | None = None¶
Target name of the deployment, captured at the time of this version.
- version_id: str | None = None¶
Version identifier within the parent deployment, assigned by the client on creation. A numeric string (base-10, fits in a signed 64-bit integer) that is greater than or equal to 1. Version IDs are strictly increasing within a deployment but are not required to start at 1 or to be contiguous.
- workspace_info: WorkspaceInfo | None = None¶
Workspace location of the deployment, captured at the time of this version.
- as_dict() dict¶
Serializes the Version into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the Version into a shallow dictionary of its immediate attributes.
- class databricks.sdk.service.bundledeployments.VersionComplete¶
Reason why a version was completed.
- VERSION_COMPLETE_FAILURE = "VERSION_COMPLETE_FAILURE"¶
- VERSION_COMPLETE_FORCE_ABORT = "VERSION_COMPLETE_FORCE_ABORT"¶
- VERSION_COMPLETE_LEASE_EXPIRED = "VERSION_COMPLETE_LEASE_EXPIRED"¶
- VERSION_COMPLETE_SUCCESS = "VERSION_COMPLETE_SUCCESS"¶
- class databricks.sdk.service.bundledeployments.VersionStatus¶
Status of a version.
- VERSION_STATUS_COMPLETED = "VERSION_STATUS_COMPLETED"¶
- VERSION_STATUS_IN_PROGRESS = "VERSION_STATUS_IN_PROGRESS"¶
- class databricks.sdk.service.bundledeployments.VersionType¶
Type of version.
- VERSION_TYPE_DEPLOY = "VERSION_TYPE_DEPLOY"¶
- VERSION_TYPE_DESTROY = "VERSION_TYPE_DESTROY"¶
- class databricks.sdk.service.bundledeployments.WorkspaceInfo(bundle_root_path: str | None = None, file_path: str | None = None, git_folder_path: str | None = None, root_path: str | None = None, source_linked: bool | None = None)¶
Workspace location of a bundle deployment, captured at deploy time.
- bundle_root_path: str | None = None¶
Path of the bundle root (the directory containing databricks.yml) relative to git_folder_path. Empty when the deployment is not from a Databricks Git folder.
- file_path: str | None = None¶
Absolute workspace path where the deployed bundle files live. Mirrors the workspace.file_path field in DABs bundle config.
- git_folder_path: str | None = None¶
When deployed from a Databricks Git folder, the absolute workspace path of that folder; empty for local deploys.
- root_path: str | None = None¶
Absolute workspace path of the deployment root — the base path the deployed files live under. Mirrors workspace.root_path in the DABs bundle config; file_path is its files subdirectory.
- source_linked: bool | None = None¶
Whether files are served directly from the source sync root instead of being copied into file_path.
- as_dict() dict¶
Serializes the WorkspaceInfo into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the WorkspaceInfo into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) WorkspaceInfo¶
Deserializes the WorkspaceInfo from a dictionary.