You can call the UpdateAdminPassword to update the password of the elastic account of a specified Elasticsearch instance.

Note If an instance is in the activating, invalid, or inactive state, you cannot call the UpdateAdminPassword operation to update the instance information.


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

PATCH|POST /openapi/instances/{InstanceId}/admin-pwd HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
InstanceId String Path Yes es-cn-nif1q9o8r0008****

The ID of the instance.

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.

Object Body No

The request body.

esAdminPassword String Body No es_password

Specifies the updated password.

  • The name must contain at least three of the following character types: uppercase, lowercase, digits, and special characters.
  • The value must be 8 to 32 bits in length.
  • The special characters are! @#$%^&*()_+-=

Response parameters

Parameter Type Example Description
RequestId String 0FA05123-745C-42FD-A69B-AFF48EF9****

The request ID.

Result Boolean true

Whether the password is updated successfully:

  • true
  • false: The call failed.


Sample requests

PATCH /openapi/instances/es-cn-nif1q9o8r0008****/admin-pwd?clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**** HTTP/1.1

  "esAdminPassword" : "es_password"

Sample success response

JSON format

HTTP/1.1 200 OK

  "Result" : true,
  "RequestId" : "0FA05123-745C-42FD-A69B-AFF48EF9****"

Error codes

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