Skip to Content
数据传输服务 UDTS创建UDTS任务 - CreateUDTSTask

创建UDTS任务 - CreateUDTSTask

简介

创建UDTS任务

定义

公共参数

参数名类型描述信息必填
Actionstring对应的 API 指令名称,当前 API 为 CreateUDTSTaskYes
PublicKeystring用户公钥,可从 控制台 获取Yes
Signaturestring根据公钥及 API 指令生成的用户签名,参见 签名算法Yes

请求参数

参数名类型描述信息必填
ProjectIdstring项目ID。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口No
Namestring任务名称,长度不能超过 128Yes
Typestring任务类型,唯一值:transfer(数据传输)Yes
Source.N.Modestring任务模式,值可以是 full, incremental, full+incremental, bidirectionalYes
Source.N.DataTypestring数据库类型,比如 mysql/mongo/redisYes
Source.N.NWTypestring源网络类型,可以是 public,user,dedicated_lineYes
Source.N.ServiceTypestring服务类型,值可以是small/medium/large/2xlarge/4xlargeYes
Source.N.BandwidthLimitint源端限速值,单位为 MB/sNo
Source.N.MySQLNode.HoststringMySQL 源数据库地址No
Source.N.MySQLNode.PortintMySQL 源数据库端口No
Source.N.MySQLNode.UserstringMySQL 源数据库用户名No
Source.N.MySQLNode.PasswordstringMySQL 源数据库密码No
Source.N.MySQLNode.VPCIdstringMySQL 源数据库 VPC ID,当网络类型为 user 时需要填写,可以从 https://console.tnqacloud.com/vpc/vpc 获取,比如 uvnet-u0ecaceNo
Source.N.MySQLNode.SubnetIdstringMySQL 源数据库子网 ID,当网络类型为 user 时需要填写,可以从 https://console.tnqacloud.com/vpc/subnet,比如 subnet-2sloxsNo
Source.N.MySQLNode.DataRegionstringMySQL 数据库地域,比如 cn-bj2No
Source.N.MySQLNode.DatabasestringMySQL 需要迁移的 DB 名称No
Source.N.MySQLNode.TablestringMySQL 需要迁移的 table 名No
Source.N.MySQLNode.SyncData.BinlogNamestringMySQL 增量时需要指定的 binlog name,可以通过 show master status 获取,或者全量+增量任务会自动设置No
Source.N.MySQLNode.SyncData.BinlogPosintMySQL 增量时需要指定的 binlog pos,可以通过 show master status 获取,或者全量+增量任务会自动设置No
Source.N.MySQLNode.SyncData.BinlogGTIDstringMySQL 增量时需要指定的 binlog gtid,可以通过 show master status 获取,或者全量+增量任务会自动设置No
Source.N.MySQLNode.SSLSecurity.SSLCAstringMySQL ca 证书,目前仅支持 pem 格式; 需要将文件内容 base64No
Source.N.MySQLNode.SSLSecurity.SSLCertstringMySQL 客户端证书; 需要将文件内容 base64No
Source.N.MySQLNode.SSLSecurity.SSLKeystringMySQL 客户端私钥, 需要将文件内容 base64No
Source.N.MongoNode.HoststringMongo源数据库地址,目前仅支持单点/副本集,示例:192.168.1.100:27017,192.168.1.120:27017,192.168.1.130:27017No
Source.N.MongoNode.UserstringMongo 源数据库用户名No
Source.N.MongoNode.PasswordstringMongo 源数据库密码No
Source.N.MongoNode.DatabasestringMongo 需要迁移的 DB 名称No
Source.N.MongoNode.CollectionstringMongo 需要迁移的 collection 名No
Source.N.MongoNode.DataRegionstringMongo 源数据库地域,示例: cn-bj2No
Source.N.MongoNode.VPCIdstringMongo 源数据库 VPC ID,当网络类型为 user 时需要填写,比如 uvnet-u0ecaceNo
Source.N.MongoNode.SubnetIdstringMongo 源数据库 子网 ID,当网络类型为 user 时需要填写,比如 subnet-2sloxsNo
Source.N.MongoNode.AuthenticationDBstringMongo 源数据库授权数据库名 ,通常为 adminNo
Source.N.RedisNode.AddressstringRedis 源数据库地址,只填写主(master)地址。集群模式下,多个地址用”;“相连,例如:192.168.1.100:6379;192.168.1.120:6379;192.168.1.130:26379No
Source.N.RedisNode.TypestringRedis 源数据库类型,支持集群(cluster)/主备(standalone)No
Source.N.RedisNode.PasswordstringRedis 源数据库密码No
Source.N.RedisNode.IsRumpbooleanRedis 是否开启 Rump 模式,当用户无 psync 权限时需要通过Rump同步。No
Source.N.RedisNode.DataRegionstringRedis 源数据库地域,示例: cn-bj2No
Source.N.RedisNode.VPCIdstringRedis 源数据库 VPC ID,当网络类型为 user 时需要填写,比如 uvnet-u0ecaceNo
Source.N.RedisNode.SubnetIdstringRedis 源数据库 子网 ID,当网络类型为 user 时需要填写,比如 subnet-2sloxsNo
Target.DataTypestring目标数据库类型,比如 mysql/mongo/redisYes
Target.NWTypestring目标 db 网络类型,目前仅支持 userYes
Target.BandwidthLimitstring目标端限速,单位为 MB/sNo
Target.MySQLNode.HoststringMySQL 目标数据库地址, 比如 10.9.37.212No
Target.MySQLNode.PortintMySQL 目标数据库端口,比如 3306No
Target.MySQLNode.UserstringMySQL 目标数据库用户名,比如 rootNo
Target.MySQLNode.PasswordstringMySQL 目标数据库密码No
Target.MySQLNode.VPCIdstringMySQL 目标数据库 VPC,比如 uvnet-1wz5rqteNo
Target.MySQLNode.SubnetIdstringMySQL 目标数据库子网 ID ,比如 subnet-zl44fktqNo
Target.MySQLNode.DataRegionstringMySQL 目标数据库地域,比如 cn-bj2No
Target.MySQLNode.NoBinlogbooleanMySQL 是否在全量过程中,临时禁用目标 MySQL 产生 binlog,在目标磁盘空间不足,或者需要获取更快的迁移速度时可以使用,该参数会破坏目标 MySQL 的高可用No
Target.MongoNode.HoststringMongo 目标数据库地址,目前仅支持单点/副本集,示例:192.168.1.100:27017,192.168.1.120:27017,192.168.1.130:27017No
Target.MongoNode.UserstringMongo 目标数据库用户名No
Target.MongoNode.PasswordstringMongo 目标数据库密码No
Target.MongoNode.DataRegionstringMongo 目标数据库地域,示例: cn-bj2No
Target.MongoNode.VPCIdstringMongo 目标数据库 VPC ID,示例 uvnet-u0ecaceNo
Target.MongoNode.SubnetIdstringMongo 目标数据库 子网 ID,示例 subnet-2sloxsNo
Target.MongoNode.AuthenticationDBstringMongo 目标数据库授权数据库名 ,通常为 adminNo
Target.RedisNode.AddressstringRedis 目标数据库地址,只填写主(master)地址。集群模式下,多个地址用”;“相连,例如:192.168.1.100:6379;192.168.1.120:6379;192.168.1.130:26379No
Target.RedisNode.TypestringRedis 目标数据库类型,支持集群(cluster)/主备(standalone)/分布式(udredis)No
Target.RedisNode.PasswordstringRedis 目标数据库密码No
Target.RedisNode.DataRegionstringRedis 目标数据库地域,示例: cn-bj2No
Target.RedisNode.VPCIdstringRedis 目标数据库 VPC ID,示例 uvnet-u0ecaceNo
Target.RedisNode.SubnetIdstringRedis 目标数据库 子网 ID,示例 subnet-2sloxsNo
ChargeTypestring付费方式, 枚举值为: Year, 按年付费; Month, 按月付费;Dynamic, 按需付费(需开启权限);默认为按月付费Yes
MaxRetryCountstring重试次数,最大为 5。 默认为0No
Remarkstring备注信息,长度不能大于 255No
Quantityint购买时长, 默认: 1No
CouponIdstring代金券ID, 默认不使用No

响应字段

字段名类型描述信息必填
RetCodeint返回状态码,为 0 则为成功返回,非 0 为失败Yes
Actionstring操作指令名称Yes
Messagestring返回错误消息,当 RetCode 非 0 时提供详细的描述信息No
DataCreateUDTSTaskResData创建任务返回信息Yes
TaskIdarray[string]任务ID,目前用于控制台操作日志No

数据模型

CreateUDTSTaskResData

字段名类型描述信息必填
TaskIdstring任务IDNo

示例

请求示例

https://api.tnqacloud.com/?Action=CreateUDTSTask &Region=cn-zj &ProjectId=RxjtEuje &Name=AxfpqbHf &Type=LSwCQRth &Source=DmzCcRiT &Target=PIVlSiCd &MaxRetryCount=iPgQdCJm &Query=YqlCGHLR &IsDedicatedLine=false &IsUnidirection=NYPZcshe &Source.N.Mode=fWsqXqqm &Source.N.DataType=TGmlMgtA &Source.N.MySQLNode.Host=nTEGdKOV &Source.N.MySQLNode.Port=9 &Source.N.MySQLNode.User=PPPsDLEy &Source.N.MySQLNode.Password=UEEuSVpz &Source.N.MySQLNode.VPCId=RbLzaWDM &Source.N.MySQLNode.SubnetId=sHQsachY &Source.N.MySQLNode.DataRegion=jQPRqZAQ &Source.N.MySQLNode.Database=HvYuzdTY &Source.N.MySQLNode.Table=ikPDQCrF &Source.N.MySQLNode.SyncData.BinlogName=VSbjNbof &Source.N.MySQLNode.SyncData.BinlogPos=FpQadMWc &Source.N.MySQLNode.SyncData.ServerID=vcgeBxiE &Source.N.MySQLNode.SyncData.BinlogGTID=zLehFoxC &Remark=EtIKkkRF &Source.N.Mode=uDwvRgXl &Source.N.DataType=DbBEiBzx &Source.N.MySQLNode.Host=QCuymrrw &Source.N.MySQLNode.Port=4 &Source.N.MySQLNode.User=MarpaRLp &Source.N.MySQLNode.Password=qdYuFUQV &Source.N.MySQLNode.VPCId=jNXsoOuw &Source.N.MySQLNode.SubnetId=ZckYkcsB &Source.N.MySQLNode.DataRegion=hNFUVoFD &Source.N.MySQLNode.Database=paqulSIo &Source.N.MySQLNode.Table=LevJUVpc &Source.N.MySQLNode.SyncData.BinlogName=yWEMtwth &Source.N.MySQLNode.SyncData.BinlogPos=4 &Source.N.MySQLNode.SyncData.ServerID=7 &Source.N.MySQLNode.SyncData.BinlogGTID=tkPozizE &Source.N.MySQLNode.QueryData.N.DBName=PmTlGFxe &Source.N.MySQLNode.QueryData.N.NewDBName=AuKmDOWG &Source.N.MySQLNode.QueryData.N.TableData.TableNames=YOqUXbCU &Source.N.MySQLNode.QueryData.N.TableData.ExcludeTables=false &Source.N.MySQLNode.QueryData.N.TableMaps.N.TableName=TkNweIYw &Source.N.MySQLNode.QueryData.N.TableMaps.N.NewTableName=Rkpkgosy &Source.N.MySQLNode.KeepExistData=false &Source.N.MySQLNode.DupAction=kNJFnpEk &Remark=EdjTSZqb &Source.N.Mode=GCHwvAzt &Source.N.DataType=KgnzrHgW &Source.N.MySQLNode.Host=eqKqgEch &Source.N.MySQLNode.Port=3 &Source.N.MySQLNode.User=SkPjrFne &Source.N.MySQLNode.Password=kXgeJFVs &Source.N.MySQLNode.VPCId=wKnpHJUL &Source.N.MySQLNode.SubnetId=EDvTEptA &Source.N.MySQLNode.DataRegion=UbTExpri &Source.N.MySQLNode.Database=kbThgUPN &Source.N.MySQLNode.Table=kUhnQaHD &Source.N.MySQLNode.SyncData.BinlogName=ucmFxWqu &Source.N.MySQLNode.SyncData.BinlogPos=8 &Source.N.MySQLNode.SyncData.ServerID=1 &Source.N.MySQLNode.SyncData.BinlogGTID=vmQUWAso &Source.N.MySQLNode.QueryData.N.DBName=TjzHlKBS &Source.N.MySQLNode.QueryData.N.NewDBName=wveCIOeo &Source.N.MySQLNode.QueryData.N.TableData.TableNames=ZLNqouij &Source.N.MySQLNode.QueryData.N.TableData.ExcludeTables=false &Source.N.MySQLNode.QueryData.N.TableMaps.N.TableName=dukuiUfI &Source.N.MySQLNode.QueryData.N.TableMaps.N.NewTableName=bpOzaOOY &Source.N.MySQLNode.KeepExistData=true &Source.N.MySQLNode.DupAction=qpKOxddJ &Target.Mode=RboYuTfl &Target.DataType=lGvNkvQC &Target.MySQLNode.Host=WHsxlqhF &Target.MySQLNode.Port=9 &Target.MySQLNode.User=fqccASPj &Target.MySQLNode.Password=aiOFwckd &Target.MySQLNode.VPCId=eCxGDRjy &Target.MySQLNode.SubnetId=KTYviHnO &Target.MySQLNode.DataRegion=JAJjVkwt &Remark=LqITzTWH &Source.N.Mode=MeuRHalq &Source.N.DataType=HGtXznTH &Source.N.MySQLNode.Host=MXzVlABy &Source.N.MySQLNode.Port=6 &Source.N.MySQLNode.User=VkFlnvFJ &Source.N.MySQLNode.Password=cZsjBPEN &Source.N.MySQLNode.VPCId=yhseMSjn &Source.N.MySQLNode.SubnetId=vzigyOkC &Source.N.MySQLNode.DataRegion=GNfKXekt &Source.N.MySQLNode.Database=VDYbUHJz &Source.N.MySQLNode.Table=HPoGAdzN &Source.N.MySQLNode.SyncData.BinlogName=WnhzlWBW &Source.N.MySQLNode.SyncData.BinlogPos=6 &Source.N.MySQLNode.SyncData.ServerID=5 &Source.N.MySQLNode.SyncData.BinlogGTID=dgpWMwNV &Source.N.MySQLNode.QueryData.N.DBName=tVfORnwW &Source.N.MySQLNode.QueryData.N.NewDBName=kATgswhS &Source.N.MySQLNode.QueryData.N.TableData.TableNames=SRIMxFtx &Source.N.MySQLNode.QueryData.N.TableData.ExcludeTables=true &Source.N.MySQLNode.QueryData.N.TableMaps.N.TableName=WBnoOVha &Source.N.MySQLNode.QueryData.N.TableMaps.N.NewTableName=tNKMGxTU &Source.N.MySQLNode.KeepExistData=true &Source.N.MySQLNode.DupAction=QjlOgJIR &Target.Mode=bxjaBkue &Target.DataType=rxOuZsXz &Target.MySQLNode.Host=uCNhKVcq &Target.MySQLNode.Port=8 &Target.MySQLNode.User=SQvUtfEt &Target.MySQLNode.Password=mFtYsBCO &Target.MySQLNode.VPCId=mbxEJZpE &Target.MySQLNode.SubnetId=hLGVVyoA &Target.MySQLNode.DataRegion=DzsvzZZo &Source.N.NWType=yGuzFPDP &Source.N.BandwidthLimit=6 &Target.NWType=AdfJzmEz &Target.BandwidthLimit=CFGpkzid &Source.N.MySQLNode.SSLSecurity.SSLCA=MQKwVQcF &Source.N.MySQLNode.SSLSecurity.SSLCert=yrUzEnuZ &Source.N.MySQLNode.SSLSecurity.SSLKey=OYuQESyM &Source.N.ServiceType=vVuYpUaV &Quantity=4 &ChargeType=diYSAAQT &CouponId=flfTnXPG &Source.N.MongoNode.Host=jOcArCZd &Source.N.MongoNode.User=amxFCIOr &Source.N.MongoNode.Password=rYXcnHTl &Source.N.MongoNode.Database=ElkPkNWH &Source.N.MongoNode.Collection=WPhkpJhm &Source.N.MongoNode.DataRegion=JyFTKOxm &Source.N.MongoNode.VPCId=vqCFMzqY &Source.N.MongoNode.SubnetId=hCQnHnOf &Source.N.MongoNode.AuthenticationDB=DNfpgmje &Source.N.MongoNode.Host=XoloecOb &Source.N.MongoNode.User=RJujHoSU &Source.N.MongoNode.Password=PYfotPZl &Source.N.MongoNode.Database=oPgSolHS &Source.N.MongoNode.Collection=XOSnNHVO &Source.N.MongoNode.DataRegion=nwdtPFPf &Source.N.MongoNode.VPCId=wwrHnbCs &Source.N.MongoNode.SubnetId=SxviaMiA &Source.N.MongoNode.AuthenticationDB=lpsbChWo &Target.MongoNode.Host=hSfjPvqy &Target.MongoNode.User=jacipLQj &Target.MongoNode.Password=OuTuOwKi &Target.MongoNode.DataRegion=iAOgTrXd &Target.MongoNode.VPCId=zwGaJYaj &Target.MongoNode.SubnetId=zBGmDUBB &Target.MongoNode.AuthenticationDB=IQRByjAi &Source.N.MongoNode.Host=NVrbNufM &Source.N.MongoNode.User=cgjsYZil &Source.N.MongoNode.Password=LnuQNStS &Source.N.MongoNode.Database=nnfMCmMC &Source.N.MongoNode.Collection=MSzRhnDM &Source.N.MongoNode.DataRegion=pgfEhBrh &Source.N.MongoNode.VPCId=QrSCDZpD &Source.N.MongoNode.SubnetId=tCWWthPI &Source.N.MongoNode.AuthenticationDB=buPTYExP &Target.MongoNode.Host=CnwhbDFq &Target.MongoNode.User=SKbuedxG &Target.MongoNode.Password=MIjQHvPe &Target.MongoNode.DataRegion=qmbUbYlN &Target.MongoNode.VPCId=htgZMOon &Target.MongoNode.SubnetId=ivjlCrgm &Target.MongoNode.AuthenticationDB=jHBpdtNH &Source.N.RedisNode.Address=kpSKAwDs &Source.N.RedisNode.Type=VfKVhntR &Source.N.RedisNode.Password=MTewqQXi &Source.N.RedisNode.IsRump=true &Source.N.RedisNode.DataRegion=LjzpHyjJ &Source.N.RedisNode.VPCId=FIoQIQom &Source.N.RedisNode.SubnetId=cnfXdvJV &Target.RedisNode.Address=DluHSyln &Target.RedisNode.Type=eAPkfQuT &Target.RedisNode.Password=VxuXaFmG &Target.RedisNode.DataRegion=jUWKTnwv &Target.RedisNode.VPCId=vsXWjiFm &Target.RedisNode.SubnetId=NSAPtXSF

响应示例

{ "Action": "CreateUDTSTaskResponse", "Data": {}, "Message": "FnZvjDcL", "RetCode": 0, "TaskID": "zJeiMttl" }