Changes the password of a specified account for an ApsaraDB for Redis instance.

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 parameters

Parameter Type Required Example Description
Action String Yes ModifyAccountPassword

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

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance.

AccountName String Yes testaccount

The name of the account for which you want to change the password. You can call the DescribeAccounts operation to obtain the name of the account.

OldAccountPassword String Yes oldPassWd999****

The current password of the account.

Note If you forget your password, you can call the ResetAccountPassword operation to reset your password.
NewAccountPassword String Yes newPassWd888****

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

RegionId String No cn-hangzhou

The region ID of the instance.

Response parameters

Parameter Type Example Description
RequestId String 5D622714-AEDD-4609-9167-F5DDD3D1****

The ID of the request.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/?Action=ModifyAccountPassword
&AccountName=testaccount
&InstanceId=r-bp1zxszhcgatnx****
&OldAccountPassword=oldPassWd999****
&NewAccountPassword=newPassWd888****
&<Common request parameters>

Sample success responses

XML format

<ModifyAccountPasswordResponse>
      <RequestId>5D622714-AEDD-4609-9167-F5DDD3D1****</RequestId>
</ModifyAccountPasswordResponse>

JSON format

{
    "RequestId": "5D622714-AEDD-4609-9167-F5DDD3D1****"
}

Error codes

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