You can call this operation to change the zone of an ApsaraDB for MongoDB instance.
This operation is applicable only to replica set instances, but not to standalone and sharded cluster instances.
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-bpxxxxxxxx |
The ID of the instance. Note You must specify the Vswitch parameter if the network type of the instance is VPC.
|
ZoneId | String | Yes | cn-hangzhou-b |
The ID of the new zone. Note
|
Vswitch | String | No | vsw-bpxxxxxxxx |
The ID of the vSwitch in the new zone. Note This parameter can be used only when the network type of the instance is VPC.
|
EffectiveTime | String | No | Immediately |
The time when the instance is migrated to the new zone. Valid values:
Default value: Immediately. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 0FDDC511-7252-4A4A-ADDA-5CB1BF63873D |
The ID of the request. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/? Action=MigrateAvailableZone
&DBInstanceId=dds-bpxxxxxxxx
&ZoneId=cn-hangzhou-b
&EffectiveTime=Immediately
&<Common request parameters>
Sample success responses
XML
format
<MigrateAvailableZoneResponse>
<RequestId>0FDDC511-7252-4A4A-ADDA-5CB1BF63873D</RequestId>
</MigrateAvailableZoneResponse>
JSON
format
{
"RequestId": "0FDDC511-7252-4A4A-ADDA-5CB1BF63873D"
}
Error codes
For a list of error codes, visit the API Error Center.