groups
Creates, updates, deletes, gets or lists a groups resource.
Overview
| Name | groups |
| Type | Resource |
| Id | databricks_workspace.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. |
internal_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. |
internal_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 | internal_id, deployment_name | Fetches a group by its internal ID from the Databricks account that parents the calling workspace. | |
list | select | deployment_name | filter, page_size, page_token | Lists the groups in the Databricks account that parents the calling workspace, returning one page per |
create | insert | deployment_name, group | Creates a group in the Databricks account that parents the calling workspace and returns the resulting | |
update | update | internal_id, update_mask, deployment_name, group | Updates an existing group in the Databricks account that parents the calling workspace. Only the | |
delete | delete | internal_id, deployment_name | Deletes a group by its internal ID from the Databricks account that parents the calling workspace. | |
resolve | exec | deployment_name, 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 |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
internal_id | string | Required. Internal ID of the group in Databricks. |
update_mask | string | Optional. 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. |
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 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
;
Lists the groups in the Databricks account that parents the calling workspace, returning one page per
SELECT
account_id,
external_id,
internal_id,
group_name
FROM databricks_workspace.iamv2.groups
WHERE deployment_name = '{{ deployment_name }}' -- required
AND filter = '{{ filter }}'
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: groups
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the groups resource.
- name: group
description: |
Required. Group to be created in <Databricks>
value:
account_id: "{{ account_id }}"
external_id: "{{ external_id }}"
group_name: "{{ group_name }}"
internal_id: "{{ internal_id }}"
UPDATE examples
- update
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
- delete
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
- resolve
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 }}"
}'
;