调用ModifyPolarDbReadWeight接口修改PolarDB的读写权重。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| DrdsInstanceId | string | 是 | DRDS 实例 ID。 | drds************ |
| DbName | string | 是 | 数据库名称。 | test |
| DbNodeIds | string | 是 | 目标 PolarDB 集群下对应的节点列表,不同集群的节点间用英文逗号(,)分组,组内节点用英文冒号(:)隔开。 | pi-****************,pi-****************:pi-**************** |
| DbInstanceId | string | 是 | Polar 集群 ID。 | pc-**************** |
| Weights | string | 是 | PolarDB 分组对应的权重,多个权重间用英文逗号(,)隔开。 | 14,86 |
返回参数
示例
正常返回示例
JSON格式
{
"Success": true,
"RequestId": "B12FC174-D5CE-4A6E-83C1-0F8F86******"
}JSON格式
{
"Success": true,
"RequestId": "B12FC174-D5CE-4A6E-83C1-0F8F86******"
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
| 400 | InvalidParameter.InvalidDbName | The dbName does not exist in this drds instance | - |
| 400 | InvalidParameter.ReadWeighAndRdsNotMapping | The parameter read weight and rds instance not mapping | - |
| 400 | InvalidParameter.InvalidReadWeight | The parameter read weight is invalid | - |
| 500 | InternalError | The request processing has failed due to some unknown error. | 请求失败,内部错误 |
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 |
|---|
暂无变更历史
