remove_privileges_from_group()
Deprecated.
This API is an ORM-style PyMilvus API and will be removed in PyMilvus 3.1. Use MilvusClient instead.
This operation removes privileges from a privilege group for the current role.
To complete this operation, you need to enable authentication on your Milvus instance. For details, refer to Authenticate User Access.
Request Syntax
remove_privileges_from_group(
privilege_group: str,
privileges: list
)
PARAMETERS:
privilege_group (string)
[REQUIRED]
The name of the target privilege group.
privileges (list)
[REQUIRED]
A list of privilege names to remove.
RETURN TYPE:
NoneType
RETURNS:
None
EXCEPTIONS:
-
This exception will be raised when any error occurs during this operation.
Example
from pymilvus import Role
# Create a role
role = Role("read_only")
role.create()
# Create a privilege group
role.create_privilege_group("read_only_privileges")
role.add_privileges_to_group("read_only_privileges", ["Search", "Get"])
# Remove privileges from the privilege group
role.remove_privileges_from_group("read_only_privileges", ["Get"])