Bundle

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

class databricks.sdk.service.bundle.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, last_version_id: str | None = None, name: str | None = None, status: DeploymentStatus | None = None, target_name: str | None = None, update_time: Timestamp | 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 destroy completed). Unset if the deployment has not been destroyed. Named destroy_time (not delete_time) because this tracks the databricks bundle destroy command, 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.

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.

update_time: Timestamp | None = None

When the deployment was last updated.

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.bundle.DeploymentMode

Bundle target deployment mode. Mirrors the mode field on a bundle target in databricks.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.bundle.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.bundle.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.bundle.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.bundle.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_token to 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.bundle.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_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

operations: List[Operation] | None = None

The resource operations under the specified version.

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.bundle.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_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

resources: List[Resource] | None = None

The resources under the specified deployment.

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.bundle.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_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

versions: List[Version] | None = None

The versions under the specified deployment.

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.bundle.Operation(action_type: OperationActionType, resource_id: str, status: OperationStatus, create_time: Timestamp | None = None, error_message: str | None = None, name: 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 are append-only and record the result of applying a resource change to the workspace.

action_type: OperationActionType

The type of operation performed on this resource.

resource_id: str

ID reference for the actual resource in the workspace (e.g. the job ID, pipeline ID).

status: OperationStatus

Whether the operation succeeded or failed.

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.

name: str | None = None

Resource name of the operation. Format: deployments/{deployment_id}/versions/{version_id}/operations/{resource_key}

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_key prefix (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.

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.bundle.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.bundle.OperationStatus

Status of a resource operation.

OPERATION_STATUS_FAILED = "OPERATION_STATUS_FAILED"
OPERATION_STATUS_SUCCEEDED = "OPERATION_STATUS_SUCCEEDED"
class databricks.sdk.service.bundle.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)

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).

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.

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

Deserializes the Resource from a dictionary.

class databricks.sdk.service.bundle.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, name: str | None = None, status: VersionStatus | None = None, target_name: str | None = None, version_id: str | 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_by when 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.

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

Monotonically increasing version identifier within the parent deployment. Assigned by the client on creation.

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.

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

Deserializes the Version from a dictionary.

class databricks.sdk.service.bundle.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.bundle.VersionStatus

Status of a version.

VERSION_STATUS_COMPLETED = "VERSION_STATUS_COMPLETED"
VERSION_STATUS_IN_PROGRESS = "VERSION_STATUS_IN_PROGRESS"
class databricks.sdk.service.bundle.VersionType

Type of version.

VERSION_TYPE_DEPLOY = "VERSION_TYPE_DEPLOY"
VERSION_TYPE_DESTROY = "VERSION_TYPE_DESTROY"