GetClusterDataInformation_Elasticsearch_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

流控信息

当前云产品API请求速率暂未透出。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
elasticsearch:GetClusterDataInformation
Get
全部资源
*

请求语法

POST /openapi/cluster/data-information HTTP/1.1

请求参数

字段名称字段详情
bodystring

请求说明

请求参数为空,但需填写 RequestBody。 RequestBody 中需要填入以下参数,用来指定集群信息。

| 名称 | 类型 | 是否必选 | 示例值 | 描述 | | ---- | ---- | ---- | ---- | | dataSourceType| String | 是 | elasticsearch |集群类型,默认为 elasticsearch。| | endpoint| String | 否 | http://10.01.xx.xx |集群公网域名。源集群的网络环境为公网时必填。| | instanceId| String | 否 | es-cn-09k1rnu3g0002**** |Elasticsearch 实例 ID。源集群的网络环境为阿里云 Elasticsearch 集群时必填。| | vpcInstancePort| Integer | 否 | 9200 |集群的访问端口号。源集群的网络环境为阿里云 Elasticsearch 集群、阿里云 ECS 服务自建集群时必填。| | vpcId| String | 否 | vpc-2ze59tt67m3nzkko9**** |集群所在的专有网络 ID。源集群的网络环境为阿里云 Elasticsearch 集群、阿里云 ECS 服务自建集群时必填。| | vpcInstanceId| String | 否 | es-09k1rnu3g0002****-worker |当前集群的实例 ID 或负载均衡 SLB(Server Load Balancer)实例 ID。源集群的网络环境为阿里云 Elasticsearch 集群时必填。| | username| String | 否 | elastic |集群的访问用户名。| | password| String | 否 | xxxxxx |集群的访问密码。| | index| String | 否 | product |索引名称。| | type| String | 否 | default |索引类型。|

说明
  • index 为空,可校验 Elasticsearch 集群是否可连通。如果可连通,返回结果中 indices 不为空。
    • index 不为空,可获取当前 index 下,settings 和 mapping 的信息。
    • type 不为空,可获取当前 type 对应的 routing 字段信息。

    源集群的网络环境不同,需要填写的参数不同:

    • 公网集群:需要填写的参数包括 endpoint,示例如下。

       ```
        {
         "dataSourceType": "elasticsearch",
         "endpoint": "http://es-cn-npk1shyiq000d****.public.elasticsearch.aliyuncs.com:9200",
         "username": "elastic",
         "password": "xxxxxx",
         "index": "default",
         "type": "default"
         }
      ```
      
    • 阿里云 ECS 服务自建集群:需要填写的参数包括 vpcInstancePort、vpcId 和 vpcIp,示例如下。

      ```
       {
            "dataSourceType": "elasticsearch",
            "vpcId":"vpc-2ze55voww95g82gak****",
            "vpcInstancePort": "9200",
            "vpcIp": "10.12.xx.xx",
            "username" : "elastic",
            "password" : "xxxxxx",
            "index":  "product",
            "type" : "default"
       }
      ```
      
    • 阿里云 Elasticsearch 集群:需要填写的参数包括 vpcInstancePort、vpcId、vpcInstanceId 和 instanceId,示例如下。

      {
          "dataSourceType" : "elasticsearch",
          "vpcId":"vpc-2ze55voww95g82gak****",
          "vpcInstancePort" : "9200",
          "vpcInstanceId" : "es-cn-09k1rnu3g0002****-worker",
          "instanceId" : "es-cn-oew1oxiro000f****",
          "username" : "elastic",
          "password" : "xxxxxx",
          "index":  "product",
          "type" : "default"
       }
      
      

    返回参数

    字段名称字段详情
    RequestIdstring

    请求 ID。

    示例值:5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****
    Resultobject

    返回结果。

    返回示例

    变更历史

    变更时间变更内容概要操作
    2022-08-30
    删除错误码400
    删除错误码401

    相关示例