REVOKE
Function Description
Revokes previously granted privileges from a role or user. The REVOKE statement can revoke permissions at various levels, including workspace, workspace object, Schema, and Schema object levels.
Workspace User and Role Permission Management Syntax
Privilege Type Description
| Privilege Type | Description | Example |
|---|---|---|
workspacePrivileges | Privileges to create objects in a workspace | CREATE SCHEMA, CREATE VCLUSTER |
workspaceObjectPrivileges | Privileges to modify workspace objects and view metadata | ALTER, DROP, READ METADATA, ALL [PRIVILEGES] |
schemaPrivileges | Privileges to create objects in a Schema | CREATE TABLE, CREATE FUNCTION, CREATE VOLUME |
schemaObjectPrivileges | Privileges to modify, drop, and query Schema objects | ALTER, DROP, SELECT, INSERT, READ METADATA, ALL |
functionPrivileges | Privileges to use, alter, and drop a Function | USE FUNCTION, ALTER FUNCTION, DROP FUNCTION, READ METADATA, ALL PRIVILEGES |
volumePrivileges | Privileges to read, write, alter, and drop a Volume | READ VOLUME, WRITE VOLUME, ALTER VOLUME, DROP VOLUME, READ METADATA, ALL PRIVILEGES |
Functions and Volumes are schema child objects. Revoke CREATE FUNCTION and CREATE VOLUME from the parent schema, and revoke the remaining privileges from the specific object.
Usage Examples
-
Revoke from role
simple_rolethe privilege to create VCLUSTERs in the workspace: -
Revoke from role
simple_roletheALTERprivilege on the VCLUSTER nameddefault: -
Revoke from role
uat_demothe privilege to create tables and views in thepublicSchema: -
Revoke from role
reporting_roleread access to Volumepublic.sales_data: -
Revoke from role
admin_rolealter and drop privileges on Functionpublic.order_summary: -
Revoke from role
analyst_roletheSELECTandINSERTprivileges on the tablecustomer_ordersin thepublicSchema: -
Revoke role
test_readonly_rolefrom usertester:
Notes
- Executing this command requires the
workspace_adminorsecurity_adminrole. - After revocation, the revoked party will immediately lose the ability to access the corresponding resource.
- You can verify the revocation result using
SHOW GRANTS TO ROLE role_nameorSHOW GRANTS TO USER user_name.
Instance Role Permission Management
LakeHouse supports fine-grained revocation of cross-workspace permissions for Instance Roles, ensuring flexibility and security in permission control.
