申請雲端資料庫 Tair(相容 Redis)叢集執行個體的直連位址。
介面說明
用戶端可透過直連位址繞過代理,像連線原生 Redis 叢集一樣連線叢集執行個體,從而降低鏈路開銷,進一步提升雲端資料庫 Tair(相容 Redis)服務的回應速度。
呼叫本介面的執行個體需滿足下述條件:
執行個體為叢集架構。
部署模式為經典。
執行個體的網路類型為專有網路。如果目前為經典網路,您可以呼叫 SwitchNetwork 介面將其切換為專有網路。
執行個體未開啟 SSL 加密功能。如果已開啟 SSL 加密功能,您可以呼叫 ModifyInstanceSSL 介面將其關閉。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
kvstore:AllocateDirectConnection |
create |
*DBInstance。
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| InstanceId |
string |
是 |
執行個體 ID。僅支援經典部署模式的叢集執行個體;經典部署模式對應 ComputingType 為 Machine。可呼叫 DescribeInstances 查詢 ComputingType。 |
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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。