users
Creates, updates, deletes, gets or lists a users
resource.
Overview
Name | users |
Type | Resource |
Id | databricks_workspace.iam.users |
Fields
The following fields are returned by SELECT
queries:
- get
- list
User information was returned successfully.
Name | Datatype | Description |
---|---|---|
id | string | |
name | object | |
active | boolean | |
displayName | string | |
emails | array | |
entitlements | array | |
externalId | string | |
groups | array | |
roles | array | |
schemas | array | |
userName | string |
List users operation was succesful.
Name | Datatype | Description |
---|---|---|
id | string | |
name | object | |
active | boolean | |
displayName | string | |
emails | array | |
entitlements | array | |
externalId | string | |
groups | array | |
roles | array | |
schemas | array | |
userName | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | deployment_name | Gets information for a specific user in Databricks workspace. | |
list | select | deployment_name | Gets details for all the users associated with a Databricks workspace. | |
create | insert | deployment_name | Creates a new user in the Databricks workspace. This new user will also be added to the Databricks account. | |
update | update | deployment_name | Replaces a user's information with the data supplied in request. | |
patch | update | deployment_name | Partially updates a user resource by applying the supplied operations on specific user attributes. | |
delete | delete | deployment_name | Deletes a user. Deleting a user from a Databricks workspace also removes objects associated with the user. |
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) |
SELECT
examples
- get
- list
Gets information for a specific user in Databricks workspace.
SELECT
id,
name,
active,
displayName,
emails,
entitlements,
externalId,
groups,
roles,
schemas,
userName
FROM databricks_workspace.iam.users
WHERE deployment_name = '{{ deployment_name }}' -- required;
Gets details for all the users associated with a Databricks workspace.
SELECT
id,
name,
active,
displayName,
emails,
entitlements,
externalId,
groups,
roles,
schemas,
userName
FROM databricks_workspace.iam.users
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
Creates a new user in the Databricks workspace. This new user will also be added to the Databricks account.
INSERT INTO databricks_workspace.iam.users (
data__schemas,
data__id,
data__userName,
data__displayName,
data__externalId,
data__active,
data__emails,
data__name,
data__groups,
data__roles,
data__entitlements,
deployment_name
)
SELECT
'{{ schemas }}',
{{ id }},
'{{ userName }}',
'{{ displayName }}',
'{{ externalId }}',
{{ active }},
'{{ emails }}',
'{{ name }}',
'{{ groups }}',
'{{ roles }}',
'{{ entitlements }}',
'{{ deployment_name }}'
;
# Description fields are for documentation purposes
- name: users
props:
- name: deployment_name
value: string
description: Required parameter for the users resource.
- name: schemas
value: Array of string
- name: id
value: integer
- name: userName
value: email
- name: displayName
value: string
- name: externalId
value: string
- name: active
value: boolean
- name: emails
value: Array of object
- name: name
value: object
- name: groups
value: Array of object
- name: roles
value: Array of object
- name: entitlements
value: Array of object
UPDATE
examples
- update
- patch
Replaces a user's information with the data supplied in request.
UPDATE databricks_workspace.iam.users
SET
data__schemas = '{{ schemas }}',
data__id = {{ id }},
data__userName = '{{ userName }}',
data__displayName = '{{ displayName }}',
data__externalId = '{{ externalId }}',
data__active = {{ active }},
data__emails = '{{ emails }}',
data__name = '{{ name }}',
data__groups = '{{ groups }}',
data__roles = '{{ roles }}',
data__entitlements = '{{ entitlements }}'
WHERE
deployment_name = '{{ deployment_name }}' --required;
Partially updates a user resource by applying the supplied operations on specific user attributes.
UPDATE databricks_workspace.iam.users
SET
data__schemas = '{{ schemas }}',
data__Operations = '{{ Operations }}'
WHERE
deployment_name = '{{ deployment_name }}' --required;
DELETE
examples
- delete
Deletes a user. Deleting a user from a Databricks workspace also removes objects associated with the user.
DELETE FROM databricks_workspace.iam.users
WHERE deployment_name = '{{ deployment_name }}' --required;