Environments¶
These dataclasses are used in the SDK to represent API requests and responses for services in the databricks.sdk.service.environments module.
- class databricks.sdk.service.environments.BaseEnvironmentType¶
If changed, also update estore/namespaces/defaultbaseenvironments/latest.proto
- CPU = "CPU"¶
- GPU = "GPU"¶
- class databricks.sdk.service.environments.DatabricksServiceExceptionWithDetailsProto(details: List[dict] | None = None, error_code: ErrorCode | None = None, message: str | None = None, stack_trace: str | None = None)¶
Databricks Error that is returned by all Databricks APIs.
- details: List[dict] | None = None¶
- message: str | None = None¶
- stack_trace: str | None = None¶
- as_dict() dict¶
Serializes the DatabricksServiceExceptionWithDetailsProto into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DatabricksServiceExceptionWithDetailsProto into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DatabricksServiceExceptionWithDetailsProto¶
Deserializes the DatabricksServiceExceptionWithDetailsProto from a dictionary.
- class databricks.sdk.service.environments.DefaultWorkspaceBaseEnvironment(cpu_workspace_base_environment: str | None = None, gpu_workspace_base_environment: str | None = None, name: str | None = None)¶
A singleton resource representing the default workspace base environment configuration. This resource contains the workspace base environments that are used as defaults for serverless notebooks and jobs in the workspace, for both CPU and GPU compute types.
- cpu_workspace_base_environment: str | None = None¶
The default workspace base environment for CPU compute. Format: workspace-base-environments/{workspace_base_environment}
- gpu_workspace_base_environment: str | None = None¶
The default workspace base environment for GPU compute. Format: workspace-base-environments/{workspace_base_environment}
- name: str | None = None¶
The resource name of this singleton resource. Format: default-workspace-base-environment
- as_dict() dict¶
Serializes the DefaultWorkspaceBaseEnvironment into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the DefaultWorkspaceBaseEnvironment into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) DefaultWorkspaceBaseEnvironment¶
Deserializes the DefaultWorkspaceBaseEnvironment from a dictionary.
- class databricks.sdk.service.environments.ErrorCode¶
Error codes returned by Databricks APIs to indicate specific failure conditions.
- ABORTED = "ABORTED"¶
- ALREADY_EXISTS = "ALREADY_EXISTS"¶
- BAD_REQUEST = "BAD_REQUEST"¶
- CANCELLED = "CANCELLED"¶
- CATALOG_ALREADY_EXISTS = "CATALOG_ALREADY_EXISTS"¶
- CATALOG_DOES_NOT_EXIST = "CATALOG_DOES_NOT_EXIST"¶
- CATALOG_NOT_EMPTY = "CATALOG_NOT_EMPTY"¶
- COULD_NOT_ACQUIRE_LOCK = "COULD_NOT_ACQUIRE_LOCK"¶
- CUSTOMER_UNAUTHORIZED = "CUSTOMER_UNAUTHORIZED"¶
- DAC_ALREADY_EXISTS = "DAC_ALREADY_EXISTS"¶
- DAC_DOES_NOT_EXIST = "DAC_DOES_NOT_EXIST"¶
- DATA_LOSS = "DATA_LOSS"¶
- DEADLINE_EXCEEDED = "DEADLINE_EXCEEDED"¶
- DEPLOYMENT_TIMEOUT = "DEPLOYMENT_TIMEOUT"¶
- DIRECTORY_NOT_EMPTY = "DIRECTORY_NOT_EMPTY"¶
- DIRECTORY_PROTECTED = "DIRECTORY_PROTECTED"¶
- DRY_RUN_FAILED = "DRY_RUN_FAILED"¶
- ENDPOINT_NOT_FOUND = "ENDPOINT_NOT_FOUND"¶
- EXTERNAL_LOCATION_ALREADY_EXISTS = "EXTERNAL_LOCATION_ALREADY_EXISTS"¶
- EXTERNAL_LOCATION_DOES_NOT_EXIST = "EXTERNAL_LOCATION_DOES_NOT_EXIST"¶
- FEATURE_DISABLED = "FEATURE_DISABLED"¶
- GIT_CONFLICT = "GIT_CONFLICT"¶
- GIT_REMOTE_ERROR = "GIT_REMOTE_ERROR"¶
- GIT_SENSITIVE_TOKEN_DETECTED = "GIT_SENSITIVE_TOKEN_DETECTED"¶
- GIT_UNKNOWN_REF = "GIT_UNKNOWN_REF"¶
- GIT_URL_NOT_ON_ALLOW_LIST = "GIT_URL_NOT_ON_ALLOW_LIST"¶
- INSECURE_PARTNER_RESPONSE = "INSECURE_PARTNER_RESPONSE"¶
- INTERNAL_ERROR = "INTERNAL_ERROR"¶
- INVALID_PARAMETER_VALUE = "INVALID_PARAMETER_VALUE"¶
- INVALID_STATE = "INVALID_STATE"¶
- INVALID_STATE_TRANSITION = "INVALID_STATE_TRANSITION"¶
- IO_ERROR = "IO_ERROR"¶
- IPYNB_FILE_IN_REPO = "IPYNB_FILE_IN_REPO"¶
- MALFORMED_PARTNER_RESPONSE = "MALFORMED_PARTNER_RESPONSE"¶
- MALFORMED_REQUEST = "MALFORMED_REQUEST"¶
- MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST = "MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST"¶
- MAX_BLOCK_SIZE_EXCEEDED = "MAX_BLOCK_SIZE_EXCEEDED"¶
- MAX_CHILD_NODE_SIZE_EXCEEDED = "MAX_CHILD_NODE_SIZE_EXCEEDED"¶
- MAX_LIST_SIZE_EXCEEDED = "MAX_LIST_SIZE_EXCEEDED"¶
- MAX_NOTEBOOK_SIZE_EXCEEDED = "MAX_NOTEBOOK_SIZE_EXCEEDED"¶
- MAX_READ_SIZE_EXCEEDED = "MAX_READ_SIZE_EXCEEDED"¶
- METASTORE_ALREADY_EXISTS = "METASTORE_ALREADY_EXISTS"¶
- METASTORE_DOES_NOT_EXIST = "METASTORE_DOES_NOT_EXIST"¶
- METASTORE_NOT_EMPTY = "METASTORE_NOT_EMPTY"¶
- NOT_FOUND = "NOT_FOUND"¶
- NOT_IMPLEMENTED = "NOT_IMPLEMENTED"¶
- PARTIAL_DELETE = "PARTIAL_DELETE"¶
- PERMISSION_DENIED = "PERMISSION_DENIED"¶
- PERMISSION_NOT_PROPAGATED = "PERMISSION_NOT_PROPAGATED"¶
- PRINCIPAL_DOES_NOT_EXIST = "PRINCIPAL_DOES_NOT_EXIST"¶
- PROJECTS_OPERATION_TIMEOUT = "PROJECTS_OPERATION_TIMEOUT"¶
- PROVIDER_ALREADY_EXISTS = "PROVIDER_ALREADY_EXISTS"¶
- PROVIDER_DOES_NOT_EXIST = "PROVIDER_DOES_NOT_EXIST"¶
- PROVIDER_SHARE_NOT_ACCESSIBLE = "PROVIDER_SHARE_NOT_ACCESSIBLE"¶
- QUOTA_EXCEEDED = "QUOTA_EXCEEDED"¶
- RECIPIENT_ALREADY_EXISTS = "RECIPIENT_ALREADY_EXISTS"¶
- RECIPIENT_DOES_NOT_EXIST = "RECIPIENT_DOES_NOT_EXIST"¶
- REQUEST_LIMIT_EXCEEDED = "REQUEST_LIMIT_EXCEEDED"¶
- RESOURCE_ALREADY_EXISTS = "RESOURCE_ALREADY_EXISTS"¶
- RESOURCE_CONFLICT = "RESOURCE_CONFLICT"¶
- RESOURCE_DOES_NOT_EXIST = "RESOURCE_DOES_NOT_EXIST"¶
- RESOURCE_EXHAUSTED = "RESOURCE_EXHAUSTED"¶
- RESOURCE_LIMIT_EXCEEDED = "RESOURCE_LIMIT_EXCEEDED"¶
- SCHEMA_ALREADY_EXISTS = "SCHEMA_ALREADY_EXISTS"¶
- SCHEMA_DOES_NOT_EXIST = "SCHEMA_DOES_NOT_EXIST"¶
- SCHEMA_NOT_EMPTY = "SCHEMA_NOT_EMPTY"¶
- SEARCH_QUERY_TOO_LONG = "SEARCH_QUERY_TOO_LONG"¶
- SEARCH_QUERY_TOO_SHORT = "SEARCH_QUERY_TOO_SHORT"¶
- SERVICE_UNDER_MAINTENANCE = "SERVICE_UNDER_MAINTENANCE"¶
- SHARE_ALREADY_EXISTS = "SHARE_ALREADY_EXISTS"¶
- SHARE_DOES_NOT_EXIST = "SHARE_DOES_NOT_EXIST"¶
- STORAGE_CREDENTIAL_ALREADY_EXISTS = "STORAGE_CREDENTIAL_ALREADY_EXISTS"¶
- STORAGE_CREDENTIAL_DOES_NOT_EXIST = "STORAGE_CREDENTIAL_DOES_NOT_EXIST"¶
- TABLE_ALREADY_EXISTS = "TABLE_ALREADY_EXISTS"¶
- TABLE_DOES_NOT_EXIST = "TABLE_DOES_NOT_EXIST"¶
- TEMPORARILY_UNAVAILABLE = "TEMPORARILY_UNAVAILABLE"¶
- UNAUTHENTICATED = "UNAUTHENTICATED"¶
- UNAVAILABLE = "UNAVAILABLE"¶
- UNKNOWN = "UNKNOWN"¶
- UNPARSEABLE_HTTP_ERROR = "UNPARSEABLE_HTTP_ERROR"¶
- WORKSPACE_TEMPORARILY_UNAVAILABLE = "WORKSPACE_TEMPORARILY_UNAVAILABLE"¶
- class databricks.sdk.service.environments.ListWorkspaceBaseEnvironmentsResponse(next_page_token: str | None = None, workspace_base_environments: List[WorkspaceBaseEnvironment] | None = None)¶
Response message for ListWorkspaceBaseEnvironments.
- next_page_token: str | None = None¶
Token to retrieve the next page of results. Empty if there are no more results.
- workspace_base_environments: List[WorkspaceBaseEnvironment] | None = None¶
The list of workspace base environments.
- as_dict() dict¶
Serializes the ListWorkspaceBaseEnvironmentsResponse into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the ListWorkspaceBaseEnvironmentsResponse into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) ListWorkspaceBaseEnvironmentsResponse¶
Deserializes the ListWorkspaceBaseEnvironmentsResponse from a dictionary.
- class databricks.sdk.service.environments.Operation(done: bool | None = None, error: DatabricksServiceExceptionWithDetailsProto | None = None, metadata: dict | None = None, name: str | None = None, response: dict | None = None)¶
This resource represents a long-running operation that is the result of a network API call.
- done: bool | None = None¶
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
- error: DatabricksServiceExceptionWithDetailsProto | None = None¶
The error result of the operation in case of failure or cancellation.
- metadata: dict | None = None¶
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata.
- name: str | None = None¶
The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.
- response: dict | None = None¶
The normal, successful response of the operation.
- 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.environments.WorkspaceBaseEnvironment(display_name: str, base_environment_type: BaseEnvironmentType | None = None, create_time: Timestamp | None = None, creator_user_id: str | None = None, filepath: str | None = None, is_default: bool | None = None, last_updated_user_id: str | None = None, message: str | None = None, name: str | None = None, status: WorkspaceBaseEnvironmentCacheStatus | None = None, update_time: Timestamp | None = None)¶
A WorkspaceBaseEnvironment defines a workspace-level environment configuration consisting of an environment version and a list of dependencies.
- display_name: str¶
Human-readable display name for the workspace base environment.
- base_environment_type: BaseEnvironmentType | None = None¶
The type of base environment (CPU or GPU).
- create_time: Timestamp | None = None¶
Timestamp when the environment was created.
- creator_user_id: str | None = None¶
User ID of the creator.
- filepath: str | None = None¶
The WSFS or UC Volumes path to the environment YAML file.
- is_default: bool | None = None¶
Whether this is the default environment for the workspace.
- last_updated_user_id: str | None = None¶
User ID of the last user who updated the environment.
- message: str | None = None¶
Status message providing additional details about the environment status.
- name: str | None = None¶
The resource name of the workspace base environment. Format: workspace-base-environments/{workspace-base-environment}
- status: WorkspaceBaseEnvironmentCacheStatus | None = None¶
The status of the materialized workspace base environment.
- update_time: Timestamp | None = None¶
Timestamp when the environment was last updated.
- as_dict() dict¶
Serializes the WorkspaceBaseEnvironment into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the WorkspaceBaseEnvironment into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) WorkspaceBaseEnvironment¶
Deserializes the WorkspaceBaseEnvironment from a dictionary.
- class databricks.sdk.service.environments.WorkspaceBaseEnvironmentCacheStatus¶
Status of the environment materialization.
- CREATED = "CREATED"¶
- EXPIRED = "EXPIRED"¶
- FAILED = "FAILED"¶
- INVALID = "INVALID"¶
- PENDING = "PENDING"¶
- REFRESHING = "REFRESHING"¶
- class databricks.sdk.service.environments.WorkspaceBaseEnvironmentOperationMetadata¶
Metadata for the WorkspaceBaseEnvironment long-running operations. This message tracks the progress of the workspace base environment long-running process.
- as_dict() dict¶
Serializes the WorkspaceBaseEnvironmentOperationMetadata into a dictionary suitable for use as a JSON request body.
- as_shallow_dict() dict¶
Serializes the WorkspaceBaseEnvironmentOperationMetadata into a shallow dictionary of its immediate attributes.
- classmethod from_dict(d: Dict[str, Any]) WorkspaceBaseEnvironmentOperationMetadata¶
Deserializes the WorkspaceBaseEnvironmentOperationMetadata from a dictionary.