Modifies the weights of ApsaraDB RDS for MySQL instances. PolarDB-X distributes read and write requests to ApsaraDB RDS for MySQL instances based on the assigned weights.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyRdsReadWeight |
The operation that you want to perform. Set the value to ModifyRdsReadWeight. |
DbName | String | Yes | test |
The name of the database. |
DrdsInstanceId | String | Yes | drds************ |
The ID of the PolarDB-X 1.0 instance. |
InstanceNames | String | Yes | rm-****************,rm-**************** |
The names of the ApsaraDB RDS for MySQL instances. Separate the names with commas (,). |
Weights | String | Yes | 14,86 |
The weights of the ApsaraDB RDS for MySQL instances. Separate the weights with commas (,). |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | B12FC174-D5CE-4A6E-83C1-0F8F86****** |
Indicates the ID of the request. |
Success | Boolean | true |
Indicates whether the request is successful. |
Examples
Sample requests
http(s)://drds.aliyuncs.com/?Action=ModifyRdsReadWeight
&DbName=test
&DrdsInstanceId=drds************
&InstanceNames=rm-****************,rm-****************
&Weights=14,86
&<Common request parameters>
Sample success responses
XML
format
<RequestId>B12FC174-D5CE-4A6E-83C1-0F8F86******</RequestId>
<Success>true</Success>
JSON
format
{
"RequestId": "B12FC174-D5CE-4A6E-83C1-0F8F86******",
"Success": "true"
}
Error codes
For a list of error codes, visit the API Error Center.