Skip to main content

workspaces

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

Overview

Nameworkspaces
TypeResource
Idazure_isv.databricks.workspaces

Fields

The following fields are returned by SELECT queries:

OK - Returns the workspace.

NameDatatypeDescription
locationstringThe geo-location where the resource lives
propertiesobjectThe workspace properties.
skuobjectThe resource model definition representing SKU
systemDataobjectThe system metadata relating to this resource
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, workspaceName, subscriptionIdGets the workspace.
list_by_resource_groupselectresourceGroupName, subscriptionIdGets all the workspaces within a resource group.
list_by_subscriptionselectsubscriptionIdGets all the workspaces within a subscription.
create_or_updateinsertresourceGroupName, workspaceName, subscriptionId, data__propertiesCreates a new workspace.
updateupdateresourceGroupName, workspaceName, subscriptionIdUpdates a workspace.
deletedeleteresourceGroupName, workspaceName, subscriptionIdforceDeletionDeletes the workspace.

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
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
workspaceNamestringThe name of the workspace.
forceDeletionbooleanOptional parameter to retain default unity catalog data. By default the data will retained if Uc is enabled on the workspace.

SELECT examples

Gets the workspace.

SELECT
location,
properties,
sku,
systemData,
tags
FROM azure_isv.databricks.workspaces
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND workspaceName = '{{ workspaceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates a new workspace.

INSERT INTO azure_isv.databricks.workspaces (
data__properties,
data__sku,
data__tags,
data__location,
resourceGroupName,
workspaceName,
subscriptionId
)
SELECT
'{{ properties }}' /* required */,
'{{ sku }}',
'{{ tags }}',
'{{ location }}',
'{{ resourceGroupName }}',
'{{ workspaceName }}',
'{{ subscriptionId }}'
RETURNING
location,
properties,
sku,
systemData,
tags
;

UPDATE examples

Updates a workspace.

UPDATE azure_isv.databricks.workspaces
SET
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
location,
properties,
sku,
systemData,
tags;

DELETE examples

Deletes the workspace.

DELETE FROM azure_isv.databricks.workspaces
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND forceDeletion = '{{ forceDeletion }}'
;