调用 ModifyTransmissionTask 接口修改传输任务。
请求类型
同步请求。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|
TaskId | String | 是 | 4ddec6d036384248a25862fb******** | 任务 ID。 |
TaskName | String | 否 | TaskName | 任务名称。命名规则: 以字母开头且不能为空。 长度需在 64 个字符内。 只能包含字母、数字、下划线(_)和中划线(-)。
|
SrcConfig | DataSource | 否 | {
"EndpointType":"Public_MySQL",
"PublicMySQLSettings":{
"Host":"192.168.***.***",
"Port":4,
"Username":"test****",
"Password":"Admin@****",
"SSLSettings":{
"EnableSSL":true,
"Cert":"-----BEGIN CERTIFICATE----- ...... -----END CERTIFICATE-----"
},
"RegionSettings":{
"Region":"cn-shanghai"
}
}
}
| 源库信息。详细信息,请参见 DataSource。 |
DestConfig | DataSource | 否 | {
"EndpointType":"Volc_MySQL",
"VolcMySQLSettings":{
"DBInstanceId":"mysql-7cd1dc4ab511",
"DBInstanceName":"",
"Password":"Admin@****",
"RegionSettings":{
"Region":"cn-guangzhou"
},
"Username":"test****"
}
}
| 目标库信息。详细信息,请参见 DataSource。 |
SolutionSettings | SolutionSetting | 否 | {
"MySQL2MySQLSettings":{
"AccountTransmissionSettings":{
"EnableAccount":true
},
"ETLSettings":{
"Script":""
},
"ErrorBehaviorSettings":{
"MaxRetrySeconds":7200
},
"FullTransmissionSettings":{
"EnableFull":true,
"Snapshot":false
},
"IncrTransmissionSettings":{
"EnableIncr":true,
"Statements":[
"StmtDDLAll",
"StmtDMLDelete",
"StmtDMLUpdate",
"StmtDMLInsert"
]
},
"MetaTransmissionSettings":{
"EnableMeta":true
},
"ObjectMappings":[
{
"DestObjName":"huahua",
"MappingList":[
{
"DestObjName":"*",
"ObjectType":"Table",
"SrcObjName":"*"
}
],
"ObjectType":"Database",
"SrcObjName":"huahua"
}
],
"PolicyForPrimaryKeyConflict":"Override"
},
"SolutionType":"MySQL2MySQL"
}
| 迁移、订阅或同步任务对象的配置信息。详细信息,请参见 SolutionSetting。 |
TrafficSpec | String | 否 | Compact | 任务链路规格。支持 Compact 和 Standard 取值。默认值为 Compact 。关于链路规格的详细信息,请参见产品规格。 |
返回参数
空。
请求示例
POST /?Action=ModifyTransmissionTask&Version=2022-10-01 HTTP/1.1
Content-Type: application/json
Host:dts.volcengineapi.com
X-Date: 20221001T101010Z
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20221001/cn-beijing/dts/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c645****
{
"TaskId": "b142ee4fe40743afa821c9e13c*****",
"TaskName": "jytest****"
}
返回示例
{
"ResponseMetadata": {
"RequestId": "202303201033162E6DACA40CB2820CF67A",
"Action": "ModifyTransmissionTask",
"Version": "2022-10-01",
"Service": "dts",
"Region": "cn-beijing"
},
"Result": {}
}
错误码
更多详情,请参见错误码。