申请云数据库 Tair(兼容 Redis)集群实例的直连地址。
接口说明
客户端可通过直连地址绕过代理,像连接原生 Redis 集群一样连接集群实例,从而降低链路开销,进一步提升云数据库 Tair(兼容 Redis)服务的响应速度。
调用本接口的实例需满足下述条件:
实例为集群架构。
部署模式为经典。
实例的网络类型为专有网络。如果当前为经典网络,您可以调用 SwitchNetwork 接口将其切换为专有网络。
实例未开启 SSL 加密功能。如果已开启 SSL 加密功能,您可以调用 ModifyInstanceSSL 接口将其关闭。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
kvstore:AllocateDirectConnection |
create |
*DBInstance
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| InstanceId |
string |
是 |
实例 ID。 |
r-bp1zxszhcgatnx**** |
| ConnectionString |
string |
否 |
直连地址的前缀,由小写英文字母或数字组成,以小写字母开头,长度为 8~40 字符。默认为实例 ID+ |
redisdirect123 |
| Port |
string |
否 |
端口号,取值范围为 1024~65535,默认值为 6379。 |
6379 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
5D622714-AEDD-4609-9167-F5DDD3D1**** |
示例
正常返回示例
JSON格式
{
"RequestId": "5D622714-AEDD-4609-9167-F5DDD3D1****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | NetTypeExists | Specified net type already existed | |
| 400 | InvalidConnType | Specified DB instance conn type is not valid. | |
| 400 | TaskHasExist | The task already exists. | |
| 400 | ConnectionStringAlreadyExists | Specified connection string already exists in the Aliyun RDS. | |
| 400 | InvalidConnectionString.Format | Specified connection string is not valid. | 连接串非法,请选用新的 |
| 400 | DirectConnectionAlreadyExists | Specified instance direct connection already exists. | |
| 400 | InvalidVPCParamGroup | Specified vpc param group is not valid. | |
| 400 | InvalidConnectionString | ConnectionString is invalid, valid regex: ^\w+$ | 连接地址前缀非法,由小写英文字母或数字组成,以小写字母开头,长度为8~40字符。 |
| 403 | UnsupportedEngineVersion | Current engine version does not support operations. | |
| 403 | IncorrectMinorVersion | Current engine minor version does not support operations. | |
| 403 | InstanceStatus.NotSupport | Instance status does not support this operation. | |
| 404 | InvalidDbInstanceId.NotFound | Specified instance does not exist. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。