share_permissions
Creates, updates, deletes, gets or lists a share_permissions resource.
Overview
| Name | share_permissions |
| Type | Resource |
| Id | databricks_workspace.sharing.share_permissions |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
next_page_token | string | |
privilege_assignments | array | The privileges assigned to each principal |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | name, deployment_name | max_results, page_token | Gets the permissions for a data share from the metastore. The caller must have the USE_SHARE privilege |
update | update | name, deployment_name | Updates the permissions for a data share in the metastore. The caller must have both the USE_SHARE and |
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) |
name | string | The name of the share. |
max_results | integer | Maximum number of permissions to return. - when set to 0, the page length is set to a server configured value (recommended); - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to a value less than 0, an invalid parameter error is returned; - If not set, all valid permissions are returned (not recommended). - Note: The number of returned permissions might be less than the specified max_results size, even zero. The only definitive indication that no further permissions can be fetched is when the next_page_token is unset from the response. |
page_token | string | Opaque pagination token to go to next page based on previous query. |
SELECT examples
- list
Gets the permissions for a data share from the metastore. The caller must have the USE_SHARE privilege
SELECT
next_page_token,
privilege_assignments
FROM databricks_workspace.sharing.share_permissions
WHERE name = '{{ name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND max_results = '{{ max_results }}'
AND page_token = '{{ page_token }}'
;
UPDATE examples
- update
Updates the permissions for a data share in the metastore. The caller must have both the USE_SHARE and
UPDATE databricks_workspace.sharing.share_permissions
SET
changes = '{{ changes }}',
omit_permissions_list = {{ omit_permissions_list }}
WHERE
name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
RETURNING
privilege_assignments;