Skip to main content

groups

Operations on a groups resource.

Overview

Namegroups
TypeResource
Iddatabricks_account.iam.groups

Fields

NameDatatype
idstring
displayNamestring
externalIdstring
membersarray
rolesarray

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccount_id, idGets the information for a specific group in the Databricks account.
listSELECTaccount_idGets all details of the groups associated with the Databricks account.
createINSERTaccount_idCreates a group in the Databricks account with a unique name, using the supplied group details.
deleteDELETEaccount_id, idDeletes a group from the Databricks account.
patchUPDATEaccount_id, idPartially updates the details of a group.
updateREPLACEaccount_id, idUpdates the details of a group by replacing the entire group entity.

SELECT examples

SELECT
id,
displayName,
externalId,
members,
roles
FROM databricks_account.iam.groups
WHERE account_id = '{{ account_id }}';

INSERT example

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

/*+ create */
INSERT INTO databricks_account.iam.groups (
account_id,
data__displayName,
data__members,
data__roles,
data__externalId
)
SELECT
'{{ account_id }}',
'{{ displayName }}',
'{{ members }}',
'{{ roles }}',
'{{ externalId }}'
;

UPDATE example

Updates a groups resource.

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

REPLACE example

Replaces a groups resource.

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

DELETE example

Deletes a groups resource.

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