All Products
Search
Document Center

ApsaraDB RDS:DescribeCloudMigrationResult

Last Updated:Dec 05, 2024

Queries the details about the cloud migration task of an ApsaraDB RDS for PostgreSQL instance.

Operation description

Supported database engines

  • PostgreSQL

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
rds:DescribeCloudMigrationResultget
*DBInstance
acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceNamestringYes

The instance ID. You can call the DescribeDBInstances operation to query the instance ID.

pgm-bp102g323jd4****
TaskIdlongNo

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

440437220
TaskNamestringNo

The task name. You can obtain the task name from the response that is returned when you call the CreateCloudMigrationTask operation to create the task.

362c6c7a-4d20-4eac-898c-1495ceab374c
SourceIpAddressstringNo

The private 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 about how to obtain the private IP address of an ECS instance, see View IP addresses.
  • If the self-managed PostgreSQL instance resides in a data center, enter the private IP address of the data center.
172.16.XX.XX
SourcePortlongNo

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.

5432
PageNumberlongYes

The number of entries per page.

10
PageSizelongYes

The page number.

1

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalSizeinteger

The total number of entries returned.

1
RequestIdstring

The ID of the request.

1B983C48-9793-5EAA-8F7F-00EAEC517675
Itemsarray<object>

The details about the cloud migration task.

Tasksobject
GmtCreatedstring

The time when the task was created.

2022-02-25T08:53:13Z
GmtModifiedstring

The time when the task was modified.

2022-03-01T06:39:51Z
TaskIdlong

The task ID.

440437220
TaskNamestring

The task name.

362c6c7a-4d20-4eac-898c-1495ceab374c
MigrateStagestring

The migration phase of the migration task.

  • precheck: precheck
  • basebackup: full data backup
  • startup: link establishment
  • increment: incremental data synchronization
  • switch: cloud migration-triggered switchover
  • success: cloud migration completed
switch
SourceCategorystring

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

  • idcOnVpc: The self-managed PostgreSQL instance resides in a data center. The data center can communicate with the VPC to which the ApsaraDB RDS for PostgreSQL instance belongs.
  • ecsOnVpc: The self-managed PostgreSQL instance resides on an ECS instance.
ecsonvpc
SourceIpAddressstring

The private IP address that is used to connect to the self-managed PostgreSQL instance.

172.16.XX.XX
SourcePortlong

The port number that is used to connect to the self-managed PostgreSQL instance.

5432
SourceAccountstring

The username.

migratetest
SourcePasswordstring

The password.

123456
TargetEipstring

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

null
TargetInstanceNamestring

The ID of the destination instance.

pgm-bp102g323jd4****
ReplicationStatestring

The status of data replication.

  • unstarted
  • catchup
  • streaming
  • disconnect
  • finish
streaming
ReplicationInfostring

The information about the replication link.

{\"Status\":\"streaming\",\"ReceiveStartLsn\":\"0/3000000\",\"ReceivedTli\":\"1\",\"LatestEndTime\":\"2022-02-25 17:03:59.3344+08\",\"Synced\":\"true\",\"IsSlave\":\"true\",\"ReplayTimestamp\":\"null\",\"LastMsgSendTime\":\"2022-03-01 14:42:57.967537+08\",\"Conninfo\":\"user=migratetest password=******** channel_binding=prefer dbname=replication host=172.16.254.203 port=5432 application_name=rds_db_instance fallback_application_name=walreceiver sslmode=prefer sslcompression=1 sslsni=1 ssl_min_protocol_version=TLSv1.2 gssencmode=prefer krbsrvname=postgres target_session_attrs=any\",\"LastMsgReceiptTime\":\"2022-03-01 14:42:57.96727+08\",\"LatestEndLsn\":\"0/3000148\",\"ReceivedLsn\":\"0/3000148\",\"ReplayLsn\":\"0/3000148\",\"ReceiveStartTli\":\"1\",\"ReplayLag\":\"0\"}
Detailstring

The details about the migration task.

[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[Start RDS instance]\n2022-02-25 17:00:29 --- Start RDS instance as slave for data replication\n[Synchronize data]\n2022-02-25 17:01:05 --- Synchronize data from source to RDS by streaming replication \n
SwitchTimestring

The time when the switchover was performed.

2022-03-01T06:40:51Z
PageNumberlong

The page number.

1
PageSizelong

The number of entries per page.

10

Examples

Sample success responses

JSONformat

{
  "TotalSize": 1,
  "RequestId": "1B983C48-9793-5EAA-8F7F-00EAEC517675",
  "Items": [
    {
      "GmtCreated": "2022-02-25T08:53:13Z",
      "GmtModified": "2022-03-01T06:39:51Z",
      "TaskId": 440437220,
      "TaskName": "362c6c7a-4d20-4eac-898c-1495ceab374c",
      "MigrateStage": "switch",
      "SourceCategory": "ecsonvpc",
      "SourceIpAddress": "172.16.XX.XX",
      "SourcePort": 5432,
      "SourceAccount": "migratetest",
      "SourcePassword": "123456",
      "TargetEip": "null",
      "TargetInstanceName": "pgm-bp102g323jd4****",
      "ReplicationState": "streaming",
      "ReplicationInfo": "{\\\"Status\\\":\\\"streaming\\\",\\\"ReceiveStartLsn\\\":\\\"0/3000000\\\",\\\"ReceivedTli\\\":\\\"1\\\",\\\"LatestEndTime\\\":\\\"2022-02-25 17:03:59.3344+08\\\",\\\"Synced\\\":\\\"true\\\",\\\"IsSlave\\\":\\\"true\\\",\\\"ReplayTimestamp\\\":\\\"null\\\",\\\"LastMsgSendTime\\\":\\\"2022-03-01 14:42:57.967537+08\\\",\\\"Conninfo\\\":\\\"user=migratetest password=******** channel_binding=prefer dbname=replication host=172.16.254.203 port=5432 application_name=rds_db_instance fallback_application_name=walreceiver sslmode=prefer sslcompression=1 sslsni=1 ssl_min_protocol_version=TLSv1.2 gssencmode=prefer krbsrvname=postgres target_session_attrs=any\\\",\\\"LastMsgReceiptTime\\\":\\\"2022-03-01 14:42:57.96727+08\\\",\\\"LatestEndLsn\\\":\\\"0/3000148\\\",\\\"ReceivedLsn\\\":\\\"0/3000148\\\",\\\"ReplayLsn\\\":\\\"0/3000148\\\",\\\"ReceiveStartTli\\\":\\\"1\\\",\\\"ReplayLag\\\":\\\"0\\\"}",
      "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[Start RDS instance]\\n2022-02-25 17:00:29 --- Start RDS instance as slave for data replication\\n[Synchronize data]\\n2022-02-25 17:01:05 --- Synchronize data from source to RDS by streaming replication \\n",
      "SwitchTime": "2022-03-01T06:40:51Z"
    }
  ],
  "PageNumber": 1,
  "PageSize": 10
}

Error codes

HTTP status codeError codeError messageDescription
404InvalidDBInstanceName.NotFoundThe database instance does not exist.The name of the RDS instance cannot be found. Check the name of the RDS instance.

For a list of error codes, visit the Service error codes.