原生复制实例更新复制通道
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
地域 ID。 |
cn-hangzhou |
| DbInstanceId |
string |
是 |
实例 ID。 |
rm-bp1234567890abcdef |
| ChannelName |
string |
否 |
复制通道名称,用于标识复制通道。 |
replication-channel-001 |
| MasterHost |
string |
否 |
主数据库主机地址,支持 IP 或域名。 |
192.168.1.100 |
| MasterPort |
integer |
否 |
主数据库端口号,通常为 3306(MySQL) |
3306 |
| MasterUser |
string |
否 |
主数据库用户名,用于建立复制连接,仅在需要更新时提供。 |
repl_user |
| MasterPassword |
string |
否 |
主数据库密码,用于验证复制用户,需要提前经过 Base64 编码。 |
U2VjdXJlUGFzczEyMyE= |
| Operation |
string |
是 |
操作类型,指定对复制通道执行的操作。 |
Start |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
17F57FEE-EA4F-4337-8D2E-9C23CAA63D74 |
示例
正常返回示例
JSON格式
{
"RequestId": "17F57FEE-EA4F-4337-8D2E-9C23CAA63D74"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidReplicationChannelName.Forbid | Specified replication channel name is forbidden (reserved for internal use). | 指定的复制链路仅供内部使用。 |
| 400 | InvalidReplicationChannel.Duplicate | Specified replication channel already exists. | 指定的复制链路已存在。 |
| 400 | MissingReplicationParam | Missing required parameters for replication operation: MasterHost, MasterPort, MasterUser, MasterPassword. | 缺少必要的复制相关参数 |
| 400 | MissingOperationParam | Missing required parameter: Operation. | 更新原生复制实例复制链路:缺少Operation参数 |
| 400 | InvalidOperation.NotSupport | Specified operation is not supported. Supported operations: Stop, Start, Restart, Rebuild. | 传入的Operation参数不支持 |
| 400 | InvalidMasterPort.Format | Specified MasterPort format is not valid. | 指定的MasterPort参数不合法 |
| 400 | MissingRebuildParam | Missing required parameters for rebuild operation: MasterHost, MasterPort, MasterUser, MasterPassword. | 重建复制链路操作缺少需要的参数:源端域名、源端端口、源端用户或源端密码 |
| 404 | InvalidReplicationChannel.NotFound | Specified replication channel does not exist. | 指定的复制链路不存在 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。