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

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 of the operation for different SDKs.

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 ApsaraDB RDS for PostgreSQL instance. You can call the DescribeDBInstances operation to query the ID of the instance.

TaskId Long No 439946016

The ID of the task. You can obtain the ID of a task from the response that is returned when you call the CreateCloudMigrationPrecheckTask operation to create the task.

TaskName String No slf7w7wj3g

The name of the task. You can obtain the name of a task from the response that is returned when 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.

  • If the self-managed PostgreSQL instance resides on an Elastic Compute Service (ECS) instance, enter the private IP address of the ECS instance For more information, see View IP addresses.
  • If the self-managed PostgreSQL instance resides in an on-premises data center, enter the private IP address of the on-premises data center.
  • If the self-managed PostgreSQL instance resides on a device that is connected over the Internet, enter the public IP address of the device.
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 maximum 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 that are returned.

RequestId String 7E4A6E1B-789B-5F16-9736-39AA57FC7374

The ID of the request.

Items Array of migrateCloudTaskList
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 task.

TaskName String lxbv6rtxno8

The name of the task.

SourceCategory String ecsonvpc

The environment in which the self-managed PostgreSQL instance runs.

  • idcOnVpc: The self-managed PostgreSQL instance resides in an on-premises data center, which can communicate with the virtual private cloud (VPC) to which the ApsaraDB RDS for PostgreSQL instance belongs.
  • ecsOnVpc: The self-managed PostgreSQL instance resides on an ECS instance.
  • internet: The self-managed PostgreSQL instance resides on a device that is connected over the Internet.
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 that is used for cloud migration.

SourcePassword String 123456

The password of the preceding account.

TargetEip String null

A reserved parameter. The return value of this parameter is null.

TargetInstanceName String pgm-bp102g323jd4****

The ID of the ApsaraDB RDS for PostgreSQL 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 report.

PageNumber Long 1

The page number of the returned page.

PageSize Long 10

The maximum number of entries returned on each 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 instance name that you specified cannot be found. Verify the instance name and try again.

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