You can call this operation ModifyPolarDbReadWeight to modify read/write weights of a specified PolarDB cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Required | ModifyPolarDbReadWeight |
The parameter specified by the system. Value: ModifyPolarDbReadWeight. |
DbInstanceId | String | Required | pc-**************** |
Polar cluster ID. |
DbName | String | Required | test |
The name of the database. |
DbNodeIds | String | Required | pi-****************,pi-****************:pi-**************** |
The node list in the destination apsaradb for PolarDB cluster. The nodes in each cluster are separated with commas (,) and colons (:). |
DrdsInstanceId | String | Required | drds************ |
The ID of a DRDS instance. |
Weights | String | Required | 14,86 |
The weight of the PolarDB cluster. Separate multiple weights with commas (,). |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | B12FC174-D5CE-4A6E-83C1-0F8F86****** |
The ID of the request. |
Success | Boolean | true |
Indicates whether the database creation failure records were removed from the PolarDB-X instance. |
Examples
Sample requests
http(s)://drds.aliyuncs.com/? Action=ModifyPolarDbReadWeight
&DbInstanceId=pc-****************
&DbName=db_test
&DbNodeIds=pi-****************,pi-****************:pi-****************
&DrdsInstanceId=drds************
&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.