创建任务
更新时间:2022-05-10
接口说明
创建数据传输任务
请求URI
POST /v{version}/task
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 | 参数位置 |
---|---|---|---|---|---|
version | String | 是 | API版本号 | "1" | Path |
请求体参数
请求体字段数据结构说明
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
type | String | 是 | 任务类型(数据传输任务:migration;),目前仅支持数据传输任务 | migration |
productType | String | 是 | 付费类型(后付费:postpay;),目前仅支持后付费 | postpay |
standard | String | 是 | 实例规格(大规格:Large;),目前仅支持大规格 | Large |
sourceInstanceType | String | 是 | 源端类型(云平台数据库:bcerds;自建数据存储:public;) | bcerds |
targetInstanceType | String | 是 | 目标端类型(云平台数据库:bcerds;自建数据存储:public;) | bcerds |
crossRegionTag | Integer | 是 | 跨地域标识(当源端、目标端类型均为云平台数据库且跨地域时:1;其他情况:0) | 0 |
directionType | String | 是 | 同步方向(单向同步:single;双向同步:bidirect),目前仅支持单向同步 | single |
响应头参数
除公共头域,无其它特殊头域。
响应体参数
响应体字段数据结构说明
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
dtsTasks | List<DtsTask> | 是 | 任务ID列表 |
DtsTask字段数据结构说明
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
dtsId | String | 是 | 任务ID | dtsmxxyy1234 |
请求示例
POST /v1/task
<公共请求头>
{
"standard" : "Large",
"sourceInstanceType" : "bcerds",
"directionType" : "single",
"targetInstanceType" : "bcerds",
"crossRegionTag" : 0,
"type" : "migration",
"productType" : "postpay"
}
响应示例
HTTP/1.1 200 OK
<公共响应头>
{
"dtsTasks": [
{
"dtsId": "dtsmxxyy1234"
}
]
}
错误码
请参考通用错误码