Use this API to get a list of migration jobs with instance details.
Debugging
You can run this API directly in the OpenAPI Explorer that automatically calculates the signature value. Upon successful execution, OpenAPI Explorer automatically generates SDK code samples.
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | DescribeMigrationJobs | The API action. Valid value: |
RegionId | String | No | cn-hangzhou | The region ID of the data migration instances. For more information, see List of supported regions. |
PageSize | Integer | No | 30 | The number of entries to return on each page. Valid values: 10, 20, and 30. Default value: 30. Maximum value: 30. |
PageNum | Integer | No | 1 | The number of the page to return. The value must be an integer that is greater than 0 and does not exceed the maximum value of the Integer data type. Default value: 1. |
MigrationJobName | String | No | MySQL Migration | The name of the data migration task. Note Fuzzy match is supported. |
AccountId | String | No | 12323344**** | The ID of the Alibaba Cloud account. You do not need to specify this parameter because this parameter will be removed in the future. |
Tag.N.Key | String | Yes | testkey1 | The tag key. You can get it by calling the ListTagResources API. Note
|
Tag.N.Value | String | No | testvalue1 | The tag value. You can get it by calling the ListTagResources API. Note
|
ResourceGroupId | String | No | rg-acfmzawhxxc**** | The resource group ID. |
Response parameters
Parameter | Type | Example | Description |
RequestId | String | 0ED4846D-ED60-435D-88C0-7EC0CE4D**** | The unique request ID. |
ErrCode | String | InternalError | The error code returned if the request failed. |
PageRecordCount | Integer | 30 | The maximum number of entries that can be displayed on the current page. |
Success | String | true | Indicates whether the call was successful. |
TotalRecordCount | Long | 300 | The total number of data migration instances that belong to your Alibaba Cloud account. |
ErrMessage | String | The request processing has failed due to some unknown error. | The error message returned if the request failed. |
PageNumber | Integer | 1 | The page number of the returned page. |
MigrationJobs | Array of MigrationJob | The list of data migration instances and the details of each instance. | |
MigrationJob | |||
MigrationJobName | String | MySQL Migration | The name of the data migration task. |
MigrationJobStatus | String | Migrating | The status of the data migration task. Valid values:
|
PayType | String | PostPaid | The billing method of the data migration instance. The value is |
MigrationJobClass | String | 2xlarge | The specification of the data migration instance. Valid values: small, medium, large, xlarge, and 2xlarge. |
InstanceCreateTime | String | 2021-06-22T09:02:13Z | The time when the data migration instance was created in the yyyy-MM-ddTHH:mm:ssZ format in UTC. |
MigrationJobID | String | dtson2z28evm33**** | The ID of the data migration instance. |
JobCreateTime | String | 2021-06-22T08:53:55Z | The time when the synchronization task was created in the yyyy-MM-ddTHH:mm:ssZ format in UTC. |
MigrationObject | Array of SynchronousObject | The objects that are migrated by the task. | |
SynchronousObject | |||
DatabaseName | String | dtstestdata | The name of the database that stores the objects to be migrated from the source instance. |
WholeDatabase | String | false | Indicates whether an entire database is migrated. Valid values:
|
TableList | Array of String | customer | The names of the migrated tables. |
Tags | Array of Tag | The tags. | |
Tag | |||
Key | String | testkey1 | The tag key. |
Value | String | testvalue1 | The tag value that corresponds to the tag key. |
DataInitialization | Object | The details of full data migration. | |
Percent | String | 100 | The progress of full data migration. Unit: %. |
status | String | Finished | The status of full data migration. Valid values:
|
ErrorMessage | String | java.lang.NumberFormatException: For input string: "" | The error message returned if full data migration failed. |
Progress | String | 200001 | The number of records that have been migrated during full data migration. |
DataSynchronization | Object | The details of incremental data migration. | |
Delay | String | 0 | The latency of incremental data migration. Unit: seconds. |
Percent | String | 95 | The progress of incremental data migration. Unit: %. |
status | String | Catched | The status of incremental data migration. Valid values:
|
ErrorMessage | String | The task has failed for a long time and cannot be recovered. | The error message returned if incremental data migration failed. |
DestinationEndpoint | Object | The connection settings of the destination instance. | |
OracleSID | String | testsid | This parameter is returned only if the database type of the destination instance is Oracle. |
DatabaseName | String | dtstestdata | The name of the database to which the migration object in the destination instance belongs. |
InstanceID | String | rm-bp1zc3iyqe3qw**** | The ID of the destination instance. |
Port | String | 3306 | The database service port of the destination instance. |
IP | String | 172.16.88.*** | The endpoint of the destination instance. |
InstanceType | String | RDS | The type of the destination instance. |
UserName | String | dtstest | The database account of the destination instance. |
EngineName | String | MySQL | The database type of the destination instance. |
MigrationMode | Object | The migration type. | |
DataInitialization | Boolean | true | Indicates whether full data migration is performed. Valid values:
|
DataSynchronization | Boolean | true | Indicates whether incremental data migration is performed. Valid values:
|
StructureInitialization | Boolean | true | Indicates whether schema migration is performed. Valid values:
|
Precheck | Object | The precheck details. | |
Status | String | Success | The precheck result. Valid values:
|
Percent | String | 100 | The precheck progress. Unit: %. |
SourceEndpoint | Object | The connection settings of the source instance. | |
OracleSID | String | testsid | This parameter is returned only if the database type of the source instance is Oracle. |
DatabaseName | String | dtstestdata | The name of the database to which the migration object in the source instance belongs. |
InstanceID | String | rm-bp1i99e8l7913**** | The ID of the source instance. |
Port | String | 3306 | The database service port of the source instance. |
IP | String | 172.16.88.*** | The endpoint of the source instance. |
InstanceType | String | RDS | The type of the source instance. |
UserName | String | dtstest | The database account of the source instance. |
EngineName | String | MySQL | The database type of the source instance. |
StructureInitialization | Object | The details of schema migration. | |
Percent | String | 100 | The progress of schema migration. Unit: %. |
status | String | Finished | The status of schema migration. Valid values:
|
ErrorMessage | String | DTS-1020042 Execute sql error sql: ERROR: type "geometry" does not exist; | The error message returned if schema migration failed. |
Progress | String | 1 | The number of tables whose schemas have been migrated. |
Examples
Sample requests
http(s)://dts.aliyuncs.com/?Action=DescribeMigrationJobs
&Tag.1.Key=testkey1
&<Common request parameters>Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeMigrationJobsResponse>
<TotalRecordCount>300</TotalRecordCount>
<PageRecordCount>30</PageRecordCount>
<RequestId>0ED4846D-ED60-435D-88C0-7EC0CE4D****</RequestId>
<PageNumber>1</PageNumber>
<MigrationJobs>
<MigrationJob>
<DataSynchronization>
<Percent>95</Percent>
<Delay>0</Delay>
<status>Catched</status>
</DataSynchronization>
<Precheck/>
<InstanceCreateTime>2021-06-22T09:02:13Z</InstanceCreateTime>
<JobCreateTime>2021-06-22T08:53:55Z</JobCreateTime>
<MigrationJobName>MySQL Migration</MigrationJobName>
<PayType>PostPaid</PayType>
<MigrationJobStatus>Migrating</MigrationJobStatus>
<MigrationMode>
<DataInitialization>true</DataInitialization>
<DataSynchronization>true</DataSynchronization>
<StructureInitialization>true</StructureInitialization>
</MigrationMode>
<MigrationJobID>dtson2z28evm33****</MigrationJobID>
<MigrationObject>
<SynchronousObject>
<DatabaseName>dtstest</DatabaseName>
<WholeDatabase>false</WholeDatabase>
<TableList>
<Table>customer</Table>
</TableList>
</SynchronousObject>
</MigrationObject>
<DataInitialization>
<Progress>200001</Progress>
<Percent>100</Percent>
<status>Finished</status>
</DataInitialization>
<DestinationEndpoint>
<UserName>dtstest</UserName>
<InstanceID>rm-bp1zc3iyqe3qw****</InstanceID>
<InstanceType>RDS</InstanceType>
<EngineName>MySQL</EngineName>
</DestinationEndpoint>
<MigrationJobClass>2xlarge</MigrationJobClass>
<SourceEndpoint>
<UserName>dtstest</UserName>
<InstanceID>rm-bp1i99e8l7913****</InstanceID>
<InstanceType>RDS</InstanceType>
<EngineName>MySQL</EngineName>
</SourceEndpoint>
<StructureInitialization>
<Progress>1</Progress>
<Percent>100</Percent>
<status>Finished</status>
</StructureInitialization>
<Tags></Tags>
</MigrationJob>
</MigrationJobs>
<Success>true</Success>
</DescribeMigrationJobsResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalRecordCount" : 300,
"PageRecordCount" : 30,
"RequestId" : "0ED4846D-ED60-435D-88C0-7EC0CE4D****",
"PageNumber" : 1,
"MigrationJobs" : {
"MigrationJob" : [ {
"DataSynchronization" : {
"Percent" : "95",
"Delay" : "0",
"status" : "Catched"
},
"Precheck" : { },
"InstanceCreateTime" : "2021-06-22T09:02:13Z",
"JobCreateTime" : "2021-06-22T08:53:55Z",
"MigrationJobName" : "MySQL Migration",
"PayType" : "PostPaid",
"MigrationJobStatus" : "Migrating",
"MigrationMode" : {
"DataInitialization" : true,
"DataSynchronization" : true,
"StructureInitialization" : true
},
"MigrationJobID" : "dtson2z28evm33****",
"MigrationObject" : {
"SynchronousObject" : [ {
"DatabaseName" : "dtstest",
"WholeDatabase" : false,
"TableList" : {
"Table" : [ "customer" ]
}
} ]
},
"DataInitialization" : {
"Progress" : "200001",
"Percent" : "100",
"status" : "Finished"
},
"DestinationEndpoint" : {
"UserName" : "dtstest",
"InstanceID" : "rm-bp1zc3iyqe3qw****",
"InstanceType" : "RDS",
"EngineName" : "MySQL"
},
"MigrationJobClass" : "2xlarge",
"SourceEndpoint" : {
"UserName" : "dtstest",
"InstanceID" : "rm-bp1i99e8l7913****",
"InstanceType" : "RDS",
"EngineName" : "MySQL"
},
"StructureInitialization" : {
"Progress" : "1",
"Percent" : "100",
"status" : "Finished"
},
"Tags" : {
"Tag" : [ ]
}
} ]
},
"Success" : true
}Error codes
HTTP status code | Error code | Error message | Description |
500 | InternalError | The request processing has failed due to some unknown error. | The error message returned because an internal error has occurred. Try again later. |
500 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The response of the server timed out or the server was unavailable. Try again. If the error persists, contact technical support. |
400 | Throttling.User | Request was denied due to user flow control. | The number of requests reached the limit, and the request was rejected. Try again later. |
403 | InvalidSecurityToken.Expired | Specified SecurityToken is expired. | The signature expired. Use a new signature. |
For a list of error codes, visit the Error Center.