MigrateToOtherZone
Migrates nodes in a zone to a destination zone.
Operation description
When you upgrade an instance and encounter insufficient inventory for the instance type in the current zone, you can migrate nodes to another zone to resolve the issue. Before you call this operation, make sure that the following requirements are met:
-
Your account has zones with sufficient resources.
After you migrate nodes of the current instance type to another zone, you must manually upgrade the cluster. The cluster is not upgraded during the migration process. Therefore, select a zone with sufficient resources to prevent cluster upgrade failures. Select a new zone whose letter suffix is later in alphabetical order. For example, if you choose between the cn-hangzhou-e and cn-hangzhou-h zones, select cn-hangzhou-h.
-
The cluster is in a healthy state.
You can run the
GET _cat/health?vcommand to check the cluster health status.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:MigrateToOtherZone |
none |
*Instance
|
None | None |
Request syntax
POST /openapi/instances/{InstanceId}/actions/migrate-zones HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
es-cn-n6w1o1x0w001c**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| dryRun |
boolean |
Yes |
Specifies whether to precheck the node migration across zones. A value of true indicates that only a precheck is performed and the migration task is not executed. A value of false indicates that the migration task is executed after the precheck succeeds. |
false |
| body |
string |
No |
The zone migration configuration, including the source zone, destination zone, and destination vSwitch. |
{"fromZoneId":"cn-hangzhou-e","toZoneId":"cn-hangzhou-f","toVswitchId":"vsw-bp16t5hpc689dgkgc****"} |
RequestBody
You must also specify the following parameters in RequestBody to specify the zone migration information.
| Name | Type | Required | Example | Description |
| fromZoneId | String | Yes | cn-hangzhou-i | The current zone of the instance. |
| toZoneId | String | Yes | cn-hangzhou-b | The destination zone. |
| toVswitchId | String | Yes | vsw-bp1f7r0ma00pf9h2l**** | The vSwitch ID. |
Example:
{
"fromZoneId": "cn-hangzhou-e",
"toZoneId": "cn-hangzhou-f",
"toVswitchId": "vsw-bp16t5hpc689dgkgc****"
}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Result |
boolean |
The return result. Valid values:
|
true |
| RequestId |
string |
The request ID. |
5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1**** |
Examples
Success response
JSON format
{
"Result": true,
"RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.