All Products
Search
Document Center

Tair (Redis® OSS-Compatible):MigrateToOtherZone

Last Updated:Aug 28, 2026

Migrates a Tair (Redis OSS-compatible) instance to another zone in the same region.

Operation description

Before you call this operation, release the public endpoint of the instance (if any). Migrate an instance across zones.

Note
  • If the instance was switched from classic network to VPC and the classic network endpoint is retained, you can migrate zones only after the classic network endpoint expires and is released.

  • After migration, the endpoint remains unchanged but the VIP changes. Use the endpoint, not the VIP, to connect to the instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

kvstore:MigrateToOtherZone

update

*DBInstance

acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

DBInstanceId

string

Yes

The ID of the Tair (Redis OSS-compatible) instance.

r-bp1zxszhcgatnx****

ZoneId

string

Yes

The ID of the destination primary zone. Call DescribeZones to query zone IDs.

cn-hangzhou-g

VSwitchId

string

No

The ID of the vSwitch.

Note
  • The vSwitch must reside in the destination zone.

  • Required if the instance uses VPC.

vsw-bp1e7clcw529l773d****

EffectiveTime

string

No

When to switch the database after migration. Valid values:

  • Immediately: switches immediately after migration.

  • MaintainTime: switches during the maintenance window.

Note

Default value: Immediately.

Immediately

SecondaryZoneId

string

No

The ID of the destination secondary zone. Call DescribeZones to query zone IDs.

Note

If specified, the master and replica nodes are deployed in different zones, enabling cross-zone disaster recovery.

cn-hangzhou-h

ReplicaCount

integer

No

The number of replica nodes in the primary zone.

Note
  • Applicable only to cloud-native instances. Use ReplicaCount and SlaveReplicaCount to adjust replica distribution across zones during migration. The total of ReplicaCount and SlaveReplicaCount must equal the pre-migration total.

  • If not specified during single-to-multi-zone migration, one replica moves to the secondary zone and the rest remain in the primary zone.

  • For cluster instances, these values apply per shard.

1

SlaveReplicaCount

integer

No

The number of replica nodes in the secondary zone.

1

ReadOnlyCount

integer

No

The number of read replicas in the primary zone.

Note
  • Applicable only to cloud-native instances with read/write splitting enabled. Use ReadOnlyCount and SlaveReadOnlyCount to adjust read replica distribution across zones during migration. The total of ReadOnlyCount and SlaveReadOnlyCount must equal the pre-migration total.

  • If not specified during single-to-multi-zone migration, one read replica moves to the secondary zone and the rest remain in the primary zone.

  • For cluster instances, these values apply per shard.

1

SlaveReadOnlyCount

integer

No

The number of read replicas in the secondary zone.

1

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

29B0BF34-D069-4495-92C7-FA6D9452****

Examples

Success response

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.
400 InvalidIzNo.NotSupported The Specified Zone does not supported.
500 VpcServiceError Invoke VPC service failed.
500 ZoneMigrationError.StillingRunning Zone migration task is still running.
404 DBInstanceNotFound Specified instance does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.