Changes the password for a database account.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ResetAccountPassword |
The operation that you want to perform. Set the value to ResetAccountPassword. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where your PolarDB-X instance is deployed. |
DBInstanceName | String | Yes | pxc-htri0ori2r4k9p |
The name of the PolarDB-X instance. |
AccountName | String | Yes | account |
The username of the account for which you want to change the password. |
AccountPassword | String | Yes | ***** |
The new password of the account. |
SecurityAccountName | String | No | account_sec |
The username of the data security administrator (DSA) account |
SecurityAccountPassword | String | No | ***** |
The password of the DSA account. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Message | String | success |
The message that is returned. If the request is successful, "success" is returned. If the request fails, an error code is returned. |
RequestId | String | 73559800-3c8c-11ec-bd40-99cfcff3fe1e |
The ID of the request. |
Success | Boolean | true |
Indicates whether the request is successful. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ResetAccountPassword
&RegionId=cn-hangzhou
&DBInstanceName=pxc-htri0ori2r4k9p
&AccountName=account
&AccountPassword=*****
&SecurityAccountName=account_sec
&SecurityAccountPassword=*****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ResetAccountPasswordResponse>
<Message>success</Message>
<RequestId>73559800-3c8c-11ec-bd40-99cfcff3fe1e</RequestId>
<Success>true</Success>
</ResetAccountPasswordResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Message" : "success",
"RequestId" : "73559800-3c8c-11ec-bd40-99cfcff3fe1e",
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.