Description
This command is used to revoke the permissions of a specified role. By using the REVOKE statement, you can revoke permissions at different levels, including workspace, workspace objects, schema, and schema object levels.
Syntax for Workspace User and Role Permission Management
Parameter Description
-
workspacePrivileges: The permissions to create objects in the workspace, such as
CREATE SCHEMA
andCREATE VCLUSTER
. -
workspaceObjectPrivileges: The permissions to modify and view metadata of objects in the workspace, such as
ALTER
,DROP
,READ METADATA
, andALL [PRIVILEGES]
. -
schemaPrivileges: The permissions to create objects in the schema, such as
CREATE TABLE
,CREATE VIEW
, andCREATE MATERIALIZED VIEW
. -
schemaObjectPrivileges: The permissions to modify, delete, query, etc., objects in the schema, such as
ALTER
,DROP
,SELECT
,INSERT
,READ METADATA
, andALL
.
Example
-
Revoke the permission for the role
simple_role
to createVIRTUAL CLUSTER
in thelakehouse_public
workspace: -
Revoke the
ALTER
permission of the rolesimple_role
on theVIRTUAL CLUSTER
nameddefault
: -
Reclaim the permissions of the role
uat_demo
to create tables and views under thepublic
schema: -
Revoke the
READ METADATA
permission of the rolereporting_role
on theDATALAKE
namedsales_data
: -
Revoke the
ALTER
andDROP
permissions of the roleadmin_role
on theFUNCTION
namedorder_summary
: -
Revoke the
SELECT
andINSERT
permissions of the roleanalyst_role
on theTABLE
namedcustomer_orders
under thepublic
schema:
By the above example, you can flexibly revoke the permissions of roles according to actual needs. Please note that the user executing the REVOKE statement needs to have sufficient permissions to revoke the permissions of other roles.
Instance Role Permission Management
LakeHouse supports fine-grained revocation of cross-workspace permissions for Instance Roles, ensuring the flexibility and security of permission control.