All Products
Search
Document Center

Elasticsearch:GetSuggestShrinkableNodes

最終更新日:Sep 21, 2023

Queries the nodes that can be removed from an Elasticsearch cluster based on the specified node type and number of nodes.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see Common request headers.

Request syntax

GET /openapi/instances/{InstanceId}/suggest-shrinkable-nodes HTTP/1.1

Request parameters

Element

Type

Position

Required

Example

Description

InstanceId String Path Yes es-cn-nif1q9o8r0008****

The instance ID.

nodeType String Query Yes WORKER

The type of nodes. Valid values:

WORKER: hot node

WORKER_WARM: warm node

count Integer Query Yes 1

The number of nodes that you want to remove.

ignoreStatus Boolean Query No false

Specifies whether to ignore the instance status. Default value: false.

Response parameters

Element

Type

Example

Description

RequestId String F99407AB-2FA9-489E-A259-40CF6DCC****

The request ID.

Result Array of Result

The response parameters.

port Integer 9200

The port number used to access the node.

host String 192.168.**.**

The IP address of the node.

The returned result also contains the following parameters.

Parameter

Type

Example

Description

nodeType

String

WORKER

The type of the node. Valid values: MASTER (dedicated master node), WORKER (hot node), WORKER_WARM (cold node), COORDINATING (coordinator node), and KIBANA(Kibana node).

zoneId

String

cn-hangzhou-b

The zone ID of the node.

Examples

Sample requests

GET /openapi/instances/es-cn-n6w1o1x0w001c****/suggest-shrinkable-nodes?nodeType=WORKER&count=1 HTTP/1.1
Common request parameters

Sample success responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Result" : [ {
    "nodeType" : "WORKER",
    "host" : "172.16.**.**",
    "port" : 9200,
    "zoneId" : "cn-hangzhou-i"
  } ],
  "RequestId" : "042E33B2-6FB3-474D-BD44-DBE706A4****"
}

Error code

For a list of error codes, see Service error codes.