Serverless获取索引列表

最近更新时间:2025-06-26 01:20:39

我的收藏

1. 接口描述

接口请求域名: es.tencentcloudapi.com 。

Serverless获取索引列表

默认接口请求频率限制:20次/秒。

推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称 必选 类型 描述
Action String 公共参数,本接口取值:DescribeServerlessInstances。
Version String 公共参数,本接口取值:2018-04-16。
Region String 公共参数,详见产品支持的 地域列表,本接口仅支持其中的: ap-beijing, ap-guangzhou, ap-hongkong, ap-nanjing, ap-shanghai, ap-singapore, ap-tokyo, na-ashburn 。
InstanceIds.N Array of String 索引集群ID
示例值:["index-abcdefgh"]
IndexNames.N Array of String 索引名
示例值:["test"]
Offset Integer 分页起始位置
示例值:10
Limit Integer 一页展示数量
示例值:20
OrderBy String 排序字段,支持索引名:IndexName、索引存储量:IndexStorage、索引创建时间:IndexCreateTime
示例值:storage
IndexStatusList.N Array of String 过滤索引状态
示例值:["GREEN"]
Order String 排序顺序,支持asc、desc,默认为desc
示例值:asc
SpaceIds.N Array of String 索引空间ID列表
示例值:[space-12345]
DiSourceTypes.N Array of String 数据链路数据源类型
示例值:["cvm_collector","tke_collector"]
TagList.N Array of TagInfo 标签信息

3. 输出参数

参数名称 类型 描述
IndexMetaFields Array of ServerlessIndexMetaField 索引元数据字段
注意:此字段可能返回 null,表示取不到有效值。
TotalCount Integer 查询总数
注意:此字段可能返回 null,表示取不到有效值。
示例值:10
RequestId String 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。

4. 示例

示例1 Serverless获取索引列表

Serverless获取索引列表

输入示例

POST / HTTP/1.1
Host: es.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeServerlessInstances
<公共请求参数>

{
    "IndexNames": [
        "indexName"
    ],
    "InstanceIds": [
        "index-abcdefgh"
    ],
    "Limit": 0,
    "Offset": 10
}

输出示例

{
    "Response": {
        "IndexMetaFields": [
            {
                "AppId": 1257780094,
                "InstanceId": "index-2v3kt0yr",
                "SpaceId": "space-mdo5a8bf",
                "SpaceName": "tom-test",
                "IndexName": "curl-datalink-mdo5a8bf",
                "IndexMetaJson": "",
                "IndexStorage": 0,
                "IndexCreateTime": "2023-11-23 14:34:55",
                "IndexDocs": 0,
                "Status": 1,
                "IndexSettingsField": {
                    "NumberOfShards": "",
                    "RefreshInterval": "30s"
                },
                "IndexOptionsField": {
                    "ExpireMaxAge": "30d",
                    "TimestampField": "@timestamp"
                },
                "IndexNetworkField": {
                    "Region": "ap-guangzhou",
                    "Zone": "ap-guangzhou-7",
                    "VpcUid": "vpc-444yjczv",
                    "SubnetUid": "subnet-mrezecu2",
                    "Username": "",
                    "Password": ""
                },
                "KibanaUrl": "https://index-2v3kt0yr.kibana.myserverlessindex.com:5601",
                "KibanaPrivateUrl": "",
                "IndexAccessUrl": "index-2v3kt0yr.ap-guangzhou.myserverlessindex.com",
                "StorageType": 0,
                "TagList": []
            },
            {
                "AppId": 1257780094,
                "InstanceId": "index-2s8pkoa7",
                "SpaceId": "space-mdo5a8bf",
                "SpaceName": "tom-test",
                "IndexName": "beats-tke-datalink-mdo5a8bf",
                "IndexMetaJson": "",
                "IndexStorage": 0,
                "IndexCreateTime": "2023-11-23 14:34:20",
                "IndexDocs": 0,
                "Status": 1,
                "IndexSettingsField": {
                    "NumberOfShards": "",
                    "RefreshInterval": "30s"
                },
                "IndexOptionsField": {
                    "ExpireMaxAge": "30d",
                    "TimestampField": "@timestamp"
                },
                "IndexNetworkField": {
                    "Region": "ap-guangzhou",
                    "Zone": "ap-guangzhou-7",
                    "VpcUid": "vpc-444yjczv",
                    "SubnetUid": "subnet-mrezecu2",
                    "Username": "",
                    "Password": ""
                },
                "KibanaUrl": "https://index-2s8pkoa7.kibana.myserverlessindex.com:5601",
                "KibanaPrivateUrl": "",
                "IndexAccessUrl": "index-2s8pkoa7.ap-guangzhou.myserverlessindex.com",
                "StorageType": 0,
                "TagList": []
            },
            {
                "AppId": 1257780094,
                "InstanceId": "index-7th48x7l",
                "SpaceId": "space-mdo5a8bf",
                "SpaceName": "tom-test",
                "IndexName": "beats-cvm-datalink-mdo5a8bf",
                "IndexMetaJson": "",
                "IndexStorage": 0,
                "IndexCreateTime": "2023-11-23 14:33:48",
                "IndexDocs": 0,
                "Status": 1,
                "IndexSettingsField": {
                    "NumberOfShards": "",
                    "RefreshInterval": "30s"
                },
                "IndexOptionsField": {
                    "ExpireMaxAge": "30d",
                    "TimestampField": "@timestamp"
                },
                "IndexNetworkField": {
                    "Region": "ap-guangzhou",
                    "Zone": "ap-guangzhou-7",
                    "VpcUid": "vpc-444yjczv",
                    "SubnetUid": "subnet-mrezecu2",
                    "Username": "",
                    "Password": ""
                },
                "KibanaUrl": "https://index-7th48x7l.kibana.myserverlessindex.com:5601",
                "KibanaPrivateUrl": "",
                "IndexAccessUrl": "index-7th48x7l.ap-guangzhou.myserverlessindex.com",
                "StorageType": 0,
                "TagList": []
            },
            {
                "AppId": 1257780094,
                "InstanceId": "index-brjddwvb",
                "SpaceId": "space-mdo5a8bf",
                "SpaceName": "tom-test",
                "IndexName": "tke-data-link-mdo5a8bf",
                "IndexMetaJson": "",
                "IndexStorage": 0,
                "IndexCreateTime": "2023-11-23 14:30:26",
                "IndexDocs": 0,
                "Status": 1,
                "IndexSettingsField": {
                    "NumberOfShards": "",
                    "RefreshInterval": "30s"
                },
                "IndexOptionsField": {
                    "ExpireMaxAge": "30d",
                    "TimestampField": "@timestamp"
                },
                "IndexNetworkField": {
                    "Region": "ap-guangzhou",
                    "Zone": "ap-guangzhou-7",
                    "VpcUid": "vpc-444yjczv",
                    "SubnetUid": "subnet-mrezecu2",
                    "Username": "",
                    "Password": ""
                },
                "KibanaUrl": "https://index-brjddwvb.kibana.myserverlessindex.com:5601",
                "KibanaPrivateUrl": "",
                "IndexAccessUrl": "index-brjddwvb.ap-guangzhou.myserverlessindex.com",
                "StorageType": 0,
                "TagList": []
            },
            {
                "AppId": 1257780094,
                "InstanceId": "index-k75a66tp",
                "SpaceId": "space-0gyg87rx",
                "SpaceName": "price-test",
                "IndexName": "ychenjiang-test2-0gyg87rx",
                "IndexMetaJson": "",
                "IndexStorage": 0,
                "IndexCreateTime": "2023-11-23 14:29:47",
                "IndexDocs": 0,
                "Status": 1,
                "IndexSettingsField": {
                    "NumberOfShards": "",
                    "RefreshInterval": "30s"
                },
                "IndexOptionsField": {
                    "ExpireMaxAge": "30d",
                    "TimestampField": "@timestamp"
                },
                "IndexNetworkField": {
                    "Region": "ap-guangzhou",
                    "Zone": "ap-guangzhou-7",
                    "VpcUid": "vpc-ld5dkwwx",
                    "SubnetUid": "subnet-267c2gvq",
                    "Username": "",
                    "Password": ""
                },
                "KibanaUrl": "https://index-k75a66tp.kibana.myserverlessindex.com:5601",
                "KibanaPrivateUrl": "",
                "IndexAccessUrl": "index-k75a66tp.ap-guangzhou.myserverlessindex.com",
                "StorageType": 0,
                "TagList": []
            },
            {
                "AppId": 1257780094,
                "InstanceId": "index-o8otig09",
                "SpaceId": "space-mdo5a8bf",
                "SpaceName": "tom-test",
                "IndexName": "cvm-datalink-mdo5a8bf",
                "IndexMetaJson": "",
                "IndexStorage": 0,
                "IndexCreateTime": "2023-11-23 14:23:02",
                "IndexDocs": 0,
                "Status": 1,
                "IndexSettingsField": {
                    "NumberOfShards": "",
                    "RefreshInterval": "30s"
                },
                "IndexOptionsField": {
                    "ExpireMaxAge": "30d",
                    "TimestampField": "@timestamp"
                },
                "IndexNetworkField": {
                    "Region": "ap-guangzhou",
                    "Zone": "ap-guangzhou-7",
                    "VpcUid": "vpc-444yjczv",
                    "SubnetUid": "subnet-mrezecu2",
                    "Username": "",
                    "Password": ""
                },
                "KibanaUrl": "https://index-o8otig09.kibana.myserverlessindex.com:5601",
                "KibanaPrivateUrl": "",
                "IndexAccessUrl": "index-o8otig09.ap-guangzhou.myserverlessindex.com",
                "StorageType": 0,
                "TagList": []
            },
            {
                "AppId": 1257780094,
                "InstanceId": "index-gh5rrdhr",
                "SpaceId": "space-0gyg87rx",
                "SpaceName": "price-test",
                "IndexName": "faegagag-0gyg87rx",
                "IndexMetaJson": "",
                "IndexStorage": 0,
                "IndexCreateTime": "2023-11-23 12:04:48",
                "IndexDocs": 0,
                "Status": 1,
                "IndexSettingsField": {
                    "NumberOfShards": "",
                    "RefreshInterval": "30s"
                },
                "IndexOptionsField": {
                    "ExpireMaxAge": "30d",
                    "TimestampField": "@timestamp"
                },
                "IndexNetworkField": {
                    "Region": "ap-guangzhou",
                    "Zone": "ap-guangzhou-7",
                    "VpcUid": "vpc-444yjczv",
                    "SubnetUid": "subnet-mrezecu2",
                    "Username": "",
                    "Password": ""
                },
                "KibanaUrl": "https://index-gh5rrdhr.kibana.myserverlessindex.com:5601",
                "KibanaPrivateUrl": "",
                "IndexAccessUrl": "index-gh5rrdhr.ap-guangzhou.myserverlessindex.com",
                "StorageType": 0,
                "TagList": []
            },
            {
                "AppId": 1257780094,
                "InstanceId": "index-65q7dsff",
                "SpaceId": "space-0gyg87rx",
                "SpaceName": "price-test",
                "IndexName": "haoa-test3334-0gyg87rx",
                "IndexMetaJson": "",
                "IndexStorage": 6422689,
                "IndexCreateTime": "2023-11-23 11:53:04",
                "IndexDocs": 0,
                "Status": 1,
                "IndexSettingsField": {
                    "NumberOfShards": "",
                    "RefreshInterval": "30s"
                },
                "IndexOptionsField": {
                    "ExpireMaxAge": "30d",
                    "TimestampField": "@timestamp"
                },
                "IndexNetworkField": {
                    "Region": "ap-guangzhou",
                    "Zone": "ap-guangzhou-7",
                    "VpcUid": "vpc-ld5dkwwx",
                    "SubnetUid": "subnet-267c2gvq",
                    "Username": "",
                    "Password": ""
                },
                "KibanaUrl": "https://index-65q7dsff.kibana.myserverlessindex.com:5601",
                "KibanaPrivateUrl": "",
                "IndexAccessUrl": "index-65q7dsff.ap-guangzhou.myserverlessindex.com",
                "StorageType": 0,
                "TagList": []
            },
            {
                "AppId": 1257780094,
                "InstanceId": "index-irah4s23",
                "SpaceId": "space-mdo5a8bf",
                "SpaceName": "tom-test",
                "IndexName": "cvm-source-mdo5a8bf",
                "IndexMetaJson": "",
                "IndexStorage": 204964,
                "IndexCreateTime": "2023-11-23 11:39:28",
                "IndexDocs": 0,
                "Status": 1,
                "IndexSettingsField": {
                    "NumberOfShards": "",
                    "RefreshInterval": "30s"
                },
                "IndexOptionsField": {
                    "ExpireMaxAge": "30d",
                    "TimestampField": "@timestamp"
                },
                "IndexNetworkField": {
                    "Region": "ap-guangzhou",
                    "Zone": "ap-guangzhou-7",
                    "VpcUid": "vpc-444yjczv",
                    "SubnetUid": "subnet-mrezecu2",
                    "Username": "",
                    "Password": ""
                },
                "KibanaUrl": "https://index-irah4s23.kibana.myserverlessindex.com:5601",
                "KibanaPrivateUrl": "",
                "IndexAccessUrl": "index-irah4s23.ap-guangzhou.myserverlessindex.com",
                "StorageType": 0,
                "TagList": []
            },
            {
                "AppId": 1257780094,
                "InstanceId": "index-8s7iinrd",
                "SpaceId": "space-0gyg87rx",
                "SpaceName": "price-test",
                "IndexName": "haoa-test44-0gyg87rx",
                "IndexMetaJson": "",
                "IndexStorage": 6072662,
                "IndexCreateTime": "2023-11-23 11:15:47",
                "IndexDocs": 0,
                "Status": 1,
                "IndexSettingsField": {
                    "NumberOfShards": "",
                    "RefreshInterval": "30s"
                },
                "IndexOptionsField": {
                    "ExpireMaxAge": "30d",
                    "TimestampField": "@timestamp"
                },
                "IndexNetworkField": {
                    "Region": "ap-guangzhou",
                    "Zone": "ap-guangzhou-7",
                    "VpcUid": "vpc-ld5dkwwx",
                    "SubnetUid": "subnet-267c2gvq",
                    "Username": "",
                    "Password": ""
                },
                "KibanaUrl": "https://index-8s7iinrd.kibana.myserverlessindex.com:5601",
                "KibanaPrivateUrl": "",
                "IndexAccessUrl": "index-8s7iinrd.ap-guangzhou.myserverlessindex.com",
                "StorageType": 0,
                "TagList": []
            }
        ],
        "TotalCount": 20,
        "RequestId": "a75f987c-5f03-4fec-bbb8-be132b57666b"
    }
}

5. 开发者资源

腾讯云 API 平台

腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。

API Inspector

用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。

SDK

云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。

命令行工具

6. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码

错误码 描述
AuthFailure CAM签名/鉴权错误。
AuthFailure.UnAuthorizedOperation 操作未授权。
FailedOperation 操作失败。
FailedOperation.ErrorClusterState 集群状态错误。
FailedOperation.ErrorClusterStateUnhealth 集群状态不健康。
InternalError 内部错误。
InvalidParameter 参数错误。
InvalidParameter.InvalidAppId AppId的取值和预期不符。
InvalidParameter.InvalidServerlessId ES serverless的serverlessId未找到
InvalidParameter.InvalidSpaceId ES Serverless的spaceId未找到
InvalidParameter.InvalidTagInfo 节点标签信息TagInfo的取值和预期不符。
InvalidParameter.InvalidTagList 节点标签信息列表TagList的取值和预期不符。
InvalidParameterValue 参数取值错误。
MissingParameter 缺少参数错误。
RequestLimitExceeded 请求的次数超过了频率限制。
ResourceInUse 资源被占用。
ResourceNotFound 资源不存在。
ResourceNotFound.CAMInfoNotFound CAM资源未找到。
UnauthorizedOperation 未授权操作。
UnknownParameter 未知参数错误。
UnsupportedOperation 操作不支持。