current_user
Creates, updates, deletes, gets or lists a current_user resource.
Overview
| Name | current_user |
| Type | Resource |
| Id | databricks_workspace.iam.current_user |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
id | string | Databricks user ID. |
name | object | |
active | boolean | |
displayName | string | String that represents a concatenation of given and family names. For example ``John Smith``. This field cannot be updated through the Workspace SCIM APIs when `identity federation is enabled <https://docs.databricks.com/administration-guide/users-groups/best-practices.html#enable-identity-federation>`__. Use Account SCIM APIs to update ``displayName``. |
emails | array | All the emails associated with the Databricks user. This attribute cannot be updated through the SCIM PATCH or PUT APIs; any supplied change is ignored. |
entitlements | array | Entitlements assigned to the user. See `assigning entitlements <https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements>`__ for a full list of supported values. |
externalId | string | External ID is not currently supported. It is reserved for future use. |
groups | array | |
roles | array | Corresponds to AWS instance profile/arn role. |
schemas | array | The schema of the user. |
userName | string | Email address of the Databricks user. This attribute cannot be updated through the SCIM PATCH or PUT APIs; any supplied change is ignored. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | deployment_name | attributes, excluded_attributes | Get details about the current method caller's identity. |
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) |
attributes | string | Comma-separated list of attributes to return in response. |
excluded_attributes | string | Comma-separated list of attributes to exclude in response. |
SELECT examples
- get
Get details about the current method caller's identity.
SELECT
id,
name,
active,
displayName,
emails,
entitlements,
externalId,
groups,
roles,
schemas,
userName
FROM databricks_workspace.iam.current_user
WHERE deployment_name = '{{ deployment_name }}' -- required
AND attributes = '{{ attributes }}'
AND excluded_attributes = '{{ excluded_attributes }}'
;