You can call the DescribeMigrateTasks operation to query the tasks that are created to migrate the backup data of an ApsaraDB RDS for SQL Server instance.

This operation allows you to query the migration tasks that are created for the instance over the last week.

Note
  • This operation is supported only for migration tasks that are created to migrate full backup files.
  • This operation is not supported for instances that run SQL Server 2017 (cluster edition).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeMigrateTasks

The operation that you want to perform. Set the value to DescribeMigrateTasks.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

StartTime String Yes 2017-10-20T01:00Z

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

EndTime String Yes 2017-10-25T01:00Z

The end of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

PageSize Integer No 30

The number of entries to return on each page. Valid values: 30 to 100. Default value: 30.

PageNumber Integer No 1

The number of the page to return. Valid values: any non-zero positive integer.

Default value: 1.

ResourceGroupId String No rg-acfmy*****

The ID of the resource group.

Response parameters

Parameter Type Example Description
DBInstanceId String rm-uf6wjk5xxxxxxx

The ID of the instance.

PageNumber Integer 1

The page number of the returned page.

RequestId String 4E356DDF-6B83-45DB-99D5-4B1E8A0D286B

The ID of the request.

PageRecordCount Integer 10

The number of entries returned on each page.

TotalRecordCount Integer 30

The total number of entries returned.

Items Array of MigrateTask

Details of the migration task.

MigrateTask
EndTime String 2017-05-30T13:11:04Z

The time when the migration task was completed. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Status String Success

The status of the migration task. Valid values:

  • NoStart: The task has not started.
  • Running:The task is in progress.
  • Success: The task is successful.
  • Failed: The task failed.
  • Waiting: The task is waiting for an incremental backup file to be imported.
Description String Api description

The description of the migration task.

CreateTime String 2017-05-30T12:11:04Z

The time when the migration task was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

DBName String testDB

The name of the database.

BackupMode String FULL

The type of the migration task. Valid values:

  • FULL: The migration task migrates full backup files that can be used to restore the full data of the instance.
  • UPDF: The migration task migrates incremental or log backup files that can be used to restore the incremental data of the instance.
MigrateTaskId String 564522545

The ID of the migration task.

IsDBReplaced String True

Indicates whether the imported data overwrites the existing data.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=DescribeMigrateTasks
&DBInstanceId=rm-uf6wjk5xxxxxxx
&StartTime=2017-10-20T01:00Z
&EndTime=2017-10-25T01:00Z
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<DescribeMigrateTasksResponse>
	<RequestId>A5409D02-D661-4BF3-8F3D-0A814D0574E7</RequestId>
	<PageRecordCount>1</PageRecordCount>
	<PageNumber>1</PageNumber>
	<TotalRecordCount>10</TotalRecordCount>
	<Items>
		<MigrateTaskId>rm-bp1842vxxxxx</MigrateTaskId>
		<DBName>test02</DBName>
		<CreateTime>2017-05-30 T12:11:4Z</CreateTime>
		<EndTime>2017-05-30 T12:11:4Z</EndTime>
		<IsDBReplaced>True</IsDBReplaced>
		<Status>Success</Status>
		<BackupMode>FULL</BackupMode>
		<Description>Api description</Description>
	</Items>
</DescribeMigrateTasksResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "A5409D02-D661-4BF3-8F3D-0A814D0574E7",
  "PageRecordCount" : 1,
  "PageNumber" : 1,
  "TotalRecordCount" : 10,
  "Items" : {
    "MigrateTaskId" : "rm-bp1842vxxxxx",
    "DBName" : "test02",
    "CreateTime" : "2017-05-30 T12:11:4Z",
    "EndTime" : "2017-05-30 T12:11:4Z",
    "IsDBReplaced" : "True",
    "Status" : "Success",
    "BackupMode" : "FULL",
    "Description" : "Api description"
  }
}

Error codes

HTTP status code Error code Error message Description
400 InvalidStartTimeAndEndTime.Malformed The end time must be greater than the start time The error message returned because the end time must be later than the start time.
403 InvalidInstanceState The DB instance state does not support this operation. The error message returned because the status of the instance does not support this operation.

For a list of error codes, visit the API Error Center.