@Generated public class WorkspacesAPI extends Object
These endpoints are available if your account is on the E2 version of the platform or on a select custom plan that allows multiple workspaces per account.
| Constructor and Description |
|---|
WorkspacesAPI(ApiClient apiClient)
Regular-use constructor
|
WorkspacesAPI(WorkspacesService mock)
Constructor for mocks
|
| Modifier and Type | Method and Description |
|---|---|
Wait<Workspace,Workspace> |
create(CreateWorkspaceRequest request)
Creates a new workspace using a credential configuration and a storage configuration, an
optional network configuration (if using a customer-managed VPC), an optional managed services
key configuration (if using customer-managed keys for managed services), and an optional
storage key configuration (if using customer-managed keys for storage).
|
Workspace |
delete(DeleteWorkspaceRequest request)
Deletes a Databricks workspace, both specified by ID.
|
Workspace |
delete(long workspaceId) |
Workspace |
get(GetWorkspaceRequest request)
Gets information including status for a Databricks workspace, specified by ID.
|
Workspace |
get(long workspaceId) |
WorkspacesService |
impl() |
Iterable<Workspace> |
list()
Lists Databricks workspaces for an account.
|
Wait<Workspace,Workspace> |
update(UpdateWorkspaceRequest request)
Updates a workspace.
|
Workspace |
waitGetWorkspaceRunning(Long workspaceId) |
Workspace |
waitGetWorkspaceRunning(Long workspaceId,
Duration timeout,
Consumer<Workspace> callback) |
public WorkspacesAPI(ApiClient apiClient)
public WorkspacesAPI(WorkspacesService mock)
public Workspace waitGetWorkspaceRunning(Long workspaceId) throws TimeoutException
TimeoutExceptionpublic Workspace waitGetWorkspaceRunning(Long workspaceId, Duration timeout, Consumer<Workspace> callback) throws TimeoutException
TimeoutExceptionpublic Wait<Workspace,Workspace> create(CreateWorkspaceRequest request)
Important: This operation is asynchronous. A response with HTTP status code 200 means the request has been accepted and is in progress, but does not mean that the workspace deployed successfully and is running. The initial workspace status is typically PROVISIONING. Use the workspace ID (workspace_id) field in the response to identify the new workspace and make repeated GET requests with the workspace ID and check its status. The workspace becomes available when the status changes to RUNNING.
You can share one customer-managed VPC with multiple workspaces in a single account. It is not required to create a new VPC for each workspace. However, you cannot reuse subnets or Security Groups between workspaces. If you plan to share one VPC with multiple workspaces, make sure you size your VPC and subnets accordingly. Because a Databricks Account API network configuration encapsulates this information, you cannot reuse a Databricks Account API network configuration across workspaces.
For information about how to create a new workspace with this API including error handling, see [Create a new workspace using the Account API].
Important: Customer-managed VPCs, PrivateLink, and customer-managed keys are supported on a limited set of deployment and subscription types. If you have questions about availability, contact your Databricks representative.
This operation is available only if your account is on the E2 version of the platform or on a select custom plan that allows multiple workspaces per account.
[Create a new workspace using the Account API]: http://docs.databricks.com/administration-guide/account-api/new-workspace.html
public Workspace delete(long workspaceId)
public Workspace delete(DeleteWorkspaceRequest request)
public Workspace get(long workspaceId)
public Workspace get(GetWorkspaceRequest request)
[Create a new workspace using the Account API]: http://docs.databricks.com/administration-guide/account-api/new-workspace.html
public Wait<Workspace,Workspace> update(UpdateWorkspaceRequest request)
public WorkspacesService impl()
Copyright © 2026. All rights reserved.