Queries the migration status of PolarDB clusters.

  • You can call this operation to query the status of data migration from an ApsaraDB for RDS cluster to an Apsara PolarDB cluster. For more information, see Upgrade RDS for MySQL to PolarDB for MySQL with one click.
  • Before you call this operation, make sure that you have created an upgrade task 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 No DescribeDBClusterMigration

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

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

The ID of the PolarDB cluster whose node is to be deleted.

RegionId String No cn-hangzhou

The ID of the region where the DRDS database is located.

Response parameters

Parameter Type Example Description
Comment String test

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

DBClusterEndpointList Array of DBClusterEndpoint

The endpoints of the Apsara PolarDB cluster.

AddressItems Array of Address

The details of the connection string.

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

The connection string.

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

The IP address.

NetType String Private

The network type of the connection string. Valid values:

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

The port number.

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

The ID of the VPC.

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

The ID of the vSwitch.

DBEndpointId String pe-***********

The ID of the endpoint.

EndpointType String Cluster

The type of the endpoint. Valid values:

  • Cluster: default endpoint
  • Primary: primary endpoint
  • Custom: the custom cluster endpoint
DBClusterId String pc-****************

The ID of the cluster.

DBClusterReadWriteMode String ro

The cluster mode. Valid values:

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

The replication latency between ApsaraDB for RDS and Apsara PolarDB. Unit: seconds.

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

The expiration time of the replication between ApsaraDB for RDS and Apsara PolarDB. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.

MigrationStatus String RDS2POLARDB_SYNCING

The migration status 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 Apsara PolarDB cluster is running in read-only mode and the source ApsaraDB for RDS instance is running in read and write mode.
  • SWITCHING: Databases are being switched.
  • POLARDB2RDS_SYNCING: Databases are switched. The Apsara PolarDB cluster is running in read and write mode and the source ApsaraDB for RDS instance is running in read-only mode. You can change the endpoint in your application.
  • 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 closed.
RdsEndpointList Array of RdsEndpoint

The endpoints of the ApsaraDB for RDS cluster.

AddressItems Array of Address

The details of the connection string.

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

The connection string.

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

The IP address.

NetType String Private

The network type of the connection string. Valid values:

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

The port number.

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

The ID of the VPC.

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

The ID of the vSwitch.

DBEndpointId String rm-************-normal

The ID of the endpoint.

EndpointType String Normal

The type of the endpoint. Valid values:

  • Normal: standard endpoint
  • ReadWriteSplitting: read-write splitting endpoint
RdsReadWriteMode String rw

The RDS mode. Valid values:

  • rw: read and write mode
  • ro: read-only mode
RequestId String F2A9EFA7-915F-4572-8299-85A307******

The ID of the request.

SourceRDSDBInstanceId String rm-************

The ID of the source ApsaraDB for RDS instance.

Topologies String RDS2POLARDB

The synchronization status. Valid values:

  • RDS2POLARDB: Data is replicated from ApsaraDB for RDS to Apsara PolarDB.
  • POLARDB2RDS: Data is replicated from Apsara PolarDB to ApsaraDB for RDS.

Examples

Sample request

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

Sample success responses

XML format

<DBClusterEndpointList>
    <DBEndpointId>pe-***********</DBEndpointId>
    <EndpointType>Cluster</EndpointType>
    <AddressItems>
        <VPCId>vpc-************</VPCId>
        <Port>3306</Port>
        <VSwitchId>vsw-************</VSwitchId>
        <ConnectionString>pc-************.rwlb.rds.aliyuncs.com</ConnectionString>
        <IPAddress>192. ***. ***.10</IPAddress>
        <NetType>Private</NetType>
    </AddressItems>
</DBClusterEndpointList>
<DBClusterEndpointList>
    <DBEndpointId>pe-************</DBEndpointId>
    <EndpointType>Primary</EndpointType>
    <AddressItems>
        <VPCId>vpc-************</VPCId>
        <Port>3306</Port>
        <VSwitchId>vsw-************</VSwitchId>
        <ConnectionString>pc-************.mysql.polardb.rds.aliyuncs.com</ConnectionString>
        <IPAddress>192. ***. ***.4</IPAddress>
        <NetType>Private</NetType>
    </AddressItems>
</DBClusterEndpointList>
<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>
<RdsEndpointList>
    <DBEndpointId>rm-************-normal</DBEndpointId>
    <EndpointType>Normal</EndpointType>
    <AddressItems>
        <VPCId>vpc-************</VPCId>
        <Port>3306</Port>
        <VSwitchId>vsw-************</VSwitchId>
        <ConnectionString>rm-************.mysql.rds.aliyuncs.com</ConnectionString>
        <IPAddress>172. ***. ***.173</IPAddress>
        <NetType>Private</NetType>
    </AddressItems>
</RdsEndpointList>
<RdsEndpointList>
    <DBEndpointId>rm-************-normal</DBEndpointId>
    <EndpointType>Normal</EndpointType>
    <AddressItems>
        <VPCId/>
        <Port>3306</Port>
        <VSwitchId/>
        <ConnectionString>rm-************.mysql.rds.aliyuncs.com</ConnectionString>
        <IPAddress>101. ***. ***.19</IPAddress>
        <NetType>Public</NetType>
    </AddressItems>
</RdsEndpointList>

JSON format

{
    "DBClusterEndpointList": [
        {
            "DBEndpointId": "pe-***********",
            "EndpointType": "Cluster",
            "AddressItems": {
                "VPCId": "vpc-************",
                "Port": 3306,
                "VSwitchId": "vsw-************",
                "ConnectionString": "pc-************.rwlb.rds.aliyuncs.com",
                "IPAddress": "192. ***. ***.10",
                "NetType": "Private"
            }
        },
        {
            "DBEndpointId": "pe-************",
            "EndpointType": "Primary",
            "AddressItems": {
                "VPCId": "vpc-************",
                "Port": 3306,
                "VSwitchId": "vsw-************",
                "ConnectionString": "pc-************.mysql.polardb.rds.aliyuncs.com",
                "IPAddress": "192. ***. ***.4",
                "NetType": "Private"
            }
        }
    ],
    "Comment": "",
    "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",
    "RdsEndpointList": [
        {
            "DBEndpointId": "rm-************-normal",
            "EndpointType": "Normal",
            "AddressItems": {
                "VPCId": "vpc-************",
                "Port": 3306,
                "VSwitchId": "vsw-************",
                "ConnectionString": "rm-************.mysql.rds.aliyuncs.com",
                "IPAddress": "172. ***. ***.173",
                "NetType": "Private"
            }
        },
        {
            "DBEndpointId": "rm-************-normal",
            "EndpointType": "Normal",
            "AddressItems": {
                "VPCId": "",
                "Port": 3306,
                "VSwitchId": "",
                "ConnectionString": "rm-************.mysql.rds.aliyuncs.com",
                "IPAddress": "101. ***. ***.19",
                "NetType": "Public"
            }
        }
    ]
}

Error codes

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