Modifies the attributes of an ApsaraDB for Redis instance, such as the name, password, and status of release protection.

You can also modify the attributes in the ApsaraDB for Redis console. For more information, 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 Yes ModifyInstanceAttribute

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

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance.

InstanceName String No newinstancename

The new name of the instance. The name must be 2 to 128 characters in length. The name must start with a letter and cannot contain spaces and the following special characters: @ / : = " < > { [ ] }.

NewPassword String No uW8+nsrp

The new password of the instance. The password must be 8 to 32 characters in length. It can contain at least three 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.

InstanceReleaseProtection Boolean No true

The protection status of the instance. Valid values:

  • true: The protection is enabled.
  • false: The protection is disabled.

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 InvalidInstanceName.Malformed The Specified parameter "InstanceName" is not valid. The error message returned because the instance name is invalid.
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.