All Products
Search
Document Center

PolarDB:DescribeDBClusterMigration

Last Updated:Mar 01, 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

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
polardb:DescribeDBClusterMigrationREAD
  • dbcluster
    acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the cluster.

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

Response parameters

ParameterTypeDescriptionExample
object
DBClusterEndpointListobject []

The endpoints of the PolarDB cluster.

AddressItemsobject []

Details about the endpoints.

VSwitchIdstring

The vSwitch ID.

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

The connection string.

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 cluster endpoint
Cluster
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
RdsEndpointListobject []

The endpoints of the ApsaraDB RDS instance.

AddressItemsobject []

Details about the endpoints.

VSwitchIdstring

The vSwitch ID.

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

The connection string.

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
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"
    }
  ],
  "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"
    }
  ],
  "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 changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.
2022-09-08The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.
2022-07-06The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.