原生复制实例创建复制链路
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
实例所在地域 ID。 |
cn-hangzhou |
| DbInstanceId |
string |
是 |
实例 ID。可调用 DescribeDBInstances 获取。 |
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= |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
76364A52-E0AB-5CC8-9818-CF1DC482C092 |
示例
正常返回示例
JSON格式
{
"RequestId": "76364A52-E0AB-5CC8-9818-CF1DC482C092"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidReplicationChannel.Duplicate | Specified replication channel already exists. | 指定的复制链路已存在。 |
| 400 | InvalidReplicationChannelName.Forbid | Specified replication channel name is forbidden (reserved for internal use). | 指定的复制链路仅供内部使用。 |
| 400 | MissingReplicationParam | Missing required parameters for replication operation: MasterHost, MasterPort, MasterUser, MasterPassword. | 缺少必要的复制相关参数 |
| 400 | InvalidMasterPort.Format | Specified MasterPort format is not valid. | 指定的MasterPort参数不合法 |
| 400 | InvalidDBInstanceEngineType.Format | the DB instance engine type does not support this operation. | DB实例引擎类型不支持此操作。 |
| 403 | IncorrectDBInstanceType | Current DB instance type does not support this operation. | 操作失败,该实例状态下不支持此操作。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。