groups
Operations on a groups
resource.
Overview
Name | groups |
Type | Resource |
Id | databricks_account.iam.groups |
Fields
Name | Datatype |
---|---|
id | string |
displayName | string |
externalId | string |
members | array |
roles | array |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | account_id, id | Gets the information for a specific group in the Databricks account. |
list | SELECT | account_id | Gets all details of the groups associated with the Databricks account. |
create | INSERT | account_id | Creates a group in the Databricks account with a unique name, using the supplied group details. |
delete | DELETE | account_id, id | Deletes a group from the Databricks account. |
patch | UPDATE | account_id, id | Partially updates the details of a group. |
update | REPLACE | account_id, id | Updates the details of a group by replacing the entire group entity. |
SELECT
examples
- groups (list)
- groups (get)
SELECT
id,
displayName,
externalId,
members,
roles
FROM databricks_account.iam.groups
WHERE account_id = '{{ account_id }}';
SELECT
id,
displayName,
externalId,
members,
roles
FROM databricks_account.iam.groups
WHERE account_id = '{{ account_id }}' AND
id = '{{ id }}';
INSERT
example
Use the following StackQL query and manifest file to create a new groups
resource.
- groups
- Manifest
/*+ create */
INSERT INTO databricks_account.iam.groups (
account_id,
data__displayName,
data__members,
data__roles,
data__externalId
)
SELECT
'{{ account_id }}',
'{{ displayName }}',
'{{ members }}',
'{{ roles }}',
'{{ externalId }}'
;
- name: your_resource_model_name
props:
- name: displayName
value: string
- name: members
value:
- $ref: string
value: string
display: string
primary: true
type: string
- name: roles
value:
- $ref: string
value: string
display: string
primary: true
type: string
- name: externalId
value: string
UPDATE
example
Updates a groups
resource.
/*+ update */
-- replace field1, field2, etc. with the fields you want to update
UPDATE databricks_account.iam.groups
SET field1 = '{{ value1 }}',
field2 = '{{ value2 }}', ...
WHERE account_id = '{{ account_id }}' AND
id = '{{ id }}';
REPLACE
example
Replaces a groups
resource.
/*+ update */
-- replace field1, field2, etc. with the fields you want to update
REPLACE databricks_account.iam.groups
SET field1 = '{ value1 }',
field2 = '{ value2 }', ...
WHERE account_id = '{{ account_id }}' AND
id = '{{ id }}';
DELETE
example
Deletes a groups
resource.
/*+ delete */
DELETE FROM databricks_account.iam.groups
WHERE account_id = '{{ account_id }}' AND
id = '{{ id }}';