RemovePrivilegesFromGroupAsync()
Removes privileges from a privilege group.
public async Task RemovePrivilegesFromGroupAsync(RemovePrivilegesFromGroupReq request, CancellationToken cancellationToken = default)
Request Syntax
var request = new RemovePrivilegesFromGroupReq
{
GroupName = "search_group",
Privileges = ["Search"]
};
await client.RemovePrivilegesFromGroupAsync(request);
REQUEST PARAMETERS:
GroupName(string) -The name of the privilege group.
Privileges(IReadOnlyList) - The privileges to remove from the group.
RETURN TYPE:
Task
RETURNS:
This method does not return a value.
EXCEPTIONS:
-
Thrown when the RPC fails or the server returns an error. Inspect the exception message for details.
Example
using Milvus.Client.V2;
using Milvus.Client.V2.Requests.Rbac;
using var client = new MilvusClientV2(new ConnectConfig
{
Uri = "localhost:19530",
Username = "root",
Password = "Milvus"
});
await client.ConnectAsync();
await client.RemovePrivilegesFromGroupAsync(new RemovePrivilegesFromGroupReq
{
GroupName = "search_group",
Privileges = ["Search"]
});