GrantEntity

Describes one privilege grant: which privilege on which object is granted to which role, and by whom.

export type GrantEntity = {
  role: RoleEntity;
  object: ObjectEntity;
  object_name: string;
  grantor: Grantor;
  db_name: string;
};

FIELDS:

  • role (RoleEntity) -

    The role the privilege is granted to. See RoleEntity.

  • object (ObjectEntity) -

    The protected object type. The following members belong to ObjectEntity.

    • name (RbacObjects) -

      The object type (an RbacObjects value, e.g. Collection, Global, User).

  • object_name (string) -

    The name of the object the privilege applies to.

  • grantor (Grantor) -

    Who granted the privilege. The following members belong to Grantor.

  • db_name (string) -

    The database the object belongs to.

Example

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

const milvusClient = new MilvusClient({
    address: 'localhost:19530',
    token: 'root:Milvus',
});

const res = await milvusClient.listGrants({
    roleName: 'exampleRole',
});

console.log(res.entities); // GrantEntity[]

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?