workspaces
Creates, updates, deletes, gets or lists a workspaces resource.
Overview
| Name | workspaces |
| Type | Resource |
| Id | databricks_account.provisioning.workspaces |
Fields
The following fields are returned by SELECT queries:
- workspaces_get
- workspaces_list
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
credentials_id | string | ID of the workspace's credential configuration object. |
managed_services_customer_managed_key_id | string | ID of the key configuration for encrypting managed services. |
network_connectivity_config_id | string | The object ID of network connectivity config. |
network_id | string | If this workspace is BYO VPC, then the network_id will be populated. If this workspace is not BYO VPC, then the network_id will be empty. |
private_access_settings_id | string | ID of the workspace's private access settings object. Only used for PrivateLink. You must specify this ID if you are using [AWS PrivateLink] for either front-end (user-to-workspace connection), back-end (data plane to control plane connection), or both connection types. Before configuring PrivateLink, read the [Databricks article about PrivateLink].", [AWS PrivateLink]: https://aws.amazon.com/privatelink/ [Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html |
storage_configuration_id | string | ID of the workspace's storage configuration object. |
storage_customer_managed_key_id | string | ID of the key configuration for encrypting workspace storage. |
workspace_id | integer | A unique integer ID for the workspace |
deployment_name | string | |
workspace_name | string | The human-readable name of the workspace. |
aws_region | string | |
azure_workspace_info | object | |
cloud | string | The cloud name. This field can have values like `azure`, `gcp`. |
cloud_resource_container | object | |
compute_mode | string | The compute mode of the workspace. (HYBRID, SERVERLESS) |
creation_time | integer | Time in epoch milliseconds when the workspace was created. |
custom_tags | object | The custom tags key-value pairing that is attached to this workspace. The key-value pair is a string of utf-8 characters. The value can be an empty string, with maximum length of 255 characters. The key can be of maximum length of 127 characters, and cannot be empty. |
expected_workspace_status | string | A client owned field used to indicate the workspace status that the client expects to be in. For now this is only used to unblock Temporal workflow for GCP least privileged workspace. (BANNED, CANCELLING, FAILED, NOT_PROVISIONED, PROVISIONING, RUNNING) |
gcp_managed_network_config | object | The network configuration for the workspace. |
gke_config | object | The configurations of the GKE cluster used by the GCP workspace. |
location | string | The Google Cloud region of the workspace data plane in your Google account (for example, `us-east4`). |
network | object | The network configuration for the workspace. DEPRECATED. Use `network_id` instead. |
pricing_tier | string | Create a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />>>> class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> >>> Color.RED<br /> <Color.RED: 1><br /><br />- value lookup:<br /><br /> >>> Color(1)<br /> <Color.RED: 1><br /><br />- name lookup:<br /><br /> >>> Color['RED']<br /> <Color.RED: 1><br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />>>> len(Color)<br />3<br /><br />>>> list(Color)<br />[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]<br /><br />Methods can be added to enumerations, and members can have their own<br />attributes -- see the documentation for details. (COMMUNITY_EDITION, DEDICATED, ENTERPRISE, PREMIUM, STANDARD, UNKNOWN) |
storage_mode | string | The storage mode of the workspace. (CUSTOMER_HOSTED, DEFAULT_STORAGE) |
workspace_status | string | The status of a workspace (BANNED, CANCELLING, FAILED, NOT_PROVISIONED, PROVISIONING, RUNNING) |
workspace_status_message | string | Message describing the current workspace status. |
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
credentials_id | string | ID of the workspace's credential configuration object. |
managed_services_customer_managed_key_id | string | ID of the key configuration for encrypting managed services. |
network_connectivity_config_id | string | The object ID of network connectivity config. |
network_id | string | If this workspace is BYO VPC, then the network_id will be populated. If this workspace is not BYO VPC, then the network_id will be empty. |
private_access_settings_id | string | ID of the workspace's private access settings object. Only used for PrivateLink. You must specify this ID if you are using [AWS PrivateLink] for either front-end (user-to-workspace connection), back-end (data plane to control plane connection), or both connection types. Before configuring PrivateLink, read the [Databricks article about PrivateLink].", [AWS PrivateLink]: https://aws.amazon.com/privatelink/ [Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html |
storage_configuration_id | string | ID of the workspace's storage configuration object. |
storage_customer_managed_key_id | string | ID of the key configuration for encrypting workspace storage. |
workspace_id | integer | A unique integer ID for the workspace |
deployment_name | string | |
workspace_name | string | The human-readable name of the workspace. |
aws_region | string | |
azure_workspace_info | object | |
cloud | string | The cloud name. This field can have values like `azure`, `gcp`. |
cloud_resource_container | object | |
compute_mode | string | The compute mode of the workspace. (HYBRID, SERVERLESS) |
creation_time | integer | Time in epoch milliseconds when the workspace was created. |
custom_tags | object | The custom tags key-value pairing that is attached to this workspace. The key-value pair is a string of utf-8 characters. The value can be an empty string, with maximum length of 255 characters. The key can be of maximum length of 127 characters, and cannot be empty. |
expected_workspace_status | string | A client owned field used to indicate the workspace status that the client expects to be in. For now this is only used to unblock Temporal workflow for GCP least privileged workspace. (BANNED, CANCELLING, FAILED, NOT_PROVISIONED, PROVISIONING, RUNNING) |
gcp_managed_network_config | object | The network configuration for the workspace. |
gke_config | object | The configurations of the GKE cluster used by the GCP workspace. |
location | string | The Google Cloud region of the workspace data plane in your Google account (for example, `us-east4`). |
network | object | The network configuration for the workspace. DEPRECATED. Use `network_id` instead. |
pricing_tier | string | Create a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />>>> class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> >>> Color.RED<br /> <Color.RED: 1><br /><br />- value lookup:<br /><br /> >>> Color(1)<br /> <Color.RED: 1><br /><br />- name lookup:<br /><br /> >>> Color['RED']<br /> <Color.RED: 1><br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />>>> len(Color)<br />3<br /><br />>>> list(Color)<br />[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]<br /><br />Methods can be added to enumerations, and members can have their own<br />attributes -- see the documentation for details. (COMMUNITY_EDITION, DEDICATED, ENTERPRISE, PREMIUM, STANDARD, UNKNOWN) |
storage_mode | string | The storage mode of the workspace. (CUSTOMER_HOSTED, DEFAULT_STORAGE) |
workspace_status | string | The status of a workspace (BANNED, CANCELLING, FAILED, NOT_PROVISIONED, PROVISIONING, RUNNING) |
workspace_status_message | string | Message describing the current workspace status. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
workspaces_get | select | account_id, workspace_id | Gets information including status for a Databricks workspace, specified by ID. In the response, the | |
workspaces_list | select | account_id | Lists Databricks workspaces for an account. | |
workspaces_create | insert | account_id | Creates a new workspace using a credential configuration and a storage configuration, an optional | |
workspaces_update | update | account_id, workspace_id, customer_facing_workspace | update_mask | Updates a workspace. |
workspaces_delete | delete | account_id, workspace_id | Deletes a Databricks workspace, both specified by ID. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
workspace_id | integer | |
update_mask | string | The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (.) to navigate sub-fields (e.g., author.given_name). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names. A field mask of * indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using * wildcards, as it can lead to unintended results if the API changes in the future. |
SELECT examples
- workspaces_get
- workspaces_list
Gets information including status for a Databricks workspace, specified by ID. In the response, the
SELECT
account_id,
credentials_id,
managed_services_customer_managed_key_id,
network_connectivity_config_id,
network_id,
private_access_settings_id,
storage_configuration_id,
storage_customer_managed_key_id,
workspace_id,
deployment_name,
workspace_name,
aws_region,
azure_workspace_info,
cloud,
cloud_resource_container,
compute_mode,
creation_time,
custom_tags,
expected_workspace_status,
gcp_managed_network_config,
gke_config,
location,
network,
pricing_tier,
storage_mode,
workspace_status,
workspace_status_message
FROM databricks_account.provisioning.workspaces
WHERE account_id = '{{ account_id }}' -- required
AND workspace_id = '{{ workspace_id }}' -- required
;
Lists Databricks workspaces for an account.
SELECT
account_id,
credentials_id,
managed_services_customer_managed_key_id,
network_connectivity_config_id,
network_id,
private_access_settings_id,
storage_configuration_id,
storage_customer_managed_key_id,
workspace_id,
deployment_name,
workspace_name,
aws_region,
azure_workspace_info,
cloud,
cloud_resource_container,
compute_mode,
creation_time,
custom_tags,
expected_workspace_status,
gcp_managed_network_config,
gke_config,
location,
network,
pricing_tier,
storage_mode,
workspace_status,
workspace_status_message
FROM databricks_account.provisioning.workspaces
WHERE account_id = '{{ account_id }}' -- required
;
INSERT examples
- workspaces_create
- Manifest
Creates a new workspace using a credential configuration and a storage configuration, an optional
INSERT INTO databricks_account.provisioning.workspaces (
aws_region,
cloud,
cloud_resource_container,
compute_mode,
credentials_id,
custom_tags,
deployment_name,
gcp_managed_network_config,
gke_config,
location,
managed_services_customer_managed_key_id,
network_connectivity_config_id,
network_id,
pricing_tier,
private_access_settings_id,
storage_configuration_id,
storage_customer_managed_key_id,
workspace_name,
account_id
)
SELECT
'{{ aws_region }}',
'{{ cloud }}',
'{{ cloud_resource_container }}',
'{{ compute_mode }}',
'{{ credentials_id }}',
'{{ custom_tags }}',
'{{ deployment_name }}',
'{{ gcp_managed_network_config }}',
'{{ gke_config }}',
'{{ location }}',
'{{ managed_services_customer_managed_key_id }}',
'{{ network_connectivity_config_id }}',
'{{ network_id }}',
'{{ pricing_tier }}',
'{{ private_access_settings_id }}',
'{{ storage_configuration_id }}',
'{{ storage_customer_managed_key_id }}',
'{{ workspace_name }}',
'{{ account_id }}'
RETURNING
account_id,
credentials_id,
managed_services_customer_managed_key_id,
network_connectivity_config_id,
network_id,
private_access_settings_id,
storage_configuration_id,
storage_customer_managed_key_id,
workspace_id,
deployment_name,
workspace_name,
aws_region,
azure_workspace_info,
cloud,
cloud_resource_container,
compute_mode,
creation_time,
custom_tags,
expected_workspace_status,
gcp_managed_network_config,
gke_config,
location,
network,
pricing_tier,
storage_mode,
workspace_status,
workspace_status_message
;
# Description fields are for documentation purposes
- name: workspaces
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the workspaces resource.
- name: aws_region
value: "{{ aws_region }}"
- name: cloud
value: "{{ cloud }}"
description: |
DEPRECATED: This field is being ignored by the server and will be removed in the future. The cloud name. This field always has the value `gcp`.
- name: cloud_resource_container
value:
gcp:
project_id: "{{ project_id }}"
- name: compute_mode
value: "{{ compute_mode }}"
description: |
If the compute mode is `SERVERLESS`, a serverless workspace is created that comes pre-configured with serverless compute and default storage, providing a fully-managed, enterprise-ready SaaS experience. This means you don't need to provide any resources managed by you, such as credentials, storage, or network. If the compute mode is `HYBRID` (which is the default option), a classic workspace is created that uses customer-managed resources.
- name: credentials_id
value: "{{ credentials_id }}"
description: |
ID of the workspace's credential configuration object.
- name: custom_tags
value: "{{ custom_tags }}"
description: |
The custom tags key-value pairing that is attached to this workspace. The key-value pair is a string of utf-8 characters. The value can be an empty string, with maximum length of 255 characters. The key can be of maximum length of 127 characters, and cannot be empty.
- name: deployment_name
value: "{{ deployment_name }}"
description: |
The deployment name defines part of the subdomain for the workspace. The workspace URL for the web application and REST APIs is <workspace-deployment-name>.cloud.databricks.com. For example, if the deployment name is abcsales, your workspace URL will be https://abcsales.cloud.databricks.com. Hyphens are allowed. This property supports only the set of characters that are allowed in a subdomain. To set this value, you must have a deployment name prefix. Contact your Databricks account team to add an account deployment name prefix to your account. Workspace deployment names follow the account prefix and a hyphen. For example, if your account's deployment prefix is acme and the workspace deployment name is workspace-1, the JSON response for the deployment_name field becomes acme-workspace-1. The workspace URL would be acme-workspace-1.cloud.databricks.com. You can also set the deployment_name to the reserved keyword EMPTY if you want the deployment name to only include the deployment prefix. For example, if your account's deployment prefix is acme and the workspace deployment name is EMPTY, the deployment_name becomes acme only and the workspace URL is acme.cloud.databricks.com. This value must be unique across all non-deleted deployments across all AWS regions. If a new workspace omits this property, the server generates a unique deployment name for you with the pattern dbc-xxxxxxxx-xxxx.
- name: gcp_managed_network_config
description: |
The network configuration for the workspace.
value:
gke_cluster_pod_ip_range: "{{ gke_cluster_pod_ip_range }}"
gke_cluster_service_ip_range: "{{ gke_cluster_service_ip_range }}"
subnet_cidr: "{{ subnet_cidr }}"
- name: gke_config
description: |
The configurations of the GKE cluster used by the GCP workspace.
value:
connectivity_type: "{{ connectivity_type }}"
master_ip_range: "{{ master_ip_range }}"
- name: location
value: "{{ location }}"
description: |
The Google Cloud region of the workspace data plane in your Google account (for example, `us-east4`).
- name: managed_services_customer_managed_key_id
value: "{{ managed_services_customer_managed_key_id }}"
description: |
The ID of the workspace's managed services encryption key configuration object. This is used to help protect and control access to the workspace's notebooks, secrets, Databricks SQL queries, and query history. The provided key configuration object property use_cases must contain MANAGED_SERVICES.
- name: network_connectivity_config_id
value: "{{ network_connectivity_config_id }}"
description: |
The object ID of network connectivity config. Once assigned, the workspace serverless compute resources use the same set of stable IP CIDR blocks and optional private link to access your resources.
- name: network_id
value: "{{ network_id }}"
description: |
The ID of the workspace's network configuration object. To use AWS PrivateLink, this field is required.
- name: pricing_tier
value: "{{ pricing_tier }}"
description: |
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum):
... RED = 1
... BLUE = 2
... GREEN = 3
Access them by:
- attribute access:
>>> Color.RED
<Color.RED: 1>
- value lookup:
>>> Color(1)
<Color.RED: 1>
- name lookup:
>>> Color['RED']
<Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own
attributes -- see the documentation for details.
- name: private_access_settings_id
value: "{{ private_access_settings_id }}"
description: |
ID of the workspace's private access settings object. Only used for PrivateLink. You must specify this ID if you are using [AWS PrivateLink] for either front-end (user-to-workspace connection), back-end (data plane to control plane connection), or both connection types. Before configuring PrivateLink, read the [Databricks article about PrivateLink].", [AWS PrivateLink]: https://aws.amazon.com/privatelink/ [Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html
- name: storage_configuration_id
value: "{{ storage_configuration_id }}"
description: |
ID of the workspace's storage configuration object.
- name: storage_customer_managed_key_id
value: "{{ storage_customer_managed_key_id }}"
description: |
The ID of the workspace's storage encryption key configuration object. This is used to encrypt the workspace's root S3 bucket (root DBFS and system data) and, optionally, cluster EBS volumes. The provided key configuration object property use_cases must contain STORAGE.
- name: workspace_name
value: "{{ workspace_name }}"
description: |
The human-readable name of the workspace.
UPDATE examples
- workspaces_update
Updates a workspace.
UPDATE databricks_account.provisioning.workspaces
SET
customer_facing_workspace = '{{ customer_facing_workspace }}'
WHERE
account_id = '{{ account_id }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND customer_facing_workspace = '{{ customer_facing_workspace }}' --required
AND update_mask = '{{ update_mask}}'
RETURNING
account_id,
credentials_id,
managed_services_customer_managed_key_id,
network_connectivity_config_id,
network_id,
private_access_settings_id,
storage_configuration_id,
storage_customer_managed_key_id,
workspace_id,
deployment_name,
workspace_name,
aws_region,
azure_workspace_info,
cloud,
cloud_resource_container,
compute_mode,
creation_time,
custom_tags,
expected_workspace_status,
gcp_managed_network_config,
gke_config,
location,
network,
pricing_tier,
storage_mode,
workspace_status,
workspace_status_message;
DELETE examples
- workspaces_delete
Deletes a Databricks workspace, both specified by ID.
DELETE FROM databricks_account.provisioning.workspaces
WHERE account_id = '{{ account_id }}' --required
AND workspace_id = '{{ workspace_id }}' --required
;