User-Defined Roles
A user-defined role is a customized role created by a user by running a command. It contains only one or more CRUD operations or one or more built-in roles. You can customize roles based on different resources and actions. User-defined roles are applied in the same way as built-in roles.
Creating, Modifying, and Deleting Roles
- Before creating a role, connect to the DB instance as a user with the required permission (for example, rwuser). For details, see Connecting a Database.
- You can use createRole to create a user-defined role to control permissions for different databases and collections or inherit permissions from other roles.
- After a role is created, you can run grantPrivilegesToRole, grantRolesToRole, revokeRolesFromRole, or revokePrivilegesFromRole to obtain or revoke permissions of the role. For details, see Creating and Managing Roles.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot