All Products
Search
Document Center

Elasticsearch:ActivateZones

Last Updated:Feb 10, 2025

Restores nodes in disabled zones. This API operation is available only for multi-zone Elasticsearch clusters.

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 does not have operation-specific request headers and uses only common request headers. For more information, see the "Common request headers" section of the "Common parameters" topic.

Request syntax

POST /openapi/instances/[InstanceId]/actions/recover-zones HTTP/1.1

Request parameters

Parameter Type Location Required Example Description
InstanceId String Path Yes es-cn-n6w1o1x0w001c****

The ID of the cluster.

clientToken String Query No 5A2CFF0E-5718-45B5-9D4D-70B3FF****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

RequestBody

You must specify the IDs of the disabled zones in the request body. The following code provides an example:

["cn-hangzhou-i","cn-hangzhou-h"]

Response parameters

Parameter Type Example Description
RequestId String 5A5D8E74-565C-43DC-B031-29289FA****

The request ID.

Result Boolean true

Indicates whether the nodes in disabled zones are restored. Valid values:

  • true
  • false

Examples

Sample requests

POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/recover-zones HTTP/1.1
Common request headers
["cn-hangzhou-i","cn-hangzhou-h"]

Sample success responses

JSON format

{
    "Result": true,
    "RequestId": "5A5D8E74-565C-43DC-B031-29289FA****"
}

Error codes

HTTP status code Error code Error message Description
400 InstanceNotFound The instanceId provided does not exist. The cluster does not exist. Check the cluster status.

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