Migrates an ApsaraDB for Redis instance to another zone in the same region.
Operation description
Before you call this operation, you must release the public endpoint (if any) of the instance. For more information, see Migrate an instance across zones.
-
If the network type of an ApsaraDB for Redis instance is switched from classic network to Virtual Private Cloud (VPC), and the classic network endpoint is retained, you can migrate the instance across zones only after the classic network endpoint is released upon expiration.
-
After the instance is migrated, the endpoint of the instance remains unchanged. However, the virtual IP address (VIP) is changed. We recommend that you use the endpoint instead of the VIP to connect to the instance.
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 |
---|---|---|---|---|
kvstore:MigrateToOtherZone | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The ID of the ApsaraDB for Redis instance. | r-bp1zxszhcgatnx**** |
ZoneId | string | Yes | The ID of the destination primary zone. You can call the DescribeZones operation to query zone IDs. | cn-hangzhou-g |
VSwitchId | string | No | The ID of the vSwitch. Note
| vsw-bp1e7clcw529l773d**** |
EffectiveTime | string | No | Specifies the time when the database is switched after data is migrated. Valid values:
Note
Default value: Immediately.
| Immediately |
SecondaryZoneId | string | No | The ID of the destination secondary zone. You can call the DescribeZones operation to query zone IDs. Note
You can specify this parameter to deploy the master node and replica node in different zones to implement zone-disaster recovery. This helps withstand data center-level breakdowns.
| cn-hangzhou-h |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "29B0BF34-D069-4495-92C7-FA6D9452****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | NetworkType.NotSupport | Specified network type does not support this operation. | The operation cannot be performed on an instance that has a public endpoint or a private endpoint. Release the endpoint and try again. |
400 | InstanceStatus.NotSupport | Instance status does not support this operation. | The error message returned because the operation is not supported while the instance is in the current state. |
400 | MissingSwitchId | VSwitchId is mandatory for this action. | - |
400 | IzNotSupportVpcError | Specify zone not support VPC. | - |
400 | InvalidReginAvzNotFound | Specified user does not find the region and zone. | - |
400 | ClusterNotSupport | The Specified cluster does not support. | - |
400 | InvalidVSwitchId.Mismatch | The Specified vSwitchId does not matched VPC. | The specified vSwitch does not belong to the specified VPC. Check the vSwitch settings. |
400 | InvalidIzNo.NotSupported | The Specified Zone does not supported. | - |
404 | DBInstanceNotFound | Specified instance does not exist. | - |
500 | VpcServiceError | Invoke VPC service failed. | - |
500 | ZoneMigrationError.StillingRunning | Zone migration task is still running. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-07-20 | API Description Update. The Error code has changed | View Change Details |