milvus-logo
LFAI
< Docs
  • Python

list_grant()

This method lists the relationship between the current role and the specified operation object.

Invocation

list_grant(object, object_name)

Parameters

ParameterDescriptionTypeRequired
objectType of the object to which the 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

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

Return

Returns a GrantInfo object comprising a list of GrantItem objects.

Example

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