All Products
Search
Document Center

OpenSearch:CreateCluster

Last Updated:Jul 23, 2024

Creates a cluster.

Operation description

Method

POST

URI

/openapi/ha3/instances/{instanceId}/clusters

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /openapi/ha3/instances/{instanceId}/clusters

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

ha-cn-0ju2k3qer02
bodyobjectNo

The request body.

namestringNo

The cluster name.

ha-cn-zvp2qr1sk01_qrs
descriptionstringNo

The description of the cluster.

"ha-tets"
queryNodeobjectNo

The details of the Query Result Searcher (QRS) workers.

numberintegerNo

The number of QRS workers.

2
dataNodeobjectNo

The details of the Searcher workers.

numberintegerNo

The number of Searcher workers.

2
partitionstringNo

The number of shards.

2
autoLoadbooleanNo

Specifies whether to enable automatic connection.

true

Sample requests

POST/openapi/ha3/instances/ha3_instance_id/clusters

{
  "name":"cluster1",
  "queryNode": {
    "number": 1
  },
  "dataNode": {
    "number": 2
  },
  "description":"The description of the cluster",
  "autoLoad":true
}

Response parameters

ParameterTypeDescriptionExample
object

The results returned.

requestIdstring

The request ID.

10D5E615-69F7-5F49-B850-00169ADE513C
resultobject

The result.

{}

Sample responses

{
  "requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",
  "result": []
}

Examples

Sample success responses

JSONformat

{
  "requestId": "10D5E615-69F7-5F49-B850-00169ADE513C",
  "result": {}
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-05-16The internal configuration of the API is changed, but the call is not affectedView Change Details
2022-01-12Add OperationView Change Details