account_users
Creates, updates, deletes, gets or lists an account_users resource.
Overview
| Name | account_users |
| Type | Resource |
| Id | databricks_account.iam.account_users |
Fields
The following fields are returned by SELECT queries:
- account_users_v2_get
- account_users_v2_list
| Name | Datatype | Description |
|---|---|---|
id | string | Databricks user ID. |
name | object | |
account_id | string | |
active | boolean | If this user is active |
displayName | string | String that represents a concatenation of given and family names. For example `John Smith`. |
emails | array | All the emails associated with the Databricks user. |
externalId | string | External ID is not currently supported. It is reserved for future use. |
roles | array | Indicates if the group has the admin role. |
userName | string | Email address of the Databricks user. |
| Name | Datatype | Description |
|---|---|---|
id | string | Databricks user ID. |
name | object | |
account_id | string | |
active | boolean | If this user is active |
displayName | string | String that represents a concatenation of given and family names. For example `John Smith`. |
emails | array | All the emails associated with the Databricks user. |
externalId | string | External ID is not currently supported. It is reserved for future use. |
roles | array | Indicates if the group has the admin role. |
userName | string | Email address of the Databricks user. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
account_users_v2_get | select | account_id, id | attributes, count, excluded_attributes, filter, sort_by, sort_order, start_index | Gets information for a specific user in Databricks account. |
account_users_v2_list | select | account_id | attributes, count, excluded_attributes, filter, sort_by, sort_order, start_index | Gets details for all the users associated with a Databricks account. |
account_users_v2_create | insert | account_id | Creates a new user in the Databricks account. This new user will also be added to the Databricks | |
account_users_v2_patch | update | account_id, id | Partially updates a user resource by applying the supplied operations on specific user attributes. | |
account_users_v2_update | replace | account_id, id | Replaces a user's information with the data supplied in request. | |
account_users_v2_delete | delete | account_id, id | Deletes a user. Deleting a user from a Databricks account also removes objects associated with the |
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_id | string | |
id | string | Unique ID for a user in the Databricks account. |
attributes | string | Comma-separated list of attributes to return in response. |
count | integer | Desired number of results per page. Default is 10000. |
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. Multi-part paths are supported. For example, userName, name.givenName, and emails. |
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
- account_users_v2_get
- account_users_v2_list
Gets information for a specific user in Databricks account.
SELECT
id,
name,
account_id,
active,
displayName,
emails,
externalId,
roles,
userName
FROM databricks_account.iam.account_users
WHERE account_id = '{{ account_id }}' -- required
AND id = '{{ id }}' -- 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 }}'
;
Gets details for all the users associated with a Databricks account.
SELECT
id,
name,
account_id,
active,
displayName,
emails,
externalId,
roles,
userName
FROM databricks_account.iam.account_users
WHERE account_id = '{{ account_id }}' -- 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
- account_users_v2_create
- Manifest
Creates a new user in the Databricks account. This new user will also be added to the Databricks
INSERT INTO databricks_account.iam.account_users (
active,
displayName,
emails,
externalId,
id,
name,
roles,
userName,
account_id
)
SELECT
{{ active }},
'{{ displayName }}',
'{{ emails }}',
'{{ externalId }}',
'{{ id }}',
'{{ name }}',
'{{ roles }}',
'{{ userName }}',
'{{ account_id }}'
RETURNING
id,
name,
account_id,
active,
displayName,
emails,
externalId,
roles,
userName
;
# Description fields are for documentation purposes
- name: account_users
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the account_users resource.
- name: active
value: {{ active }}
description: |
If this user is active
- name: displayName
value: "{{ displayName }}"
description: |
String that represents a concatenation of given and family names. For example `John Smith`.
- name: emails
description: |
All the emails associated with the Databricks user.
value:
- display: "{{ display }}"
primary: {{ primary }}
$ref: "{{ $ref }}"
type: "{{ type }}"
value: "{{ value }}"
- name: externalId
value: "{{ externalId }}"
description: |
External ID is not currently supported. It is reserved for future use.
- name: id
value: "{{ id }}"
description: |
Databricks user ID.
- name: name
value:
familyName: "{{ familyName }}"
givenName: "{{ givenName }}"
- name: roles
description: |
Indicates if the group has the admin role.
value:
- display: "{{ display }}"
primary: {{ primary }}
$ref: "{{ $ref }}"
type: "{{ type }}"
value: "{{ value }}"
- name: userName
value: "{{ userName }}"
description: |
Email address of the Databricks user.
UPDATE examples
- account_users_v2_patch
Partially updates a user resource by applying the supplied operations on specific user attributes.
UPDATE databricks_account.iam.account_users
SET
Operations = '{{ Operations }}',
schemas = '{{ schemas }}'
WHERE
account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required;
REPLACE examples
- account_users_v2_update
Replaces a user's information with the data supplied in request.
REPLACE databricks_account.iam.account_users
SET
active = {{ active }},
displayName = '{{ displayName }}',
emails = '{{ emails }}',
externalId = '{{ externalId }}',
name = '{{ name }}',
roles = '{{ roles }}',
userName = '{{ userName }}'
WHERE
account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required;
DELETE examples
- account_users_v2_delete
Deletes a user. Deleting a user from a Databricks account also removes objects associated with the
DELETE FROM databricks_account.iam.account_users
WHERE account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required
;