Skip to main content

default_workspace_base_environment

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

Overview​

Namedefault_workspace_base_environment
TypeResource
Iddatabricks_workspace.environments.default_workspace_base_environment

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe resource name of this singleton resource. Format: default-workspace-base-environment
cpu_workspace_base_environmentstringThe default workspace base environment for CPU compute. Format: workspace-base-environments/{workspace_base_environment}
gpu_workspace_base_environmentstringThe default workspace base environment for GPU compute. Format: workspace-base-environments/{workspace_base_environment}

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdeployment_name, workspace_domainGets the default WorkspaceBaseEnvironment configuration for the workspace. Returns the current default
updateupdateupdate_mask, deployment_name, workspace_domainUpdates the default WorkspaceBaseEnvironment configuration for the workspace. Sets the specified base

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
deployment_namestringThe Databricks workspace deployment name: the host prefix of the workspace URL (dbc-abcd0123-a1bc on AWS, adb-1234567890123456.7 on Azure, 1234567890123456.7 on GCP). Set DATABRICKS_DEPLOYMENT_NAME to default it for the session. (default: dbc-abcd0123-a1bc, x-stackQL-envVar: DATABRICKS_DEPLOYMENT_NAME)
update_maskobjectField mask specifying which fields to update. Use comma as the separator for multiple fields (no space). The special value '' indicates that all fields should be updated (full replacement). Valid field paths: cpu_workspace_base_environment, gpu_workspace_base_environment To unset one or both defaults, include the field path(s) in the mask and omit them from the request body. To unset both, you must list both paths explicitly — the wildcard '' cannot be used to unset fields.
workspace_domainstringThe Databricks workspace domain suffix for the cloud. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws). (default: cloud.databricks.com, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"cloud.databricks.com","azure":"azuredatabricks.net","gcp":"gcp.databricks.com"}})

SELECT examples​

Gets the default WorkspaceBaseEnvironment configuration for the workspace. Returns the current default

SELECT
name,
cpu_workspace_base_environment,
gpu_workspace_base_environment
FROM databricks_workspace.environments.default_workspace_base_environment
WHERE deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
;

UPDATE examples​

Updates the default WorkspaceBaseEnvironment configuration for the workspace. Sets the specified base

UPDATE databricks_workspace.environments.default_workspace_base_environment
SET
cpu_workspace_base_environment = '{{ cpu_workspace_base_environment }}',
gpu_workspace_base_environment = '{{ gpu_workspace_base_environment }}',
name = '{{ name }}'
WHERE
update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
RETURNING
name,
cpu_workspace_base_environment,
gpu_workspace_base_environment;