Skip to main content

groups

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

Overview

Namegroups
TypeResource
Iddatabricks_workspace.iam.groups

Fields

The following fields are returned by SELECT queries:

Group information was returned successfully.

NameDatatypeDescription
idstring
displayNamestring
entitlementsarray
externalIdstring
groupsarray
membersarray
rolesarray
schemasarray

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdeployment_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.
updateupdatedeployment_nameUpdates the details of a group by replacing the entire group entity.
patchupdatedeployment_namePartially updates the details of a group.
deletedeletedeployment_nameDeletes a group from the Databricks 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
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

Gets the information for a specific group in the Databricks workspace.

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

INSERT examples

Creates a group in the Databricks workspace with a unique name, using the supplied group details.

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

UPDATE examples

Updates the details of a group by replacing the entire group entity.

UPDATE databricks_workspace.iam.groups
SET
data__schemas = '{{ schemas }}',
data__id = {{ id }},
data__displayName = '{{ displayName }}',
data__externalId = '{{ externalId }}',
data__members = '{{ members }}',
data__groups = '{{ groups }}',
data__roles = '{{ roles }}',
data__entitlements = '{{ entitlements }}'
WHERE
deployment_name = '{{ deployment_name }}' --required;

DELETE examples

Deletes a group from the Databricks workspace.

DELETE FROM databricks_workspace.iam.groups
WHERE deployment_name = '{{ deployment_name }}' --required;