You can call this operation to perform one of the following operations:

  • Migrate data from ApsaraDB for RDS to Apsara PolarDB.
  • Roll back data migration from Apsara PolarDB to ApsaraDB for RDS.

For more information, see Upgrade ApsaraDB 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 ModifyDBClusterMigration

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

DBClusterId String Yes pc-bpxxxxxxx

The ID of the Apsara PolarDB cluster.

NewMasterInstanceId String Yes pc-bpxxxxxxx

The ID of the destination primary instance.

  • To perform a data migration, enter the ID of the Apsara PolarDB cluster.
  • To perform a migration rollback, enter the ID of the ApsaraDB for RDS instance.
SourceRDSDBInstanceId String Yes rm-bpxxxxxxx

The ID of the source ApsaraDB for RDS instance.

RegionId String No cn-hangzhou

The ID of the region.

SwapConnectionString String No false

Specified whether to interchange the endpoints of the instances. Valid values:

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

Default value: false.

Response parameters

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

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<ModifyDBClusterMigrationResponse>  
  <RequestId>A1B303A5-653F-4AEE-A598-023FF966C1E0</RequestId>
</ModifyDBClusterMigrationResponse>

JSON format

{
  "RequestId": "A1B303A5-653F-4AEE-A598-023FF966C1E0"
}

Error codes

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