All Products
Search
Document Center

Tair (Redis® OSS-Compatible):MigrateToOtherZone

Last Updated:Jan 26, 2025

Migrates a Tair (Redis OSS-compatible) 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.

Note
  • If the network type of an Tair (Redis OSS-compatible) 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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
kvstore:MigrateToOtherZoneupdate
*DBInstance
acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

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

r-bp1zxszhcgatnx****
ZoneIdstringYes

The ID of the destination primary zone. You can call the DescribeZones operation to query zone IDs.

cn-hangzhou-g
VSwitchIdstringNo

The ID of the vSwitch.

Note
  • The zone where the vSwitch resides must be the same as the ID of the destination zone.

  • If the network type of the instance is VPC, this parameter is required.

vsw-bp1e7clcw529l773d****
EffectiveTimestringNo

The time when the database is switched after the instance is migrated. Valid values:

  • Immediately: The database is immediately switched after the instance is migrated.
  • MaintainTime: The database is switched within the maintenance window.
Note Default value: Immediately.
Enumeration Value:
  • 0
  • 1
  • Immediately
  • MaintainTime
Immediately
SecondaryZoneIdstringNo

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

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

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

Examples

Sample success responses

JSONformat

{
  "RequestId": "29B0BF34-D069-4495-92C7-FA6D9452****"
}

Error codes

HTTP status codeError codeError messageDescription
400NetworkType.NotSupportSpecified 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.
400InstanceStatus.NotSupportInstance status does not support this operation.The error message returned because the operation is not supported while the instance is in the current state.
400MissingSwitchIdVSwitchId is mandatory for this action.-
400IzNotSupportVpcErrorSpecify zone not support VPC.-
400InvalidReginAvzNotFoundSpecified user does not find the region and zone.-
400ClusterNotSupportThe Specified cluster does not support.-
400InvalidVSwitchId.MismatchThe Specified vSwitchId does not matched VPC.The specified vSwitch does not belong to the specified VPC. Check the vSwitch settings.
400InvalidIzNo.NotSupportedThe Specified Zone does not supported.-
404DBInstanceNotFoundSpecified instance does not exist.-
500VpcServiceErrorInvoke VPC service failed.-
500ZoneMigrationError.StillingRunningZone migration task is still running.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-20API Description Update. The Error code has changedView Change Details