All Products
Search
Document Center

OpenSearch:GetCluster

Last Updated:Oct 16, 2024

Queries the details of a cluster.

Operation description

Method

GET

URI

/openapi/ha3/instance/{instanceId}/clusters/{clusterName}

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
searchengine:GetClusterget
  • Instance
    acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}
    none
none

Request syntax

GET /openapi/ha3/instances/{instanceId}/clusters/{clusterName} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

ha-cn-0ju2rq6610a
clusterNamestringNo

The name of the cluster

bj_vpc_domain_2

Sample requests

GET /openapi/ha3/instance/ha_name_example/clusters/my_cluster

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

requestIdstring

The ID of the request.

E7B7D598-B080-5C8E-AA35-D43EC0D5F886
resultobject

The clusters.

namestring

The cluster name.

general
descriptionstring

The description of the cluster.

fzz_test
currentAdvanceConfigVersionstring

The effective advanced configuration version.

test_yyds_data1
latestAdvanceConfigVersionstring

The latest advanced configuration version.

test_yyds_data1
currentOnlineConfigVersionstring

The effective online configuration version.

test_yyds_data1
latestOnlineConfigVersionstring

The latest online configuration version.

test_yyds_data1
configUpdateTimestring

The time when the cluster was updated.

2021-08-09 00:01:02
statusstring

The creation status of the cluster. Valid values: NEW and PUBLISH. NEW indicates that the cluster is being created. PUBLISH indicates that the cluster is created.

NEW
queryNodeobject

The specifications of Query Result Searcher (QRS) workers.

namestring

The name of the QRS worker.

test
numberinteger

The number of nodes.

1
partitioninteger

The number of replicas.

2
dataNodeobject

The specifications of Searcher workers.

namestring

The name of the Searcher worker.

test
numberinteger

The number of replicas.

1
partitioninteger

The number of partitions.

2
createTimestring

The time when the cluster was created.

2024-05-21 16:05:26
configobject

The configuration information.

object

The information about child configuration items.

object

The information about the child configuration item.

namestring

The configuration name.

ha-cn-pl32rf0****_offline_adv_v1
updateTimestring

The time when the configuration was updated.

2024-05-21 16:05:26
descstring

The description of the configuration.

Custom description

Sample responses

{
  "requestId": "e1eef569-1ff7-4bf8-acf7-1cecca9894ce",
  "result": {
    "name": "cluster1",
    "configUpdateTime": "2021-08-09 00:01:02",
    "CurrentAdvanceConfigVersion": "test_yyds_data1",
    "lastestAdvanceConfigVersion": "test_yyds_data1",
    "currentOnlineConfigVersion": "test_yyds_data1",
    "lastestOnlineConfigVersion": "test_yyds_data1",      
    "description": "airecpre",
    "queryNode": {
      "name":"ha-cn-0ju2iimcu07_qrs",
      "number": 1
    },
    "dataNode": {
      "name":"general",
      "number": 2,
      "partition": 1
    }    
  }
}

Examples

Sample success responses

JSONformat

{
  "requestId": "E7B7D598-B080-5C8E-AA35-D43EC0D5F886",
  "result": {
    "name": "general",
    "description": "fzz_test",
    "currentAdvanceConfigVersion": "test_yyds_data1",
    "latestAdvanceConfigVersion": "test_yyds_data1",
    "currentOnlineConfigVersion": "test_yyds_data1",
    "latestOnlineConfigVersion": "test_yyds_data1",
    "configUpdateTime": "2021-08-09 00:01:02",
    "status": "NEW",
    "queryNode": {
      "name": "test",
      "number": 1,
      "partition": 2
    },
    "dataNode": {
      "name": "test",
      "number": 1,
      "partition": 2
    },
    "createTime": "2024-05-21 16:05:26",
    "config": {
      "key": {
        "key": {
          "name": "ha-cn-pl32rf0****_offline_adv_v1\n",
          "updateTime": "2024-05-21 16:05:26",
          "desc": "Custom description\n"
        }
      }
    }
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-05-16The response structure of the API has changedView Change Details
2022-01-12Add OperationView Change Details