Skip to main content

groups

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

Overview

Namegroups
TypeResource
Iddatabricks_workspace.iamv2.groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe parent account ID for group in Databricks.
external_idstringExternalId of the group in the customer's IdP.
internal_idstringInternal group ID of the group in Databricks.
group_namestringDisplay name of the group.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectinternal_id, deployment_nameFetches a group by its internal ID from the Databricks account that parents the calling workspace.
listselectdeployment_namefilter, page_size, page_tokenLists the groups in the Databricks account that parents the calling workspace, returning one page per
createinsertdeployment_name, groupCreates a group in the Databricks account that parents the calling workspace and returns the resulting
updateupdateinternal_id, update_mask, deployment_name, groupUpdates an existing group in the Databricks account that parents the calling workspace. Only the
deletedeleteinternal_id, deployment_nameDeletes a group by its internal ID from the Databricks account that parents the calling workspace.
resolveexecdeployment_name, external_idResolves a group with the given external ID from the customer's IdP. If the group does not exist, it

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)
internal_idstringRequired. Internal ID of the group in Databricks.
update_maskstringOptional. The list of fields to update.
filterstringOptional. Allows filtering groups by group name or external id.
page_sizeintegerThe maximum number of groups to return. The service may return fewer than this value.
page_tokenstringA page token, received from a previous ListGroups call. Provide this to retrieve the subsequent page.

SELECT examples

Fetches a group by its internal ID from the Databricks account that parents the calling workspace.

SELECT
account_id,
external_id,
internal_id,
group_name
FROM databricks_workspace.iamv2.groups
WHERE internal_id = '{{ internal_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;

INSERT examples

Creates a group in the Databricks account that parents the calling workspace and returns the resulting

INSERT INTO databricks_workspace.iamv2.groups (
group,
deployment_name
)
SELECT
'{{ group }}' /* required */,
'{{ deployment_name }}'
RETURNING
account_id,
external_id,
internal_id,
group_name
;

UPDATE examples

Updates an existing group in the Databricks account that parents the calling workspace. Only the

UPDATE databricks_workspace.iamv2.groups
SET
group = '{{ group }}'
WHERE
internal_id = '{{ internal_id }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND group = '{{ group }}' --required
RETURNING
account_id,
external_id,
internal_id,
group_name;

DELETE examples

Deletes a group by its internal ID from the Databricks account that parents the calling workspace.

DELETE FROM databricks_workspace.iamv2.groups
WHERE internal_id = '{{ internal_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;

Lifecycle Methods

Resolves a group with the given external ID from the customer's IdP. If the group does not exist, it

EXEC databricks_workspace.iamv2.groups.resolve
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"external_id": "{{ external_id }}"
}'
;