GetClusterDataInformation

Updated at:

Retrieves the index migration data information.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

elasticsearch:GetClusterDataInformation

get

*All Resource

*

None None

Request syntax

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

Request parameters

Parameter

Type

Required

Description

Example

body

string

No

The cluster type, access address, and index information to be queried.

{"dataSourceType":"elasticsearch","endpoint":"http://es-cn-npk1shyiq000d****.public.elasticsearch.aliyuncs.com:9200","username":"elastic","password":"xxxxxx","index":"default","type":"default"}

The request parameters are empty, but the RequestBody must be specified. The following parameters must be included in the RequestBody to specify the cluster information.

NameTypeRequiredExampleDescription
dataSourceTypeStringYeselasticsearchThe cluster type. Default value: elasticsearch.
endpointStringNohttp://10.01.xx.xxThe public endpoint of the cluster. This parameter is required when the source cluster is accessed over the public network.
instanceIdStringNoes-cn-09k1rnu3g0002****The ID of the Elasticsearch instance. This parameter is required when the source cluster is an Alibaba Cloud Elasticsearch cluster.
vpcInstancePortIntegerNo9200The access port number of the cluster. This parameter is required when the source cluster is an Alibaba Cloud Elasticsearch cluster or a self-managed cluster on an Alibaba Cloud ECS instance.
vpcIdStringNovpc-2ze59tt67m3nzkko9****The ID of the VPC where the cluster is deployed. This parameter is required when the source cluster is an Alibaba Cloud Elasticsearch cluster or a self-managed cluster on an Alibaba Cloud ECS instance.
vpcInstanceIdStringNoes-09k1rnu3g0002****-workerThe instance ID of the current cluster or the ID of the Server Load Balancer (SLB) instance. This parameter is required when the source cluster is an Alibaba Cloud Elasticsearch cluster.
usernameStringNoelasticThe username used to access the cluster.
passwordStringNoxxxxxxThe password used to access the cluster.
indexStringNoproductThe name of the index.
typeStringNodefaultThe type of the index.
Note
  • If index is empty, you can verify whether the Elasticsearch cluster is connectable. If the cluster is connectable, the indices field in the returned result is not empty.

  • If index is not empty, you can obtain the settings and mapping information of the current index.

  • If type is not empty, you can obtain the routing field information corresponding to the current type.

The parameters that you must specify vary based on the network environment of the source cluster:

  • Public network cluster: You must specify the endpoint parameter. Example:

      {
       "dataSourceType": "elasticsearch",
       "endpoint": "http://es-cn-npk1shyiq000d****.public.elasticsearch.aliyuncs.com:9200",
       "username": "elastic",
       "password": "xxxxxx",
       "index": "default",
       "type": "default"
       }
    
  • Self-managed cluster on an Alibaba Cloud ECS instance: You must specify the vpcInstancePort, vpcId, and vpcIp parameters. Example:

     {
          "dataSourceType": "elasticsearch",
          "vpcId":"vpc-2ze55voww95g82gak****",
          "vpcInstancePort": "9200",
          "vpcIp": "10.12.xx.xx",
          "username" : "elastic",
          "password" : "xxxxxx",
          "index":  "product",
          "type" : "default"
     }
    
    
  • Alibaba Cloud Elasticsearch cluster: You must specify the vpcInstancePort, vpcId, vpcInstanceId, and instanceId parameters. Example:

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

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****

Result

object

The returned result.

connectable

boolean

Indicates whether the cluster is connectable.

true

metaInfo

object

The metadata information of the cluster.

mapping

string

The mapping configuration of the cluster.

{\"_doc\":{\"properties\":{\"user\":{\"properties\":{\"last\":{\"type\":\"text\",...}}}}}}

settings

string

The settings configuration of the cluster.

{\n \"index\": {\n \"replication\": {\n}.....}}

typeName

array

The type of the specified index.

string

The type of the specified index.

["index1-type"]

fields

array

The fields corresponding to the index mapping.

string

The fields corresponding to the index mapping.

["id","name"]

indices

array

The list of indexes in the cluster.

string

The list of indexes in the cluster.

["index1","index2","index3"]

Examples

Success response

JSON format

{
  "RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****",
  "Result": {
    "connectable": true,
    "metaInfo": {
      "mapping": "{\\\"_doc\\\":{\\\"properties\\\":{\\\"user\\\":{\\\"properties\\\":{\\\"last\\\":{\\\"type\\\":\\\"text\\\",...}}}}}}",
      "settings": "{\\n  \\\"index\\\": {\\n    \\\"replication\\\": {\\n}.....}}",
      "typeName": [
        "[\"index1-type\"]"
      ],
      "fields": [
        "[\"id\",\"name\"]"
      ],
      "indices": [
        "[\"index1\",\"index2\",\"index3\"]"
      ]
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.