跳到主要内容

describeSnapshot()

此操作用于检索特定快照的详细信息。

typescript
await milvusClient.describeSnapshot(data: DescribeSnapshotReq)

请求语法

typescript
await milvusClient.describeSnapshot({
collection_name: string,
snapshot_name: string,
db_name?: string,
timeout?: number,
client_request_id?: string,
})

参数:

  • collection_name (string) -
    [REQUIRED]
    快照所属 Collection 的名称。

  • snapshot_name (string) -
    [REQUIRED]
    要描述的快照名称。

  • db_name (string) -
    Database 名称。可选。

  • timeout (number) -
    允许 RPC 运行的可选时长,单位为毫秒。如果将其设置为 undefined,客户端会持续等待,直到服务器响应或发生错误。默认为 undefined。

  • client_request_id (string) -
    用于请求跟踪的追踪 ID。可选。

返回 Promise<DescribeSnapshotResponse>

此方法返回一个 promise,该 promise 会解析为 DescribeSnapshotResponse 对象。

typescript
{
name: string,
description: string,
collection_name: string,
partition_names: string[],
create_ts: string,
s3_location: string,
status: ResStatus
}

参数:

  • name (string) -
    快照名称。

  • description (string) -
    创建快照时提供的描述;如果未提供,则为空字符串。

  • collection_name (string) -
    拥有该快照的 Collection。

  • partition_names (string[]) -
    该快照捕获的 Partition 名称。

  • create_ts (string) -
    创建快照时的混合时间戳。

  • s3_location (string) -
    持久化存储快照数据的对象存储 URI。

  • ResStatus
    一个 ResStatus 对象。

    • code (number) -

      表示操作结果的代码。如果此操作成功,则其值保持为 0

    • error_code (string | number) -

      表示已发生错误的错误代码。如果此操作成功,则其值保持为 Success

    • reason (string) -

      表示所报告错误原因的原因说明。如果此操作成功,则其值保持为空字符串。

示例

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

const client = new MilvusClient({
address: 'YOUR_CLUSTER_ENDPOINT',
token: 'YOUR_CLUSTER_TOKEN',
});

const res = await client.describeSnapshot({
collection_name: 'my_collection',
snapshot_name: 'snapshot_2024_01',
});
最低 SDK 版本v3.0.x
Ctrl I