Interface description

Changes RAM user password.

Request parameters

Action
  • Type: String
  • Required: Yes
  • Description: Operation interface. System required parameter. Value: ChangePassword.
OldPassword
  • Type: String
  • Required: Yes
  • Description: Old password
NewPassword
  • Type: String
  • Required: Yes
  • Description: Specify the password, which must meet the complexity requirements. For details about the interface for setting password complexity, see SetPasswordPolicy.

Return parameters

Only public parameters are returned. For details, see Public parameters

Required permissions

Action
ram:ChangePassword
Resource
acs:ram:*:${AccountId}:user/${UserName}

Error messages

NotSupport.Account
  • HTTP Status: 400
  • Error Message: This method can be only invoked by sub user.
InvalidParameter.OldPassword.Incorrect
  • HTTP Status: 400
  • Error Message: The parameter - "OldPassword" is incorrect.
InvalidParameter.NewPassword.TooWeak
  • HTTP Status: 400
  • Error Message: The parameter - "NewPassword" is not compliant with the password policy.
InvalidParameter.NewPassword.ReusePrevention
  • HTTP Status: 400
  • Error Message: The parameter - "NewPassword" is not compliant with the reuse prevention password policy.

Operation examples

Request example
https://ram.aliyuncs.com/?Action=ChangePassword
&OldPassword=123456
&NewPassword=aw$2ad)d
&<Public request parameters>
Return example
  • XML format
    <ChangePassword>
        <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
    </ChangePassword>
  • JSON format
    
        "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"