Skip to main content

groups

Operations on a groups resource.

Overview

Namegroups
TypeResource
Iddatabricks_workspace.iam.groups

Fields

NameDatatype
idstring
displayNamestring
entitlementsarray
externalIdstring
groupsarray
membersarray
rolesarray
schemasarray

Methods

NameAccessible byRequired ParamsDescription
getSELECTid, deployment_nameGets the information for a specific group in the Databricks workspace.
listSELECTdeployment_nameGets all details of the groups associated with the Databricks workspace.
createINSERTdeployment_nameCreates a group in the Databricks workspace with a unique name, using the supplied group details.
deleteDELETEid, deployment_nameDeletes a group from the Databricks workspace.
patchUPDATEid, deployment_namePartially updates the details of a group.
updateUPDATEid, deployment_nameUpdates the details of a group by replacing the entire group entity.

SELECT examples

SELECT
id,
displayName,
entitlements,
externalId,
groups,
members,
roles,
schemas
FROM databricks_workspace.iam.groups
WHERE deployment_name = '{{ deployment_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new groups resource.

/*+ create */
INSERT INTO databricks_workspace.iam.groups (
deployment_name,
data__schemas,
data__displayName,
data__members,
data__groups,
data__roles,
data__entitlements,
data__externalId
)
SELECT
'{{ deployment_name }}',
'{{ schemas }}',
'{{ displayName }}',
'{{ members }}',
'{{ groups }}',
'{{ roles }}',
'{{ entitlements }}',
'{{ externalId }}'
;

UPDATE example

Updates a groups resource.

/*+ update */
-- replace field1, field2, etc. with the fields you want to update
UPDATE databricks_workspace.iam.groups
SET field1 = '{{ value1 }}',
field2 = '{{ value2 }}', ...
WHERE id = '{{ id }}' AND
deployment_name = '{{ deployment_name }}';

DELETE example

Deletes a groups resource.

/*+ delete */
DELETE FROM databricks_workspace.iam.groups
WHERE id = '{{ id }}' AND
deployment_name = '{{ deployment_name }}';