跳到主要内容
版本:v3.0.x

alterRole()

This operation updates the description of an existing role.

JavaScript
await milvusClient.alterRole(data)

Request Syntax​

JavaScript
await milvusClient.alterRole({
roleName: string,
description: string,
timeout?: number
})

PARAMETERS:

  • roleName (string) -

    [REQUIRED]

    The name of the role to alter.

  • description (string) -

    [REQUIRED]

    The new description of the role.

  • timeout (number) -

    The timeout duration in milliseconds for this operation.

RETURNS:

Promise<ResStatus>

EXCEPTIONS:

  • MilvusError

    This exception will be raised when any error occurs during this operation.

Example​

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

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

const resStatus = await milvusClient.alterRole({
roleName: 'my_role',
description: 'Role updated description',
});