All Products
Search
Document Center

ApsaraDB for MongoDB:MigrateAvailableZone

Last Updated:Mar 15, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
dds:MigrateAvailableZoneWRITE
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the instance.

Note If the instance is deployed in a VPC, you must specify the Vswitch parameter.
dds-bp1ece71ff2f****
ZoneIdstringYes

The ID of the destination zone.

Note
  • The source zone and the destination zone belong to the same region.

  • You can call the DescribeRegions operation to query the zone ID.

cn-hangzhou-b
VswitchstringNo

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****
EffectiveTimestringNo

The time when the instance is migrated to the destination zone. Valid values:

  • Immediately: The instance is immediately migrated to the destination zone.
  • MaintainTime: The instance is migrated to the destination zone during the maintenance window of the instance.

Default value: Immediately.

Immediately

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

0FDDC511-7252-4A4A-ADDA-5CB1BF63****

Examples

Sample success responses

JSONformat

{
  "RequestId": "0FDDC511-7252-4A4A-ADDA-5CB1BF63****"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidEffectiveTime.MalformedSpecified EffectiveTime is not valid.-
400InsType.NotSupportSpecified instance type dose not support this operation.-
400IncorrectMasterDBInstanceStateThe Master instance state does not support this operation.-
400NetworkTypeNotSupportThe network type does not support this operation.The network type does not support this operation.
400OperationDenied.LockModeThe operation is not permitted when the instance locked.The operation is not supported while the instance is locked.
400InvalidIzNo.NotSupportedthe Specified vpc Zone not supported.-
400IncorrectVswitchIdThe specified parameter 'VSwitchId' is not valid.-
400InvalidRegion_Zone_NotFoundSpecified Region does not exist in RDS.-
400VPCERROR.ALLOCATE_ERRORCannot Allocate the require vpcInstances.-
400ProxyErrorThe request processing has failed due to some unknown error, exception or failure.-
400DbInsertErrorDatabase insert error.-
400UnsupportedDBTdeStatusSpecified DB TDEStatus does not support this operation.TDE already enabled for the specified instance.
404InvalidDbInstanceId.NotFoundSpecified 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 timeSummary of changesOperation
2024-03-13The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Category
2023-07-13The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404