Applies for a private endpoint for an ApsaraDB for Redis cluster instance.
This topic describes how to connect to a cluster instance of ApsaraDB for Redis through a direct connection. By default, cluster instances can be connected only through a proxy server. If you want to bypass the proxy server, you can apply for a private endpoint to enable direct connections to a cluster instance. This reduces the number of connections and improves service performance. For more information, see Enable a direct connection.
The instance must meet the following conditions:
- An ApsaraDB for Redis cluster instance is used.
- The engine version of the cluster instance is Redis 4.0 (Community Edition) or Redis 5.0 (Community Edition or Enterprise Edition).
- The instance runs in a Virtual Private Cloud (VPC) network. If the instance is deployed in the classic network, you can call the SwitchNetwork operation to change the network type to VPC.
- Secure Sockets Layer (SSL) encryption of the instance is disabled. If SSL encryption is enabled, you can call the ModifyInstanceSSL operation to disable it.
- The VSwitch to which the instance belongs has sufficient IP addresses that can be allocated. For more information, see Obtain the number of available IP addresses in the VSwitch.
OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.
The operation that you want to perform. Set the value to DescribeDBInstanceNetInfo.
The ID of the instance.
The ID of the region to which the instance belongs.
The prefix of the public endpoint. The prefix can be 8 to 64 characters in length, and can contain lowercase letters and digits. It must start with a lowercase letter.
The port number. Valid values:1024 to 65535. Default value: 6379.
The ID of the request.
https://r-kvstore.aliyuncs.com/?Action=AllocateDirectConnection &InstanceId=r-bp******** &<Common request parameters>
Sample success responses
For a list of error codes, visit the API Error Center.