groups_v2
Creates, updates, deletes, gets or lists a groups_v2 resource.
Overview
| Name | groups_v2 |
| Type | Resource |
| Id | databricks_workspace.iam.groups_v2 |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Databricks group ID |
displayName | string | |
entitlements | array | Entitlements assigned to the group. See [assigning entitlements] for a full list of supported values. [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements |
externalId | string | external_id should be unique for identifying groups |
groups | array | |
members | array | |
meta | object | Container for the group identifier. Workspace local versus account. |
roles | array | Corresponds to AWS instance profile/arn role. |
schemas | array | The schema of the group. |
| Name | Datatype | Description |
|---|---|---|
id | string | Databricks group ID |
displayName | string | |
entitlements | array | Entitlements assigned to the group. See [assigning entitlements] for a full list of supported values. [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements |
externalId | string | external_id should be unique for identifying groups |
groups | array | |
members | array | |
meta | object | Container for the group identifier. Workspace local versus account. |
roles | array | Corresponds to AWS instance profile/arn role. |
schemas | array | The schema of the group. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, deployment_name | Gets the information for a specific group in the Databricks workspace. | |
list | select | deployment_name | attributes, count, excluded_attributes, filter, sort_by, sort_order, start_index | Gets all details of the groups associated with the Databricks workspace. |
create | insert | deployment_name | Creates a group in the Databricks workspace with a unique name, using the supplied group details. | |
patch | update | id, deployment_name | Partially updates the details of a group. | |
replace | replace | id, deployment_name | Updates the details of a group by replacing the entire group entity. | |
delete | delete | id, deployment_name | Deletes a group from the Databricks workspace. |
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) |
id | string | Unique ID for a group in the Databricks workspace. |
attributes | string | Comma-separated list of attributes to return in response. |
count | integer | Desired number of results per page. |
excluded_attributes | string | Comma-separated list of attributes to exclude in response. |
filter | string | Query by which the results have to be filtered. Supported operators are equals(eq), contains(co), starts with(sw) and not equals(ne). Additionally, simple expressions can be formed using logical operators - and and or. The [SCIM RFC] has more details but we currently only support simple expressions. [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 |
sort_by | string | Attribute to sort the results. |
sort_order | string | The order to sort the results. |
start_index | integer | Specifies the index of the first result. First item is number 1. |
SELECT examples
- get
- list
Gets the information for a specific group in the Databricks workspace.
SELECT
id,
displayName,
entitlements,
externalId,
groups,
members,
meta,
roles,
schemas
FROM databricks_workspace.iam.groups_v2
WHERE id = '{{ id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
Gets all details of the groups associated with the Databricks workspace.
SELECT
id,
displayName,
entitlements,
externalId,
groups,
members,
meta,
roles,
schemas
FROM databricks_workspace.iam.groups_v2
WHERE deployment_name = '{{ deployment_name }}' -- required
AND attributes = '{{ attributes }}'
AND count = '{{ count }}'
AND excluded_attributes = '{{ excluded_attributes }}'
AND filter = '{{ filter }}'
AND sort_by = '{{ sort_by }}'
AND sort_order = '{{ sort_order }}'
AND start_index = '{{ start_index }}'
;
INSERT examples
- create
- Manifest
Creates a group in the Databricks workspace with a unique name, using the supplied group details.
INSERT INTO databricks_workspace.iam.groups_v2 (
display_name,
entitlements,
external_id,
groups,
id,
members,
meta,
roles,
schemas,
deployment_name
)
SELECT
'{{ display_name }}',
'{{ entitlements }}',
'{{ external_id }}',
'{{ groups }}',
'{{ id }}',
'{{ members }}',
'{{ meta }}',
'{{ roles }}',
'{{ schemas }}',
'{{ deployment_name }}'
RETURNING
id,
displayName,
entitlements,
externalId,
groups,
members,
meta,
roles,
schemas
;
# Description fields are for documentation purposes
- name: groups_v2
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the groups_v2 resource.
- name: display_name
value: "{{ display_name }}"
description: |
String that represents a human-readable group name
- name: entitlements
description: |
Entitlements assigned to the group. See [assigning entitlements] for a full list of supported values. [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements
value:
- display: "{{ display }}"
primary: {{ primary }}
$ref: "{{ $ref }}"
type: "{{ type }}"
value: "{{ value }}"
- name: external_id
value: "{{ external_id }}"
description: |
:param groups: List[:class:`ComplexValue`] (optional)
- name: groups
value:
- display: "{{ display }}"
primary: {{ primary }}
$ref: "{{ $ref }}"
type: "{{ type }}"
value: "{{ value }}"
- name: id
value: "{{ id }}"
description: |
Databricks group ID
- name: members
description: |
:param meta: :class:`ResourceMeta` (optional) Container for the group identifier. Workspace local versus account.
value:
- display: "{{ display }}"
primary: {{ primary }}
$ref: "{{ $ref }}"
type: "{{ type }}"
value: "{{ value }}"
- name: meta
value:
resourceType: "{{ resourceType }}"
- name: roles
description: |
Corresponds to AWS instance profile/arn role.
value:
- display: "{{ display }}"
primary: {{ primary }}
$ref: "{{ $ref }}"
type: "{{ type }}"
value: "{{ value }}"
- name: schemas
value:
- "{{ schemas }}"
description: |
The schema of the group.
UPDATE examples
- patch
Partially updates the details of a group.
UPDATE databricks_workspace.iam.groups_v2
SET
operations = '{{ operations }}',
schemas = '{{ schemas }}'
WHERE
id = '{{ id }}' --required
AND deployment_name = '{{ deployment_name }}' --required;
REPLACE examples
- replace
Updates the details of a group by replacing the entire group entity.
REPLACE databricks_workspace.iam.groups_v2
SET
display_name = '{{ display_name }}',
entitlements = '{{ entitlements }}',
external_id = '{{ external_id }}',
groups = '{{ groups }}',
members = '{{ members }}',
meta = '{{ meta }}',
roles = '{{ roles }}',
schemas = '{{ schemas }}'
WHERE
id = '{{ id }}' --required
AND deployment_name = '{{ deployment_name }}' --required;
DELETE examples
- delete
Deletes a group from the Databricks workspace.
DELETE FROM databricks_workspace.iam.groups_v2
WHERE id = '{{ id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;