Skip to main content

grants

Creates, updates, deletes, gets or lists a grants resource.

Overview

Namegrants
TypeResource
Iddatabricks_workspace.unitycatalog.grants

Fields

The following fields are returned by SELECT queries:

The permissions list for securable was successfully retrieved.

NameDatatypeDescription
principalstring
privilegesarray

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdeployment_nameGets the permissions for a securable.
updateupdatedeployment_nameUpdates the permissions for a securable.

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.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

Gets the permissions for a securable.

SELECT
principal,
privileges
FROM databricks_workspace.unitycatalog.grants
WHERE deployment_name = '{{ deployment_name }}' -- required;

UPDATE examples

Updates the permissions for a securable.

UPDATE databricks_workspace.unitycatalog.grants
SET
data__changes = '{{ changes }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
privilege_assignments;