Migrates an ApsaraDB for MongoDB instance to a specified destination zone.
Precautions
- This operation is available only for replica set instances that run MongoDB 4.2 or earlier and sharded cluster instances.
- If you have applied for a public endpoint for the ApsaraDB for MongoDB instance, you must call the ReleasePublicNetworkAddress operation to release the public endpoint before you call the MigrateAvailableZone operation.
- Transparent data encryption (TDE) is disabled for the instance.
- The source zone and the destination zone belong to the same region.
- A vSwitch is created in the destination zone. This prerequisite must be met if the instance resides in a virtual private cloud (VPC). For more information about how to create a vSwitch, see Work with vSwitches.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | MigrateAvailableZone |
The operation that you want to perform. Set the value to MigrateAvailableZone. |
DBInstanceId | String | Yes | dds-bp1ece71ff2f**** |
The ID of the instance. Note If the instance is deployed in a VPC, you must specify the Vswitch parameter.
|
ZoneId | String | Yes | cn-hangzhou-b |
The ID of the destination zone. Note
|
Vswitch | String | No | vsw-bp1buy0h9myt5i9e7**** |
The ID of the vSwitch in the destination zone. Note If the instance is deployed in a VPC, you must specify this parameter.
|
EffectiveTime | String | No | Immediately |
The time when the instance is migrated to the destination zone. Valid values:
Default value: Immediately. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 0FDDC511-7252-4A4A-ADDA-5CB1BF63**** |
The ID of the request. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/?Action=MigrateAvailableZone
&DBInstanceId=dds-bp1ece71ff2f****
&ZoneId=cn-hangzhou-b
&EffectiveTime=Immediately
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<MigrateAvailableZoneResponse>
<RequestId>0FDDC511-7252-4A4A-ADDA-5CB1BF63****</RequestId>
</MigrateAvailableZoneResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "0FDDC511-7252-4A4A-ADDA-5CB1BF63****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | UnsupportedDBTdeStatus | Specified DB TDEStatus does not support this operation. | The error message returned because TDE is enabled for the instance. |
For a list of error codes, visit the API Error Center.