Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This information applies to Databricks CLI versions 0.205 and above. The Databricks CLI is in Public Preview.
Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.
The account workspaces command group within the Databricks CLI contains commands to manage workspaces for your account. A Databricks workspace is an environment for accessing all of your Databricks assets. The workspace organizes objects (notebooks, libraries, and experiments) into folders, and provides access to data and computational resources such as clusters and jobs. See Create a workspace.
Note
These commands 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.
databricks account workspaces create
Create 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).
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.
databricks account workspaces create [flags]
Options
--workspace-name string
The human-readable name of the workspace.
--deployment-name string
The deployment name defines part of the subdomain for the workspace.
--aws-region string
The AWS region for the workspace.
--cloud string
The cloud name.
--location string
The Google Cloud region of the workspace data plane in your Google account (for example, us-east4).
--credentials-id string
ID of the workspace's credential configuration object.
--storage-configuration-id string
ID of the workspace's storage configuration object.
--network-id string
The ID of the workspace's network configuration object.
--managed-services-customer-managed-key-id string
The ID of the workspace's managed services encryption key configuration object.
--storage-customer-managed-key-id string
The ID of the workspace's storage encryption key configuration object.
--private-access-settings-id string
ID of the workspace's private access settings object.
--network-connectivity-config-id string
The object ID of network connectivity config.
--compute-mode CustomerFacingComputeMode
If the compute mode is SERVERLESS, a serverless workspace is created. Supported values: HYBRID, SERVERLESS.
--pricing-tier PricingTier
The pricing tier for the workspace. Supported values: COMMUNITY_EDITION, DEDICATED, ENTERPRISE, PREMIUM, STANDARD, UNKNOWN.
--no-wait
Do not wait to reach RUNNING state.
--timeout duration
Maximum amount of time to reach RUNNING state (default 20m0s).
--json JSON
The inline JSON string or the @path to the JSON file with the request body
Examples
The following example creates a workspace using JSON:
databricks account workspaces create --json '{"workspace_name": "my-workspace", "deployment_name": "my-workspace-deployment", "aws_region": "us-west-2", "credentials_id": "cred-abc123", "storage_configuration_id": "storage-xyz789"}'
The following example creates a workspace using a JSON file:
databricks account workspaces create --json @workspace.json
The following example creates a workspace with command-line flags:
databricks account workspaces create --workspace-name "my-workspace" --deployment-name "my-workspace-deployment" --aws-region "us-west-2" --credentials-id "cred-abc123" --storage-configuration-id "storage-xyz789"
databricks account workspaces delete
Delete a Databricks workspace, specified by ID.
databricks account workspaces delete WORKSPACE_ID [flags]
Arguments
WORKSPACE_ID
A unique integer ID for the workspace.
Options
Examples
The following example deletes a workspace by ID:
databricks account workspaces delete 123456789
databricks account workspaces get
Get information including status for a Databricks workspace, specified by ID. In the response, the workspace_status field indicates the current status. After initial workspace creation (which is asynchronous), make repeated GET requests with the workspace ID and check its status. The workspace becomes available when the status changes to RUNNING.
databricks account workspaces get WORKSPACE_ID [flags]
Arguments
WORKSPACE_ID
A unique integer ID for the workspace.
Options
Examples
The following example gets a workspace by ID:
databricks account workspaces get 123456789
databricks account workspaces list
List Databricks workspaces for an account.
databricks account workspaces list [flags]
Options
Examples
The following example lists all workspaces:
databricks account workspaces list
databricks account workspaces update
Update a workspace configuration.
databricks account workspaces update WORKSPACE_ID [flags]
Arguments
WORKSPACE_ID
A unique integer ID for the workspace.
Options
--workspace-name string
The human-readable name of the workspace.
--deployment-name string
The deployment name for the workspace.
--aws-region string
The AWS region for the workspace.
--cloud string
The cloud name.
--location string
The Google Cloud region of the workspace data plane in your Google account (for example, us-east4).
--credentials-id string
ID of the workspace's credential configuration object.
--storage-configuration-id string
ID of the workspace's storage configuration object.
--network-id string
If this workspace is BYO VPC, then the network_id will be populated.
--managed-services-customer-managed-key-id string
ID of the key configuration for encrypting managed services.
--storage-customer-managed-key-id string
ID of the key configuration for encrypting workspace storage.
--private-access-settings-id string
ID of the workspace's private access settings object.
--network-connectivity-config-id string
The object ID of network connectivity config.
--expected-workspace-status WorkspaceStatus
A client owned field used to indicate the workspace status that the client expects to be in. Supported values: BANNED, CANCELLING, FAILED, NOT_PROVISIONED, PROVISIONING, RUNNING.
--update-mask string
The field mask must be a single string, with multiple fields separated by commas (no spaces).
--no-wait
Do not wait to reach RUNNING state.
--timeout duration
Maximum amount of time to reach RUNNING state (default 20m0s).
--json JSON
The inline JSON string or the @path to the JSON file with the request body
Examples
The following example updates a workspace name:
databricks account workspaces update 123456789 --workspace-name "updated-workspace-name"
The following example updates a workspace using JSON:
databricks account workspaces update 123456789 --json '{"workspace_name": "updated-workspace-name", "credentials_id": "cred-new123"}'
The following example updates a workspace using a JSON file:
databricks account workspaces update 123456789 --json @update-workspace.json
Global flags
--debug
Whether to enable debug logging.
-h or --help
Display help for the Databricks CLI or the related command group or the related command.
--log-file string
A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.
--log-format format
The log format type, text or json. The default value is text.
--log-level string
A string representing the log format level. If not specified then the log format level is disabled.
-o, --output type
The command output type, text or json. The default value is text.
-p, --profile string
The name of the profile in the ~/.databrickscfg file to use to run the command. If this flag is not specified then if it exists, the profile named DEFAULT is used.
--progress-format format
The format to display progress logs: default, append, inplace, or json
-t, --target string
If applicable, the bundle target to use