Call UpdateAdminPassword to update the password of elastic account of the specified elasticsearch instance.

When you call this operation, take note of the following items:

When an instance is in the activating, invalid, or inactive state, its information cannot be updated.

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 header

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

Request syntax

PATCH|POST /openapi/instances/[InstanceId]/admin-pwd HTTPS|HTTP

Request parameters

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

The ID of the instance.

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

A unique token generated by the client to guarantee the idempotency of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length.

RequestBody

The esAdminPassword parameter needs to be filled in the RequestBody to specify the updated password. Example:


{
  "esAdminPassword": "es_password*"
}
            
Note The password must be 8 to 30 characters in length. It must contain uppercase letters, lowercase letters, and special characters. Special characters include:! @ #$%^& * (%) _+-=.

Response parameters

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

The ID of the request.

The returned data also contains the Result parameter, which is the Result returned by the request. If the value is true, the password of the elastic account is successfully updated. If the value is false, the password of the elastic account fails to be updated.

Examples

Sample requests

PATCH /openapi/instances/es-cn-nif1q9o8r0008****/admin-pwd HTTP/1.1
Common request parameters
{
  "esAdminPassword": "es_password*"
}

Sample success responses

XML format

<Result>true</Result>
<RequestId>0FA05123-745C-42FD-A69B-AFF48EF9****</RequestId>

JSON format

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

Error codes

HttpCode Error code Error message Description
400 InstanceNotFound The instanceId provided does not exist. The error message returned because the specified instance cannot be found. Check the instance status.

For a list of error codes, visit the API Error Center.