获取参数模版
更新时间:2026-02-03
获取参数模版
接口描述
获取任务可以修改的参数列表
请求结构
Plain Text
1GET /v{version}/task/parameters?dtsId=dtsxxxxxxxx
2Host: dts.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
|---|---|---|---|---|
| version | String | 是 | URL参数 | API版本号。 |
| dtsId | String | 是 | Query参数 | 根据任务id查询任务的参数模版信息,可以是迁移任务或数据校验任务ID |
| dataType | String | 否 | Query参数 | 可选值schema,base, increment;不传此参数默认返回当前任务所有迁移类型的参数模版 |
响应头域
除公共头域外,无其它特殊头域。
响应参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| success | Boolean | 是否成功。 |
| result | List<Params> | 参数模版结果。 |
Params字段数据结构说明
| 参数名称 | 类型 | 描述 |
|---|---|---|
| name | String | 参数名 |
| defaultValue | String | 最佳值 |
| currentValue | String | 参数当前值 |
| dataType | String | 枚举值:schema,base,increment; |
| needRestart | String | 是否需要重启才能生效,枚举值:"1","0"; "1":需要重启才能生效;"0": 不需要重启就能生效 |
| description | String | 参数描述 |
| warning | String | 注意事项 |
| range | String | 参数范围 |
请求示例
Plain Text
1POST http://dts.baidubce.com/v1/task/parameters?dtsId=dtsmxxxxxx
2Host: dts.baidubce.com
3Content-Type: application/json
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
响应示例
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3Date: Wed, 08 Jul 2015 03:28:11 GMT
4x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
5{
6 "success": true,
7 "result": [
8 {
9 "dtsType": "migration",
10 "dataType": "base",
11 "name": "maxTps",
12 "currentValue": "0",
13 "needRestart": "1",
14 "type": "integer",
15 "range": "0-",
16 "defaultValue": "0",
17 "description": "全量迁移中每秒同步到目标端的行数",
18 "warning": "并发数越大会增加下游实例的负载,请结合目标实例性能合理设置"
19 },
20 {
21 "dtsType": "migration",
22 "dataType": "increment",
23 "name": "maxTps",
24 "currentValue": "100",
25 "needRestart": "1",
26 "type": "integer",
27 "range": "0-",
28 "defaultValue": "0",
29 "description": "增量同步中每秒同步到目标端的行数",
30 "warning": "并发数越大会增加下游实例的负载,请结合目标实例性能合理设置"
31 },
32 {
33 "dtsType": "migration",
34 "dataType": "base",
35 "name": "concurrentWriterNum",
36 "currentValue": "16",
37 "needRestart": "1",
38 "type": "integer",
39 "range": "1-32",
40 "defaultValue": "16",
41 "description": "全量迁移目标端并发写数量",
42 "warning": "并发数越大会增加下游实例的负载,请结合目标实例性能合理设置"
43 },
44 {
45 "dtsType": "migration",
46 "dataType": "increment",
47 "name": "concurrentWriterNum",
48 "currentValue": "17",
49 "needRestart": "1",
50 "type": "integer",
51 "range": "1-32",
52 "defaultValue": "16",
53 "description": "增量同步目标端并发写数量",
54 "warning": "并发数越大会增加下游实例的负载,请结合目标实例性能合理设置"
55 },
56 {
57 "dtsType": "migration",
58 "dataType": "base",
59 "name": "maxThroughput",
60 "currentValue": "0",
61 "needRestart": "1",
62 "type": "integer",
63 "range": "0-",
64 "defaultValue": "0",
65 "description": "全量迁移中每秒迁移到目标端的最大数据量",
66 "warning": "迁移数据量越多,会增加实例的负载,请结实例性能合理设置"
67 },
68 {
69 "dtsType": "migration",
70 "dataType": "increment",
71 "name": "maxThroughput",
72 "currentValue": "10485760",
73 "needRestart": "1",
74 "type": "integer",
75 "range": "0-",
76 "defaultValue": "0",
77 "description": "增量同步中每秒同步到目标端的最大数据量",
78 "warning": "迁移数据量越多,会增加实例的负载,请结实例性能合理设置"
79 }
80 ]
81}
