You can call this operation to modify attributes of an ApsaraDB for Redis instance including the name and password.

For more information about how to perform the corresponding operation in the console, see Change the password.


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 parameters

Parameter Type Required Example Description
Action String No ModifyInstanceAttribute

The operation that you want to perform. Set the value to ModifyInstanceAttribute.

InstanceId String Yes r-j6cxxxxxxxxxxxxx

The ID of the instance.

InstanceName String No newinstancename

The new name of the instance. The name must be 2 to 80 characters in length and start with a letter or a Chinese character. The following characters are not supported: @/:=”<>{[]} and spaces.

NewPassword String No uW8+nsrp

The new password of the instance. The password must be 8 to 32 characters in length and can contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! @#$%^&*()_+-=.

RegionId String No cn-hangzhou

The ID of the region where the instance is deployed.

Response parameters

Parameter Type Example Description
RequestId String 8D0C0AFC-E9CD-47A4-8395-5C31BF9B3E76

The ID of the request.


Sample requests
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

HttpCode Error code Error message Description
400 MissingParameter InstanceName/NewPassword at least one is mandatory for this action. The error message returned because the name or new password of the instance is required.
400 InvalidInstanceName.Malformed The Specified parameter "InstanceName" is not valid. The error message returned because the verification of the instance name failed.
400 InvalidPassword.Malformed The Specified parameter "NewPassword" is not valid. The error message returned because the verification of the new password failed.

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