You can call this operation to query the data migration status of an Apsara PolarDB cluster.

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-bpxxxxxxx

The ID of the Apsara PolarDB cluster.

RegionId String No cn-hangzhou

The ID of the region, for example, cn-hangzhou.

Response parameters

Parameter Type Example Description
Comment String xxxxxx

The description of a migration exception.

DBClusterEndpointList Array

The endpoints of the Apsara PolarDB cluster.

AddressItems Array

The connection string information.

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

The connection string of the cluster.

IPAddress String 192.xx.xx.10

The IP address.

NetType String Private

The network type of the endpoint. Valid values:

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

The port number of the endpoint.

VPCId String vpc-bpxxxxxxxxxx

The ID of the VPC network.

VSwitchId String vsw-bpxxxxxxxxxx

The ID of the VSwitch.

DBEndpointId String pe-bpxxxxxxxxxx

The ID of the endpoint for the Apsara PolarDB cluster.

EndpointType String Cluster

The type of the endpoint. Valid values:

  • Cluster: default endpoint
  • Primary: primary endpoint
  • Custom: custom endpoint
DBClusterId String pc-bpxxxxxxx

The ID of the Apsara PolarDB cluster.

DBClusterReadWriteMode String ro

The mode of the Apsara PolarDB cluster. Valid values:

  • rw: read/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 status of the migration. 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/write mode.
  • SWITCHING: Databases are being switched.
  • POLARDB2RDS_SYNCING: Databases are switched. The Apsara PolarDB cluster is running in read/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

The endpoints of the ApsaraDB for RDS cluster.

AddressItems Array

The connection string information.

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

The connection string of the cluster.

IPAddress String 172.xx.xx.173

The IP address.

NetType String Private

The network type of the endpoint. Valid values:

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

The port number of the endpoint.

VPCId String vpc-bpxxxxxxxxxxxx

The ID of the VPC network.

VSwitchId String vsw-bpxxxxxxxxxx

The ID of the VSwitch.

DBEndpointId String rm-bpxxxxxxxxx-normal

The ID of the endpoint for the Apsara PolarDB cluster.

EndpointType String Normal

The type of the endpoint. Valid values:

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

The mode of the source ApsaraDB for RDS instance.

  • rw: read/write mode
  • ro: read-only mode
RequestId String F2A9EFA7-915F-4572-8299-85A307F6A658

The ID of the request.

SourceRDSDBInstanceId String rm-bpxxxxxxxxxx

The ID of the source ApsaraDB for RDS instance.

Topologies String RDS2POLARDB

The replication direction. 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 requests

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

Sample success responses

XML format

<DBClusterEndpointList>
    <DBEndpointId>pe-bpxxxxxxxxxx</DBEndpointId>
    <EndpointType>Cluster</EndpointType>
    <AddressItems>
        <VPCId>vpc-bpxxxxxxxxxx</VPCId>
        <Port>3306</Port>
        <VSwitchId>vsw-bpxxxxxxxxxx</VSwitchId>
        <ConnectionString>pc-bpxxxxxxxxxx.rwlb.rds.aliyuncs.com</ConnectionString>
        <IPAddress>192.xx.xx.10</IPAddress>
        <NetType>Private</NetType>
    </AddressItems>
</DBClusterEndpointList>
<DBClusterEndpointList>
    <DBEndpointId>pe-bpxxxxxxxxxxx</DBEndpointId>
    <EndpointType>Primary</EndpointType>
    <AddressItems>
        <VPCId>vpc-bpxxxxxxxxxx</VPCId>
        <Port>3306</Port>
        <VSwitchId>vsw-bpxxxxxxxxxx</VSwitchId>
        <ConnectionString>pc-bpxxxxxxxxxx.mysql.polardb.rds.aliyuncs.com</ConnectionString>
        <IPAddress>192.xx.xx.4</IPAddress>
        <NetType>Private</NetType>
    </AddressItems>
</DBClusterEndpointList>
<Comment/>
<RequestId>F2A9EFA7-915F-4572-8299-85A307F6A658</RequestId>
<ExpiredTime>2020-06-17T01:56:36Z</ExpiredTime>
<DBClusterId>pc-bpxxxxxxx</DBClusterId>
<Topologies>RDS2POLARDB</Topologies>
<RdsReadWriteMode>rw</RdsReadWriteMode>
<SourceRDSDBInstanceId>rm-bpxxxxxxxxxx</SourceRDSDBInstanceId>
<DBClusterReadWriteMode>ro</DBClusterReadWriteMode>
<DelayedSeconds>0</DelayedSeconds>
<MigrationStatus>RDS2POLARDB_SYNCING</MigrationStatus>
<RdsEndpointList>
    <DBEndpointId>rm-bpxxxxxxxxx-normal</DBEndpointId>
    <EndpointType>Normal</EndpointType>
    <AddressItems>
        <VPCId>vpc-bpxxxxxxxxxxxx</VPCId>
        <Port>3306</Port>
        <VSwitchId>vsw-bpxxxxxxxxxx</VSwitchId>
        <ConnectionString>rm-bpxxxxxxxxxx.mysql.rds.aliyuncs.com</ConnectionString>
        <IPAddress>172.xx.xx.173</IPAddress>
        <NetType>Private</NetType>
    </AddressItems>
</RdsEndpointList>
<RdsEndpointList>
    <DBEndpointId>rm-bpxxxxxxxxx-normal</DBEndpointId>
    <EndpointType>Normal</EndpointType>
    <AddressItems>
        <VPCId/>
        <Port>3306</Port>
        <VSwitchId/>
        <ConnectionString>rm-bpxxxxxxxxxx.mysql.rds.aliyuncs.com</ConnectionString>
        <IPAddress>101.xx.xx.19</IPAddress>
        <NetType>Public</NetType>
    </AddressItems>
</RdsEndpointList>

JSON format

{
	"DBClusterEndpointList": [
		{
			"DBEndpointId": "pe-bpxxxxxxxxxx",
			"EndpointType": "Cluster",
			"AddressItems": [
				{
					"VPCId": "vpc-bpxxxxxxxxxx",
					"Port": "3306",
					"VSwitchId": "vsw-bpxxxxxxxxxx",
					"ConnectionString": "pc-bpxxxxxxxxxx.rwlb.rds.aliyuncs.com",
					"IPAddress": "192.xx.xx.10",
					"NetType": "Private"
				}
			]
		},
		{
			"DBEndpointId": "pe-bpxxxxxxxxxxx",
			"EndpointType": "Primary",
			"AddressItems": [
				{
					"VPCId": "vpc-bpxxxxxxxxxx",
					"Port": "3306",
					"VSwitchId": "vsw-bpxxxxxxxxxx",
					"ConnectionString": "pc-bpxxxxxxxxxx.mysql.polardb.rds.aliyuncs.com",
					"IPAddress": "192.xx.xx.4",
					"NetType": "Private"
				}
			]
		}
	],
	"Comment": "",
	"RequestId": "F2A9EFA7-915F-4572-8299-85A307F6A658",
	"ExpiredTime": "2020-06-17T01:56:36Z",
	"DBClusterId": "pc-bpxxxxxxx",
	"Topologies": "RDS2POLARDB",
	"RdsReadWriteMode": "rw",
	"SourceRDSDBInstanceId": "rm-bpxxxxxxxxxx",
	"DBClusterReadWriteMode": "ro",
	"DelayedSeconds": 0,
	"MigrationStatus": "RDS2POLARDB_SYNCING",
	"RdsEndpointList": [
		{
			"DBEndpointId": "rm-bpxxxxxxxxx-normal",
			"EndpointType": "Normal",
			"AddressItems": [
				{
					"VPCId": "vpc-bpxxxxxxxxxxxx",
					"Port": "3306",
					"VSwitchId": "vsw-bpxxxxxxxxxx",
					"ConnectionString": "rm-bpxxxxxxxxxx.mysql.rds.aliyuncs.com",
					"IPAddress": "172.xx.xx.173",
					"NetType": "Private"
				}
			]
		},
		{
			"DBEndpointId": "rm-bpxxxxxxxxx-normal",
			"EndpointType": "Normal",
			"AddressItems": [
				{
					"VPCId": "",
					"Port": "3306",
					"VSwitchId": "",
					"ConnectionString": "rm-bpxxxxxxxxxx.mysql.rds.aliyuncs.com",
					"IPAddress": "101.xx.xx.19",
					"NetType": "Public"
				}
			]
		}
	]
}

Error codes

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