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 SCHEMAandCREATE 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_roleto createVIRTUAL CLUSTERin thelakehouse_publicworkspace: -
Revoke the
ALTERpermission of the rolesimple_roleon theVIRTUAL CLUSTERnameddefault: -
Reclaim the permissions of the role
uat_demoto create tables and views under thepublicschema: -
Revoke the
READ METADATApermission of the rolereporting_roleon theDATALAKEnamedsales_data: -
Revoke the
ALTERandDROPpermissions of the roleadmin_roleon theFUNCTIONnamedorder_summary: -
Revoke the
SELECTandINSERTpermissions of the roleanalyst_roleon theTABLEnamedcustomer_ordersunder thepublicschema:
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.
