milvus-logo
LFAI
< Docs
  • Node

grantRolePrivilege()

This method grants privileges to a role.

Example

import { MilvusClient } from "@zilliz/milvus2-sdk-node";

new milvusClient(MILVUS_ADDRESS).grantRolePrivilege({
  roleName: "roleName",
  object: "*",
  objectName: "Collection",
  privilegeName: "CreateIndex",
});

Response

Parameters

ParametersDescriptionType
roleNameThe user role nameString
objectType of the operational object to which the specified privilege belongs, such as Collection, Index, Partition, etc. This parameter is case-sensitive.String
objectNameName of the object to which the role is granted the specified prvilege.String
privilegeNameName of the privilege to be granted to the role. This parameter is case-sensitive.String
timeout?This parameter is used to specify the length of time, in milliseconds, that the RPC (Remote Procedure Call) is allowed to run. If no value is provided, the default is undefined.Number
Feedback

Was this page helpful?