Delete Role from Current Workspace
Description
This command is used to delete a role from the current workspace. Please note that after performing this operation, the role will no longer have access to the associated resources and permissions.
Syntax
role_name: The name of the role to be deleted.
Example
- Delete the role named
simple_role:
- Use the
IF EXISTSoption to delete the role namedtemporary_roleto avoid error messages when the role does not exist:
- Delete the role
report_userwith specific permissions:
Precautions
- Executing this command will permanently delete the role and its associated permissions and resources. Please proceed with caution.
- Before deleting a role, ensure that the permissions and resources of that role have been assigned to other roles or users to prevent data loss or permission issues.
- If you are unsure whether a role is still in use, please perform a query operation first to ensure that important roles are not accidentally deleted.
Deleting an Instance Role
Usage Notes
- Before executing the deletion, ensure that the role is no longer needed. Once deleted, the role cannot be recovered.
- Using the
IF EXISTSoption prevents errors from occurring if the role does not exist. - This operation requires
INSTANCE_ADMINprivileges.
