If the network type of an ApsaraDB for Redis instance is switched from classic network to Virtual Private Cloud (VPC) and the endpoint of the classic network is retained, you can call this operation to prolong the retention period of the endpoint of the classic network.

For more information about how to perform the corresponding operation in the console, see Change the expiration time for the connection address of the classic network.

Note For more information about how to switch the network type of an ApsaraDB for Redis instance from classic network to VPC, see SwitchNetwork.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
ClassicExpiredDays Integer Yes 14

The retention period of the endpoint of the classic network. Unit: days. Valid values: 14, 30, 60, and 120.

ConnectionString String Yes r-bp1xxxxxxxxxxxxx.redis.rds.aliyuncs.com

The endpoint of the classic network.

InstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance for which you want to prolong the retention period of the endpoint of the classic network.

Action String No ModifyInstanceNetExpireTime

The operation that you want to perform. Set this parameter to ModifyInstanceNetExpireTime.

AccessKeyId String No Lxxxxxxxxxxxxxxw

The AccessKey ID that Alibaba Cloud provides for you to access services.

Response parameters

Parameter Type Example Description
InstanceId String r-bp1xxxxxxxxxxxxx

The ID of the instance.

NetInfoItems

The details about the retention period of the endpoint of the classic network.

ConnectionString String r-bp1xxxxxxxxxxxxx.redis.rds.aliyuncs.com

The endpoint of the classic network.

DBInstanceNetType String Classic

The network type of the instance.

ExpiredTime String 2019-08-01T09:29:18Z

The expiration time of the endpoint of the classic network.

IPAddress String xxx.xxx.xxx.222

The IP address of the instance in the classic network.

Port String 6379

The service port of the instance.

RequestId String 9C4AF387-1EA3-4C84-8013-3F6B973EDDF5

The ID of the request.

Examples

Sample request


https://r-kvstore.aliyuncs.com/
? Action=ModifyInstanceNetExpireTime
&InstanceId=r-bp1xxxxxxxxxxxxx
&ConnectionString=r-bp1xxxxxxxxxxxxx.redis.rds.aliyuncs.com
&ClassicExpiredDays=30
&<Common request parameters>

Sample success response

XML format

<ModifyInstanceNetExpireTimeResponse>
  <InstanceId>r-bp1xxxxxxxxxxxxx</InstanceId>
  <RequestId>9C4AF387-1EA3-4C84-8013-3F6B973EDDF5</RequestId>
  <NetInfoItems>
    <NetInfoItem>
      <ConnectionString>r-bp1xxxxxxxxxxxxx.redis.rds.aliyuncs.com</ConnectionString>
      <Port>6379</Port>
      <DBInstanceNetType>Classic</DBInstanceNetType>
      <IPAddress>xxx.xxx.xxx.222</IPAddress>
      <ExpiredTime>2019-08-01T09:29:18Z</ExpiredTime>
    </NetInfoItem>
  </NetInfoItems>
</ModifyInstanceNetExpireTimeResponse>

JSON format

{
	"RequestId":"9C4AF387-1EA3-4C84-8013-3F6B973EDDF5",
	"InstanceId":"r-bp1xxxxxxxxxxxxx",
	"NetInfoItems":{
		"NetInfoItem":[
			{
				"DBInstanceNetType":"Classic",
				"Port":"6379",
				"ConnectionString":"r-bp1xxxxxxxxxxxxx.redis.rds.aliyuncs.com",
				"IPAddress":"xxx.xxx.xxx.222",
				"ExpiredTime":"2019-08-01T09:29:18Z"
			}
		]
	}
}

Error codes

For more information, see Error codes.