You can call the DescribeCloudMigrationPrecheckResult operation to query the assessment report for cloud migration to an ApsaraDB RDS for PostgreSQL instance.
Prerequisites
Before you call the DescribeCloudMigrationPrecheckResult operation, make sure that the CreateCloudMigrationPrecheckTask operation is called to create a cloud migration assessment task for the ApsaraDB RDS for PostgreSQL instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribeCloudMigrationPrecheckResult |
The operation that you want to perform. Set the value to DescribeCloudMigrationPrecheckResult. |
| DBInstanceName | String | Yes | pgm-bp102g323jd4**** |
The ID of the instance. You can call the DescribeDBInstances operation to query the ID of the instance. |
| TaskId | Long | No | 439946016 |
The ID of the cloud migration task. You can obtain the ID of the task from the response that is returned after you call the CreateCloudMigrationPrecheckTask operation to create the task. |
| TaskName | String | No | slf7w7wj3g |
The name of the cloud migration task. You can obtain the name of the task from the response that is returned after you call the CreateCloudMigrationPrecheckTask operation to create the task. |
| SourceIpAddress | String | No | 172.2.XX.XX |
The private or public IP address that is used to connect to the self-managed PostgreSQL instance.
|
| SourcePort | Long | No | 5432 |
The port number that is used to connect to the self-managed PostgreSQL instance. You can run the netstat -a | grep PGSQL command to obtain the port number. |
| PageSize | Long | Yes | 10 |
The number of entries to return on each page. |
| PageNumber | Long | Yes | 1 |
The number of the page to return. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| TotalSize | Integer | 1 |
The total number of entries. |
| RequestId | String | 7E4A6E1B-789B-5F16-9736-39AA57FC7374 |
The ID of the request. |
| Items | Array of migrateCloudTaskList |
Details of the assessment report. |
|
| GmtCreated | String | 2022-02-25T06:57:41Z |
The time when the task was created. |
| GmtModified | String | 2022-02-25T06:58:00Z |
The time when the task was modified. |
| TaskId | Long | 440420798 |
The ID of the cloud migration task. |
| TaskName | String | lxbv6rtxno8 |
The name of the cloud migration task. |
| SourceCategory | String | ecsonvpc |
The environment in which the self-managed PostgreSQL instance runs.
|
| SourceIpAddress | String | 172.2.XX.XX |
The private public IP address that is used to connect to the self-managed PostgreSQL instance. |
| SourcePort | Long | 5432 |
The port number that is used to connect to the self-managed PostgreSQL instance. |
| SourceAccount | String | migratetest |
The username of the account. |
| SourcePassword | String | 123456 |
The password of the account. |
| TargetEip | String | null |
A reserved parameter. The return value of this parameter is null. |
| TargetInstanceName | String | pgm-bp102g323jd4**** |
The ID of the instance. |
| Detail | String | [Check rds empty]\nCheck rds databases: success\n[Check source connectivity]\nCheck ip connectable: success\nCheck port connectable: success\nCheck database connectable: success\nCheck account replication privilege: success\nCheck account createrole privilege: success\nCheck account monitor privilege: success\n[Check source version]\nCheck major version consistent: success\n[Check source glibc version]\nCheck source glibc version compatible: warning(warning:source glibc version is not compatible with rds pg)\n[Check disk size]\nCheck disk size enough: success\n[Check wal keep size]\nCheck wal keep size large enough: success\n[Check spec params]\nCheck if spec params too large: success\n [Check triggers]\nCheck triggers compatible: success\n[Check user functions]\nCheck user functions compatible: success\n*Migrate check success* |
The content of the assessment report. |
| PageNumber | Long | 1 |
The page number of the returned page. |
| PageSize | Long | 10 |
The number of entries returned per page. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=DescribeCloudMigrationPrecheckResult
&DBInstanceName=pgm-bp102g323jd4****
&TaskId=439946016
&TaskName=slf7w7wj3g
&SourceIpAddress=172.2.XX.XX
&SourcePort=5432
&PageSize=10
&PageNumber=1
&Common request parameters
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeCloudMigrationPrecheckResultResponse>
<TotalSize>1</TotalSize>
<RequestId>7E4A6E1B-789B-5F16-9736-39AA57FC7374</RequestId>
<Items>
<GmtCreated>2022-02-25T06:57:41Z</GmtCreated>
<GmtModified>2022-02-25T06:58:00Z</GmtModified>
<TaskId>440420798</TaskId>
<TaskName>lxbv6rtxno8</TaskName>
<SourceCategory>ecsonvpc</SourceCategory>
<SourceIpAddress>172.2.XX.XX</SourceIpAddress>
<SourcePort>5432</SourcePort>
<SourceAccount>migratetest</SourceAccount>
<SourcePassword>123456</SourcePassword>
<TargetInstanceName>pgm-bp102g323jd4****</TargetInstanceName>
<Detail>[Check rds empty]\nCheck rds databases: success\n[Check source connectivity]\nCheck ip connectable: success\nCheck port connectable: success\nCheck database connectable: success\nCheck account replication privilege: success\nCheck account createrole privilege: success\nCheck account monitor privilege: success\n[Check source version]\nCheck major version consistent: success\n[Check source glibc version]\nCheck source glibc version compatible: warning(warning:source glibc version is not compatible with rds pg)\n[Check disk size]\nCheck disk size enough: success\n[Check wal keep size]\nCheck wal keep size large enough: success\n[Check spec params]\nCheck if spec params too large: success\n [Check triggers]\nCheck triggers compatible: success\n[Check user functions]\nCheck user functions compatible: success\n*Migrate check success*</Detail>
</Items>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
</DescribeCloudMigrationPrecheckResultResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalSize" : 1,
"RequestId" : "7E4A6E1B-789B-5F16-9736-39AA57FC7374",
"Items" : {
"GmtCreated" : "2022-02-25T06:57:41Z",
"GmtModified" : "2022-02-25T06:58:00Z",
"TaskId" : 440420798,
"TaskName" : "lxbv6rtxno8",
"SourceCategory" : "ecsonvpc",
"SourceIpAddress" : "172.2.XX.XX",
"SourcePort" : 5432,
"SourceAccount" : "migratetest",
"SourcePassword" : 123456,
"TargetInstanceName" : "pgm-bp102g323jd4****",
"Detail" : "[Check rds empty]\\nCheck rds databases: success\\n[Check source connectivity]\\nCheck ip connectable: success\\nCheck port connectable: success\\nCheck database connectable: success\\nCheck account replication privilege: success\\nCheck account createrole privilege: success\\nCheck account monitor privilege: success\\n[Check source version]\\nCheck major version consistent: success\\n[Check source glibc version]\\nCheck source glibc version compatible: warning(warning:source glibc version is not compatible with rds pg)\\n[Check disk size]\\nCheck disk size enough: success\\n[Check wal keep size]\\nCheck wal keep size large enough: success\\n[Check spec params]\\nCheck if spec params too large: success\\n [Check triggers]\\nCheck triggers compatible: success\\n[Check user functions]\\nCheck user functions compatible: success\\n*Migrate check success*"
},
"PageNumber" : 1,
"PageSize" : 10
}
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 404 | InvalidDBInstanceName.NotFound | The database instance does not exist. | The error message returned because the name of the instance cannot be found. Verify the instance name and try again. |
For a list of error codes, visit the API Error Center.