Migrates an ApsaraDB for MongoDB instance to a specific zone.
Operation description
- 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 ApsaraDB for MongoDB 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
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dds:MigrateAvailableZone | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The ID of the instance. Note
If the instance is deployed in a VPC, you must specify the Vswitch parameter.
| dds-bp1ece71ff2f**** |
ZoneId | string | Yes | The ID of the destination zone. Note
| cn-hangzhou-b |
Vswitch | string | No | The ID of the vSwitch in the destination zone. Note
If the instance is deployed in a VPC, you must specify this parameter.
| vsw-bp1buy0h9myt5i9e7**** |
EffectiveTime | string | No | The time when the instance is migrated to the destination zone. Valid values:
Default value: Immediately. | Immediately |
SecondaryZoneId | string | No | The ID of the destination secondary zone. | cn-hangzhou-h |
HiddenZoneId | string | No | The ID of the destination hidden zone. | cn-shanghai-n |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "0FDDC511-7252-4A4A-ADDA-5CB1BF63****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidEffectiveTime.Malformed | Specified EffectiveTime is not valid. | - |
400 | InsType.NotSupport | Specified instance type dose not support this operation. | - |
400 | IncorrectMasterDBInstanceState | The Master instance state does not support this operation. | - |
400 | NetworkTypeNotSupport | The network type does not support this operation. | The network type does not support this operation. |
400 | OperationDenied.LockMode | The operation is not permitted when the instance locked. | The operation is not supported while the instance is locked. |
400 | InvalidIzNo.NotSupported | the Specified vpc Zone not supported. | - |
400 | IncorrectVswitchId | The specified parameter 'VSwitchId' is not valid. | - |
400 | InvalidRegion_Zone_NotFound | Specified Region does not exist in RDS. | - |
400 | VPCERROR.ALLOCATE_ERROR | Cannot Allocate the require vpcInstances. | - |
400 | ProxyError | The request processing has failed due to some unknown error, exception or failure. | - |
400 | DbInsertError | Database insert error. | - |
400 | UnsupportedDBTdeStatus | Specified DB TDEStatus does not support this operation. | TDE already enabled for the specified instance. |
400 | InvalidZoneParam | The target zone and source zone cannot be the same. | The destination zone cannot be the same as the original zone. |
404 | InvalidDbInstanceId.NotFound | Specified instance does not exist. | Instance not found. Refresh the page to check whether the instance has been released. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-07-25 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-04-08 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-03-13 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-07-13 | The Error code has changed | View Change Details |