tencent cloud

数据传输服务

动态与公告
产品动态
公告
产品简介
产品概述
数据迁移功能描述
数据同步功能描述
数据订阅(Kafka 版)功能描述
产品优势
支持的地域
规格说明
购买指南
计费概述
变更配置说明
欠费说明
退费说明
快速入门
数据迁移操作指导
数据同步操作指导
数据订阅操作指导(Kafka 版)
准备工作
业务评估
网络准备
添加 DTS IP 地址至对接数据库白名单
DTS 服务权限准备
数据库及权限准备
配置自建 MySQL 系的 Binlog
数据迁移
数据迁移支持的数据库
云数据库跨账号实例间迁移
迁移至 MySQL 系列
迁移至 PostgreSQL
迁移至 MongoDB
迁移至 SQL Server
迁移至腾讯云分布式缓存数据库
任务管理
数据同步
数据同步支持的数据库
云数据库跨账号实例间同步
同步至 MySQL 系列
同步至 PostgreSQL
同步至 MongoDB
同步至 Kafka
任务管理
数据订阅(Kafka 版)
数据订阅支持的数据库
MySQL 系列数据订阅
TDSQL PostgreSQL 数据订阅
MongoDB 数据订阅
任务管理
消费管理
前置校验不通过处理方法
检查项汇总
割接说明
监控与告警
支持的监控指标
告警通知功能
通过控制台配置指标告警和事件告警
通过 API 配置指标告警和事件告警
运维管理
配置系统维护时间
任务状态扭转说明
实践教程
本地数据库同步上云
构建双向同步数据结构
构建多对一同步数据结构
构建多活数据中心
数据同步冲突策略如何选择
使用 CLB 代理将其他账号下的数据库迁移至本账号下
通过云联网方式迁移自建数据库至腾讯云数据库
DTS 性能调优最佳实践
常见问题
数据迁移
数据同步
数据订阅 Kafka 版常见问题
数据订阅正则表达式
错误处理
常见错误处理
连通性测试不通过
校验项结果不通过或者出现警告
云联网接入配置源数据时无法选择子网
迁移慢或者进度卡住
数据同步有延时
数据订阅延迟过高
数据消费异常
API 文档
History
Introduction
API Category
Making API Requests
(NewDTS) Data Migration APIs
Data Sync APIs
Data Consistency Check APIs
(NewDTS) Data Subscription APIs
Data Types
Error Codes
DTS API 2018-03-30
相关协议
服务等级协议

CreateMigrationService

PDF
聚焦模式
字号
最后更新时间: 2025-10-28 22:20:51

1. API Description

Domain name for API request: dts.intl.tencentcloudapi.com.

This API is used to purchase migration tasks. After the tasks are purchased successfully, a randomly generated list of task IDs will be returned. You can also call the DescribeMigrationJobs API to query the IDs of the successfully purchased tasks. Note that once a task is purchased successfully, the types and regions of the source and target databases cannot be changed.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateMigrationService.
Version Yes String Common Params. The value used for this API: 2021-12-06.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
SrcDatabaseType Yes String Source database type. Valid values: mysql, redis, percona, mongodb, postgresql, sqlserver, mariadb, and cynosdbmysql.
DstDatabaseType Yes String Target database type. Valid values: mysql, redis, percona, mongodb ,postgresql, sqlserver, mariadb, and cynosdbmysql.
SrcRegion Yes String Source instance region, such as ap-guangzhou.
DstRegion Yes String Target instance region, such as ap-guangzhou. Note that it must be the same as the API request region.
InstanceClass Yes String Instance specification. Valid values: small, medium, large, xlarge, 2xlarge.
Count No Integer Quantity. Value range: [1,15]. Default value: 1.
JobName No String Migration task name, which can contain up to 128 characters.
Tags.N No Array of TagItem Tag information

3. Output Parameters

Parameter Name Type Description
JobIds Array of String The list of migration task IDs randomly generated in the format of dts-c1f6rs21 after a successful order placement
Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Purchasing a migration task

This example shows you how to purchase a migration task.

Input Example

POST / HTTP/1.1Host: dts.intl.tencentcloudapi.comContent-Type: application/jsonX-TC-Action: CreateMigrationService<Common request parameters>{    "SrcDatabaseType": "mysql",    "DstDatabaseType": "mysql",    "InstanceClass": "xlarge",    "SrcRegion": "ap-guangzhou",    "DstRegion": "ap-guangzhou",    "Tags": [        {            "TagKey": "testkey",            "TagValue": "testvalue"        }    ]}

Output Example

{
    "Response": {
        "JobIds": [
            "dts-1ewjspuw"
        ],
        "RequestId": "ac300ff0-00f2-11ed-b005-4930e69d89c2"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AuthFailure.AuthFailureError Authentication failed.
DryRunOperation.DryRunOperationError DryRun operation, which means an unnecessary DryRun parameter is passed in yet the request will still be successful.
FailedOperation.FailedOperationError The operation failed.
InternalError An internal error occurred.
InternalError.InternalErrorError An internal error occurred.
InternalError.UnknownError An unknown internal error occurred.
InvalidParameter.InvalidParameterError The parameter is invalid.
InvalidParameterValue.InvalidParameterValueError The parameter is invalid.
LimitExceeded.LimitExceededError The quantity exceeds the limit.
MissingParameter.MissingParameterError The parameter is lost.
OperationDenied.OperationDeniedError The operation was denied.
RequestLimitExceeded.RequestLimitExceededError The number of requests exceeds the limit.
ResourceInUse.ResourceInUseError The resource is being used.
ResourceInsufficient.ResourceInsufficientError The resources are insufficient.
ResourceNotFound.ResourceNotFoundError The resource was not found.
ResourceUnavailable.ResourceUnavailableError The resource is unavailable.
ResourcesSoldOut.ResourcesSoldOutError The resources have been sold out.
UnauthorizedOperation.UnauthorizedOperationError The operation is unauthorized.
UnknownParameter.UnknownParameterError The parameter is unknown.
UnsupportedOperation.UnsupportedOperationError The operation is not supported.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈