This topic describes how to change the network type of an ApsaraDB for Redis instance from classic network to Virtual Private Cloud (VPC) in the console or by calling the relevant API operation. When you change the network type, you can choose to retain the classic network endpoint and specify an expiration date. After the expiration date is reached, the classic network endpoint is automatically deleted.

Prerequisites

Before you change the network type, make sure that the following requirements are met:
  • The ApsaraDB for Redis instance is deployed in a classic network.
  • VPCs and vSwitches are available in the zone where the ApsaraDB for Redis instance is deployed. For more information, see Create a VPC with an IPv4 CIDR block.

Change the network type in the console

  1. Log on to the ApsaraDB for Redis console.
  2. Select the region where the ApsaraDB for Redis instance is deployed.
  3. Click the ID of the ApsaraDB for Redis instance.
  4. On the Instance Information page, click Switch to VPC.
  5. In the Switch to VPC panel, perform the following operations:
    1. Select the VPC and vSwitch that you want to use.
    2. You can choose to retain the classic network endpoint and then specify an expiration date.
      Note After you select to retain the classic network endpoint, both the classic network endpoint and VPC endpoint are effective. ECS instances in the classic network can continue to access the ApsaraDB for Redis instance and services are not interrupted. When the classic network endpoint expires, it is automatically deleted and ECS instances can no longer access the ApsaraDB for Redis instance through the classic network endpoint.
    3. Click OK.
  6. You can click Refresh on the Instance Information page to view the classic network and VPC endpoints.
    Instance information

Modify the expiration date of the classic network endpoint in the console

After you retain the classic network endpoint, you can extend the retention period of the classic network endpoint by changing its expiration date in the console.

You can adjust the expiration date before the classic network endpoint expires. The new expiration date takes effect immediately. For example, if the classic network endpoint is about to expire on August 18, 2017 and you extend the expiration date by 14 days on August 15, 2017, the classic network endpoint is released on August 29, 2017.

  1. Log on to the ApsaraDB for Redis console.
  2. Select the region where the ApsaraDB for Redis instance is deployed.
  3. Click the ID of the ApsaraDB for Redis instance.
  4. In the Connection Information section, find Retained Connection Address of the Classic Network (Host) in the Connection Type column, and then click Change Expiration Date in the Actions column.
  5. In the Change Expiration Date panel, select a new date and click OK.