Skip to main content

groups

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

Overview​

Namegroups
TypeResource
Iddatabricks_account.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.
group_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
getselectaccount_id, group_id, account_hostFetches a group from the Databricks account by its internal ID.
listselectaccount_id, account_hostfilter, page_size, page_tokenLists the groups in the Databricks account, returning one page per call. Supports filtering by group
createinsertaccount_id, account_hostCreates a local group in the Databricks account and returns the created group. A local group is one
updateupdateaccount_id, group_id, update_mask, account_hostUpdates an existing group in the Databricks account. Only the fields named in the update mask are
deletedeleteaccount_id, group_id, account_hostDeletes a group from the Databricks account by its internal ID.
resolveexecaccount_id, account_host, 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
account_hoststringThe Databricks account console host. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws), or set explicitly with DATABRICKS_ACCOUNT_HOST (bare host, no scheme). (default: accounts.cloud.databricks.com, x-stackQL-envVar: DATABRICKS_ACCOUNT_HOST, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"accounts.cloud.databricks.com","azure":"accounts.azuredatabricks.net","gcp":"accounts.gcp.databricks.com"}})
account_idstring
group_idstringRequired. Internal ID of the group in Databricks.
update_maskstringRequired. 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. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the maximum are clamped to 1000.
page_tokenstringA page token, received from a previous ListGroups call. Provide this to retrieve the subsequent page.

SELECT examples​

Fetches a group from the Databricks account by its internal ID.

SELECT
account_id,
external_id,
group_id,
group_name
FROM databricks_account.iamv2.groups
WHERE account_id = '{{ account_id }}' -- required
AND group_id = '{{ group_id }}' -- required
AND account_host = '{{ account_host }}' -- required
;

INSERT examples​

Creates a local group in the Databricks account and returns the created group. A local group is one

INSERT INTO databricks_account.iamv2.groups (
account_id,
external_id,
group_id,
group_name,
account_id,
account_host
)
SELECT
'{{ account_id }}',
'{{ external_id }}',
'{{ group_id }}',
'{{ group_name }}',
'{{ account_id }}',
'{{ account_host }}'
RETURNING
account_id,
external_id,
group_id,
group_name
;

UPDATE examples​

Updates an existing group in the Databricks account. Only the fields named in the update mask are

UPDATE databricks_account.iamv2.groups
SET
account_id = '{{ account_id }}',
external_id = '{{ external_id }}',
group_id = '{{ group_id }}',
group_name = '{{ group_name }}'
WHERE
account_id = '{{ account_id }}' --required
AND group_id = '{{ group_id }}' --required
AND update_mask = '{{ update_mask }}' --required
AND account_host = '{{ account_host }}' --required
RETURNING
account_id,
external_id,
group_id,
group_name;

DELETE examples​

Deletes a group from the Databricks account by its internal ID.

DELETE FROM databricks_account.iamv2.groups
WHERE account_id = '{{ account_id }}' --required
AND group_id = '{{ group_id }}' --required
AND account_host = '{{ account_host }}' --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_account.iamv2.groups.resolve
@account_id='{{ account_id }}' --required,
@account_host='{{ account_host }}' --required
@@json=
'{
"external_id": "{{ external_id }}"
}'
;