修改PolarDB的集群地址属性,包括读写模式、新节点是否自动加入本地址、一致性级别、事务拆分、主库是否接受读、连接池等。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
polardb:ModifyDBClusterEndpoint |
update |
*dbcluster
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| DBClusterId |
string |
是 |
集群 ID。 |
pc-************* |
| DBEndpointId |
string |
是 |
集群地址 ID。 |
pe-************** |
| Nodes |
string |
否 |
加入目标地址的读负载节点,多个节点间用英文逗号(,)分隔。 默认为原有节点。 说明
|
pi-**************,pi-************* |
| ReadWriteMode |
string |
否 |
读写模式,取值范围如下:
|
ReadWrite |
| AutoAddNewNodes |
string |
否 |
新节点是否自动加入本地址,取值范围如下:
|
Enable |
| EndpointConfig |
string |
否 |
集群地址的高级配置,格式为 JSON,目前支持设置一致性级别、事务拆分、主库是否接受读和连接池等。
说明
|
{"ConsistLevel":"1","DistributedTransaction":"on","MasterAcceptReads":"off","ConnectionPersist": "on"} |
| DBEndpointDescription |
string |
否 |
地址名称。 |
test |
| SccMode |
string |
否 |
节点是否开启全局一致性(高性能模式)功能。取值范围如下:
|
on |
| PolarSccWaitTimeout |
string |
否 |
全局一致性超时时间 |
100 |
| PolarSccTimeoutAction |
string |
否 |
全局一致性超时策略。取值范围如下:
|
0 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
CD3FA5F3-FAF3-44CA-AFFF-BAF869****** |
示例
正常返回示例
JSON格式
{
"RequestId": "CD3FA5F3-FAF3-44CA-AFFF-BAF869******"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidEndpointConfig.Malformed | The specified parameter EndpointConfig is not valid. | 指定的参数EndpointConfig无效 |
| 400 | InvalidDBEndpointId.Malformed | The specified parameter DBEndpointId is not valid. | 指定的参数DBEndpointId无效 |
| 400 | InvalidNodes.Malformed | The specified parameter Nodes is not valid. | 指定的参数Nodes无效。 |
| 403 | OperationDenied.InstanceType | The operation is not permitted due to instance type. | 由于实例类型的原因,不允许执行该操作 |
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | 当前的记录中不存在提供的DBClusterId。 |
| 404 | EndpointStatus.NotSupport | Current endpoint status does not support this operation. | 当前节点状态不支持此操作 |
| 404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | 指定的参数DBClusterId无效 |
| 404 | InvalidDBClusterId.NotFound | The DBInstanceId provided does not exist in our records. | 当前的记录中不存在提供的DBClusterId。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。