Skip to main content

workspaces

Creates, updates, deletes, gets or lists a workspaces resource.

Overview

Nameworkspaces
TypeResource
Iddatabricks_account.provisioning.workspaces

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstring
credentials_idstringID of the workspace's credential configuration object.
managed_services_customer_managed_key_idstringID of the key configuration for encrypting managed services.
network_connectivity_config_idstringThe object ID of network connectivity config.
network_idstringIf 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_idstringID 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_idstringID of the workspace's storage configuration object.
storage_customer_managed_key_idstringID of the key configuration for encrypting workspace storage.
workspace_idintegerA unique integer ID for the workspace
deployment_namestring
workspace_namestringThe human-readable name of the workspace.
aws_regionstring
azure_workspace_infoobject
cloudstringThe cloud name. This field can have values like `azure`, `gcp`.
cloud_resource_containerobject
compute_modestringThe compute mode of the workspace. (HYBRID, SERVERLESS)
creation_timeintegerTime in epoch milliseconds when the workspace was created.
custom_tagsobjectThe 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_statusstringA 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_configobjectThe network configuration for the workspace.
gke_configobjectThe configurations of the GKE cluster used by the GCP workspace.
locationstringThe Google Cloud region of the workspace data plane in your Google account (for example, `us-east4`).
networkobjectThe network configuration for the workspace. DEPRECATED. Use `network_id` instead.
pricing_tierstringCreate a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />&gt;&gt;&gt; class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> &gt;&gt;&gt; Color.RED<br /> &lt;Color.RED: 1&gt;<br /><br />- value lookup:<br /><br /> &gt;&gt;&gt; Color(1)<br /> &lt;Color.RED: 1&gt;<br /><br />- name lookup:<br /><br /> &gt;&gt;&gt; Color['RED']<br /> &lt;Color.RED: 1&gt;<br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />&gt;&gt;&gt; len(Color)<br />3<br /><br />&gt;&gt;&gt; list(Color)<br />[&lt;Color.RED: 1&gt;, &lt;Color.BLUE: 2&gt;, &lt;Color.GREEN: 3&gt;]<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_modestringThe storage mode of the workspace. (CUSTOMER_HOSTED, DEFAULT_STORAGE)
workspace_statusstringThe status of a workspace (BANNED, CANCELLING, FAILED, NOT_PROVISIONED, PROVISIONING, RUNNING)
workspace_status_messagestringMessage describing the current workspace status.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
workspaces_getselectaccount_id, workspace_idGets information including status for a Databricks workspace, specified by ID. In the response, the
workspaces_listselectaccount_idLists Databricks workspaces for an account.
workspaces_createinsertaccount_idCreates a new workspace using a credential configuration and a storage configuration, an optional
workspaces_updateupdateaccount_id, workspace_id, customer_facing_workspaceupdate_maskUpdates a workspace.
workspaces_deletedeleteaccount_id, workspace_idDeletes 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.

NameDatatypeDescription
account_idstring
workspace_idinteger
update_maskstringThe 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

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
;

INSERT examples

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
;

UPDATE examples

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

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
;