milvus-logo
LFAI
< Docs
  • Python

revoke()

This method revokes the privileges granted to the current role.

Invocation

revoke(object, object_name, privilege)

Parameters

ParameterDescriptionTypeRequired
objectType of the operational object to which the specified privilege belongs, such as Collection, Index, Partition, etc. This parameter is case-sensitive.StringTrue
object_nameName of the object to which the role is granted the specified prvilege.StringTrue
privilegeName of the privilege to be granted to the role. This parameter is case-sensitive.StringTrue

For details on applicable objects and privileges, refer to Users and Roles.

Return

No return

Example

from pymilvus import connections
from pymilvus.orm.role import Role
connections.connect()
role = Role(role_name)
role.revoke("Collection", collection_name, "Insert")
Feedback

Was this page helpful?