Queries the migration status of PolarDB clusters.

  • You can call this operation to query the status of data migration from an ApsaraDB RDS instance to a PolarDB cluster. For more information, see Create a PolarDB for MySQL cluster from an ApsaraDB RDS for MySQL instance.
  • Before you call this operation, make sure that a one-click upgrade task has been created for the cluster. You can call the CreateDBCluster operation to create an upgrade task. Set the CreationOption parameter to MigrationFromRDS.

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 DescribeDBClusterMigration

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

DBClusterId String Yes pc-**************

The ID of the cluster.

Response parameters

Parameter Type Example Description
DBClusterEndpointList Array of DBClusterEndpoint

The endpoints of the PolarDB cluster.

AddressItems Array of Address

Details about the endpoints.

VSwitchId String vsw-**********

The vSwitch ID of the cluster.

ConnectionString String pc-**************.rwlb.rds.aliyuncs.com

The endpoint of the cluster.

NetType String Private

The network type of the endpoint. Valid values:

  • Public: the public endpoint
  • Private: the internal endpoint (VPC)
  • Inner: the internal endpoint (classic network)
Port String 3306

The port number of the cluster.

VPCId String vpc-**********

The VPC ID of the cluster.

IPAddress String 192.***.***.10

The IP address of the cluster.

SSLEnabled String Enabled

Indicates whether SSL encryption is enabled. Valid values:

  • Enabled
  • Disabled
DBEndpointId String pe-***********

The ID of the endpoint.

EndpointType String Cluster

The type of the endpoint. Valid values:

  • Cluster: the default cluster endpoint
  • Primary: the primary endpoint
  • Custom: the custom cluster endpoint
Comment String test

The description of a migration exception. If no exception occurs during the migration, an empty string is returned.

RequestId String F2A9EFA7-915F-4572-8299-85A307******

The ID of the request.

ExpiredTime String 2020-06-17T01:56:36Z

The expiration time of the replication between ApsaraDB RDS and PolarDB. The time is in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

DBClusterId String pc-****************

The ID of the cluster.

Topologies String RDS2POLARDB

The synchronization direction. Valid values:

  • RDS2POLARDB: Data is replicated from ApsaraDB RDS to PolarDB.
  • POLARDB2RDS: Data is replicated from PolarDB to ApsaraDB RDS.
RdsReadWriteMode String rw

The mode of the source ApsaraDB RDS instance. Valid values:

  • rw: read and write mode
  • ro: read-only mode
SourceRDSDBInstanceId String rm-************

The ID of the source ApsaraDB RDS instance.

DBClusterReadWriteMode String ro

The mode of the PolarDB cluster. Valid values:

  • rw: read and write mode
  • ro: read-only mode
DelayedSeconds Integer 0

The replication latency between the ApsaraDB RDS instance and the PolarDB cluster. Unit: seconds.

MigrationStatus String RDS2POLARDB_SYNCING

The migration state of the PolarDB cluster. Valid values:

  • NO_MIGRATION: No migration task is running.
  • RDS2POLARDB_CLONING: Data is being replicated.
  • RDS2POLARDB_SYNCING: Data is being replicated. During the replication, the PolarDB cluster is running in read-only mode and the source ApsaraDB RDS instance is running in read and write mode.
  • SWITCHING: Databases are being switched.
  • POLARDB2RDS_SYNCING: Databases are switched. The PolarDB cluster is running in read and write mode and the source ApsaraDB RDS instance is running in read-only mode. In this state, you can modify the endpoints for your applications.
  • ROLLBACK: The migration is being rolled back. After the rollback is complete, the value RDS2POLARDB_SYNCING is returned.
  • CLOSING_MIGRATION: The migration task is being terminated.
DtsInstanceId String dts**********618bs

The ID of the data synchronization task.

RdsEndpointList Array of RdsEndpoint

The endpoints of the ApsaraDB RDS instance.

AddressItems Array of Address

Details about the endpoints.

VSwitchId String vsw-**************

The vSwitch ID of the instance.

ConnectionString String rm-***********.mysql.rds.aliyuncs.com

The endpoint of the instance.

NetType String Private

The network type of the endpoint. Valid values:

  • Public: the public endpoint
  • Private: the internal endpoint (VPC)
  • Inner: the internal endpoint (classic network)
Port String 3306

The port number of the instance.

VPCId String vpc-************

The VPC ID of the instance.

IPAddress String 172.***.***.173

The IP address of the instance.

SSLEnabled String Enabled

Indicates whether SSL encryption is enabled. Valid values:

  • Enabled
  • Disabled
DBEndpointId String rm-************-normal

The ID of the endpoint.

EndpointType String Normal

The type of the endpoint. Valid values:

  • Normal: the standard endpoint
  • ReadWriteSplitting: the read/write splitting endpoint
SrcDbType String PolarDBMySQL

The type of the source database. Valid values:

  • PolarDBMySQL: The source database is a PolarDB for MySQL database when the major version of your PolarDB cluster is upgraded.
  • RDS: The source database is an ApsaraDB RDS database when data is migrated from ApsaraDB RDS to PolarDB for MySQL.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/?Action=DescribeDBClusterMigration
&DBClusterId=pc-**************
&<Common request parameters>

Sample success responses

XML format

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

<DescribeDBClusterMigrationResponse>
    <DBClusterEndpointList>
        <AddressItems>
            <VSwitchId>vsw-**********</VSwitchId>
            <ConnectionString>pc-**************.rwlb.rds.aliyuncs.com</ConnectionString>
            <NetType>Private</NetType>
            <Port>3306</Port>
            <VPCId>vpc-**********</VPCId>
            <IPAddress>192.***.***.10</IPAddress>
            <SSLEnabled>"true"</SSLEnabled>
        </AddressItems>
        <DBEndpointId>pe-***********</DBEndpointId>
        <EndpointType>Cluster</EndpointType>
    </DBClusterEndpointList>
    <Comment>test</Comment>
    <RequestId>F2A9EFA7-915F-4572-8299-85A307******</RequestId>
    <ExpiredTime>2020-06-17T01:56:36Z</ExpiredTime>
    <DBClusterId>pc-****************</DBClusterId>
    <Topologies>RDS2POLARDB</Topologies>
    <RdsReadWriteMode>rw</RdsReadWriteMode>
    <SourceRDSDBInstanceId>rm-************</SourceRDSDBInstanceId>
    <DBClusterReadWriteMode>ro</DBClusterReadWriteMode>
    <DelayedSeconds>0</DelayedSeconds>
    <MigrationStatus>RDS2POLARDB_SYNCING</MigrationStatus>
    <DtsInstanceId>dts**********618bs</DtsInstanceId>
    <RdsEndpointList>
        <AddressItems>
            <VSwitchId>vsw-**************</VSwitchId>
            <ConnectionString>rm-***********.mysql.rds.aliyuncs.com</ConnectionString>
            <NetType>Private</NetType>
            <Port>3306</Port>
            <VPCId>vpc-************</VPCId>
            <IPAddress>172.***.***.173</IPAddress>
            <SSLEnabled>"true"</SSLEnabled>
        </AddressItems>
        <DBEndpointId>rm-************-normal</DBEndpointId>
        <EndpointType>Normal</EndpointType>
    </RdsEndpointList>
</DescribeDBClusterMigrationResponse>

JSON format

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

{
  "DBClusterEndpointList" : [ {
    "AddressItems" : [ {
      "VSwitchId" : "vsw-**********",
      "ConnectionString" : "pc-**************.rwlb.rds.aliyuncs.com",
      "NetType" : "Private",
      "Port" : "3306",
      "VPCId" : "vpc-**********",
      "IPAddress" : "192.***.***.10",
      "SSLEnabled" : "\"true\""
    } ],
    "DBEndpointId" : "pe-***********",
    "EndpointType" : "Cluster"
  } ],
  "Comment" : "test",
  "RequestId" : "F2A9EFA7-915F-4572-8299-85A307******",
  "ExpiredTime" : "2020-06-17T01:56:36Z",
  "DBClusterId" : "pc-****************",
  "Topologies" : "RDS2POLARDB",
  "RdsReadWriteMode" : "rw",
  "SourceRDSDBInstanceId" : "rm-************",
  "DBClusterReadWriteMode" : "ro",
  "DelayedSeconds" : 0,
  "MigrationStatus" : "RDS2POLARDB_SYNCING",
  "DtsInstanceId" : "dts**********618bs",
  "RdsEndpointList" : [ {
    "AddressItems" : [ {
      "VSwitchId" : "vsw-**************",
      "ConnectionString" : "rm-***********.mysql.rds.aliyuncs.com",
      "NetType" : "Private",
      "Port" : "3306",
      "VPCId" : "vpc-************",
      "IPAddress" : "172.***.***.173",
      "SSLEnabled" : "\"true\""
    } ],
    "DBEndpointId" : "rm-************-normal",
    "EndpointType" : "Normal"
  } ]
}

Error codes

HTTP status code Error code Error message Description
404 InvalidDBClusterId.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified cluster ID does not exist in the current record.

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