All Products
Search
Document Center

PolarDB:DescribeDBClusterMigration

Last Updated:Jul 17, 2024

Queries the migration status of PolarDB clusters.

Operation description

  • 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 Upgrade ApsaraDB RDS for MySQL to PolarDB for MySQL with one click.
  • 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.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the cluster.

pc-**************

Response parameters

ParameterTypeDescriptionExample
object
DBClusterEndpointListarray<object>

The endpoints of the PolarDB cluster.

object
AddressItemsarray<object>

Details about the endpoints.

object
VSwitchIdstring

The vSwitch ID.

vsw-**********
ConnectionStringstring

The endpoint.

pc-**************.rwlb.rds.aliyuncs.com
NetTypestring

The network type of the endpoint. Valid values:

  • Public: the public endpoint
  • Private: the internal endpoint (VPC)
  • Inner: the internal endpoint (classic network)
Private
Portstring

The port number.

3306
VPCIdstring

The VPC ID.

vpc-**********
IPAddressstring

The IP address of the endpoint.

192.***.***.10
SSLEnabledstring

Indicates whether SSL encryption is enabled. Valid values:

  • Enabled
  • Disabled
Enabled
DBEndpointIdstring

The ID of the endpoint.

pe-***********
EndpointTypestring

The type of the endpoint. Valid values:

  • Cluster: the default cluster endpoint
  • Primary: the primary endpoint
  • Custom: the custom endpoint
Cluster
ReadWriteModestring

The read/write mode. Valid values:

  • ReadWrite: receives and forwards read and write requests (automatic read-write splitting).
  • ReadOnly (default): receives and forwards read requests only.
ReadOnly
Commentstring

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

test
RequestIdstring

The ID of the request.

F2A9EFA7-915F-4572-8299-85A307******
ExpiredTimestring

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.

2020-06-17T01:56:36Z
DBClusterIdstring

The ID of the cluster.

pc-****************
Topologiesstring

The synchronization direction. Valid values:

  • RDS2POLARDB: Data is replicated from an ApsaraDB RDS instance to a PolarDB cluster.
  • POLARDB2RDS: Data is replicated from a PolarDB cluster to an ApsaraDB RDS instance.
RDS2POLARDB
RdsReadWriteModestring

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

  • rw: read and write mode
  • ro: read-only mode
rw
SourceRDSDBInstanceIdstring

The ID of the source ApsaraDB RDS instance.

rm-************
DBClusterReadWriteModestring

The mode of the PolarDB cluster. Valid values:

  • rw: read and write mode
  • ro: read-only mode
ro
DelayedSecondsinteger

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

0
MigrationStatusstring

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.
RDS2POLARDB_SYNCING
DtsInstanceIdstring

The ID of the synchronous task.

dts**********618bs
RdsEndpointListarray<object>

The endpoints of the ApsaraDB RDS instance.

object
AddressItemsarray<object>

Details about the endpoints.

object
VSwitchIdstring

The vSwitch ID.

vsw-**************
ConnectionStringstring

The endpoint.

rm-***********.mysql.rds.aliyuncs.com
NetTypestring

The network type of the endpoint. Valid values:

  • Public: the public endpoint
  • Private: the internal endpoint (VPC)
  • Inner: the internal endpoint (classic network)
Private
Portstring

The port number.

3306
VPCIdstring

The VPC ID.

vpc-************
IPAddressstring

The IP address of the endpoint.

172.***.***.173
SSLEnabledstring

Indicates whether SSL encryption is enabled. Valid values:

  • Enabled
  • Disabled
Enabled
DBEndpointIdstring

The ID of the endpoint.

rm-************-normal
EndpointTypestring

The type of the endpoint. Valid values:

  • Normal: the standard endpoint
  • ReadWriteSplitting: the read/write splitting endpoint
Normal
CustinsTypestring

The type of the source database.

SrcDbTypestring

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.
PolarDBMySQL

Examples

Sample success responses

JSONformat

{
  "DBClusterEndpointList": [
    {
      "AddressItems": [
        {
          "VSwitchId": "vsw-**********",
          "ConnectionString": "pc-**************.rwlb.rds.aliyuncs.com",
          "NetType": "Private",
          "Port": "3306",
          "VPCId": "vpc-**********",
          "IPAddress": "192.***.***.10",
          "SSLEnabled": "Enabled"
        }
      ],
      "DBEndpointId": "pe-***********",
      "EndpointType": "Cluster",
      "ReadWriteMode": "ReadOnly"
    }
  ],
  "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": "Enabled"
        }
      ],
      "DBEndpointId": "rm-************-normal",
      "EndpointType": "Normal",
      "CustinsType": ""
    }
  ],
  "SrcDbType": "PolarDBMySQL"
}

Error codes

HTTP status codeError codeError messageDescription
404InvalidDBClusterId.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.

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

Change history

Change timeSummary of changesOperation
2023-12-22The Error code has changed. The response structure of the API has changedView Change Details
2022-09-08The Error code has changed. The response structure of the API has changedView Change Details
2022-07-06The response structure of the API has changedView Change Details