Switches or rolls back the task that migrates data from ApsaraDB for RDS to PolarDB.

  • Migrate data from ApsaraDB for RDS to PolarDB.
  • Roll back data migration from PolarDB to ApsaraDB for RDS.
Note Before you call this operation, ensure 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. For more information, see Create a PolarDB for MySQL cluster by using the Migration from RDS method.


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 ModifyDBClusterMigration

The operation that you want to perform. Set this parameter to ModifyDBClusterMigration.

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

The ID of the cluster.

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

The ID of the source ApsaraDB for RDS instance.

NewMasterInstanceId String Yes pc-**************

The ID of the new instance or new cluster. Valid values:

  • To perform a data migration, enter the ID of the PolarDB cluster.
  • To perform a migration rollback, enter the ID of the ApsaraDB for RDS instance.
SwapConnectionString String No false

Specifies whether to switch the endpoints of the instances. Valid values:

  • true: switches the endpoints. If you select this option, you do not need the change the endpoint in your applications.
  • false: does not switch the endpoints. If you select this option, you must specify the endpoint of the PolarDB cluster in your applications.

Default value: false.

ConnectionStrings String No {"rm-2ze73el581cs*****.mysql.pre.rds.aliyuncs.com":"pc-2ze8200s298e*****.mysql.polardb.pre.rds.aliyuncs.com","rm-2ze73el581cs86*****.mysql.pre.rds.aliyuncs.com":"test-p*****.mysql.polardb.pre.rds.aliyuncs.com"}

The endpoints to be switched. The endpoints are in the JSON format.

Note This parameter is valid when the SwapConnectionString parameter is set to true.

Response parameters

Parameter Type Example Description
RequestId String A1B303A5-653F-4AEE-A598-023FF9******

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "A1B303A5-653F-4AEE-A598-023FF9******"

Error codes

HttpCode Error code Error message Description
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified DBClusterId does not exist in the current record.

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