groups
Creates, updates, deletes, gets or lists a groups resource.
Overview​
| Name | groups |
| Type | Resource |
| Id | databricks_account.iamv2.groups |
Fields​
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
account_id | string | The parent account ID for group in Databricks. |
external_id | string | ExternalId of the group in the customer's IdP. |
group_id | string | Internal group ID of the group in Databricks. |
group_name | string | Display name of the group. |
| Name | Datatype | Description |
|---|---|---|
account_id | string | The parent account ID for group in Databricks. |
external_id | string | ExternalId of the group in the customer's IdP. |
group_id | string | Internal group ID of the group in Databricks. |
group_name | string | Display name of the group. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, group_id, account_host | Fetches a group from the Databricks account by its internal ID. | |
list | select | account_id, account_host | filter, page_size, page_token | Lists the groups in the Databricks account, returning one page per call. Supports filtering by group |
create | insert | account_id, account_host | Creates a local group in the Databricks account and returns the created group. A local group is one | |
update | update | account_id, group_id, update_mask, account_host | Updates an existing group in the Databricks account. Only the fields named in the update mask are | |
delete | delete | account_id, group_id, account_host | Deletes a group from the Databricks account by its internal ID. | |
resolve | exec | account_id, account_host, external_id | Resolves 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.
| Name | Datatype | Description |
|---|---|---|
account_host | string | The 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_id | string | |
group_id | string | Required. Internal ID of the group in Databricks. |
update_mask | string | Required. The list of fields to update. |
filter | string | Optional. Allows filtering groups by group name or external id. |
page_size | integer | The 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_token | string | A page token, received from a previous ListGroups call. Provide this to retrieve the subsequent page. |
SELECT examples​
- get
- list
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
;
Lists the groups in the Databricks account, returning one page per call. Supports filtering by group
SELECT
account_id,
external_id,
group_id,
group_name
FROM databricks_account.iamv2.groups
WHERE account_id = '{{ account_id }}' -- required
AND account_host = '{{ account_host }}' -- required
AND filter = '{{ filter }}'
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: groups
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the groups resource.
- name: account_host
value: "{{ account_host }}"
description: Required parameter for the groups resource.
- name: account_id
value: "{{ account_id }}"
description: |
The parent account ID for group in Databricks.
- name: external_id
value: "{{ external_id }}"
description: |
ExternalId of the group in the customer's IdP.
- name: group_id
value: "{{ group_id }}"
description: |
Internal group ID of the group in Databricks.
- name: group_name
value: "{{ group_name }}"
description: |
Display name of the group.
UPDATE examples​
- update
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​
- delete
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​
- resolve
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 }}"
}'
;