查詢PolarDB叢集的地址資訊
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
polardb:DescribeDBClusterEndpoints |
get |
*dbcluster
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| DBClusterId |
string |
是 |
叢集 ID。 說明
您可以通過 DescribeDBClusters 介面查看帳號下所有叢集的詳細資料,包括叢集 ID。 |
pc-************* |
| DBEndpointId |
string |
否 |
叢集地址 ID。 |
pe-************* |
| DescribeType |
string |
否 |
是否需要返回 ai 節點資訊。 |
AI |
| PolarFsInstanceId |
string |
否 |
pfs-test***** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
2DC120BF-6EBA-4C63-BE99-B09F9E****** |
| Items |
array<object> |
叢集地址詳情。 |
|
|
array<object> |
|||
| Nodes |
string |
串連地址配置的節點列表。 |
pi-***************,pi-*************** |
| ReadWriteMode |
string |
讀寫入模式:
|
ReadOnly |
| AddressItems |
array<object> |
串連串資訊。 |
|
|
object |
|||
| VSwitchId |
string |
虛擬交換器 ID。 |
vsw-************ |
| PrivateZoneConnectionString |
string |
綁定的私人網域名稱, |
***.***.**.com |
| ConnectionString |
string |
串連串。 |
********.rwlb.polardb-pg-public.rds.aliyuncs.com |
| NetType |
string |
網路類型,取值範圍如下:
|
Private |
| Port |
string |
連接埠。 |
1521 |
| VpcInstanceId |
string |
VPC 執行個體 ID。 說明
僅 PolarDB MySQL 版叢集會返回該參數。 |
pe-************* |
| VPCId |
string |
專用網路 ID。 |
vpc-*************** |
| IPAddress |
string |
IP 位址。 |
192.***.***.*** |
| DashboardUsed |
boolean |
是否為 PolarDB Search-節點 Dashboard 地址
|
True |
| DBEndpointId |
string |
串連地址 ID。 |
pe-************* |
| EndpointConfig |
string |
叢集地址的進階配置。
|
{\"DistributedTransaction\":\"off\",\"ConsistLevel\":\"0\",\"LoadBalanceStrategy\":\"load\",\"MasterAcceptReads\":\"on\"} |
| DBEndpointDescription |
string |
位址名稱。 |
test |
| EndpointType |
string |
叢集地址類型:
|
Custom |
| AutoAddNewNodes |
string |
新節點是否自動加入預設叢集地址:
|
Enable |
| DBClusterId |
string |
叢集 ID。 |
pc-bp1s826a1up****** |
| SccMode |
string |
節點是否開啟全域一致性(高效能模式)功能。取值範圍如下:
|
on |
| PolarSccTimeoutAction |
string |
全域一致性逾時策略。取值範圍如下:
|
0 |
| PolarSccWaitTimeout |
string |
全域一致性逾時時間 |
100 |
| NodeWithRoles |
string |
目標串連地址下各節點的角色名稱,其中主節點為 Writer;由於一個串連地址下可加入多個唯讀節點,因此每個唯讀節點的角色名稱後會加上數字作為區分,如 Reader1、Reader2,以此類推。 說明
僅 PolarDB PostgreSQL 版叢集和 PolarDB PostgreSQL 版(相容 Oracle)叢集支援該參數。 |
Reader1 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "2DC120BF-6EBA-4C63-BE99-B09F9E******",
"Items": [
{
"Nodes": "pi-***************,pi-***************",
"ReadWriteMode": "ReadOnly",
"AddressItems": [
{
"VSwitchId": "vsw-************",
"PrivateZoneConnectionString": "***.***.**.com",
"ConnectionString": "********.rwlb.polardb-pg-public.rds.aliyuncs.com",
"NetType": "Private",
"Port": "1521",
"VpcInstanceId": "pe-*************",
"VPCId": "vpc-***************",
"IPAddress": "192.***.***.***",
"DashboardUsed": true
}
],
"DBEndpointId": "pe-*************",
"EndpointConfig": "{\\\"DistributedTransaction\\\":\\\"off\\\",\\\"ConsistLevel\\\":\\\"0\\\",\\\"LoadBalanceStrategy\\\":\\\"load\\\",\\\"MasterAcceptReads\\\":\\\"on\\\"}",
"DBEndpointDescription": "test",
"EndpointType": "Custom",
"AutoAddNewNodes": "Enable",
"DBClusterId": "pc-bp1s826a1up******",
"SccMode": "on",
"PolarSccTimeoutAction": "0",
"PolarSccWaitTimeout": "100",
"NodeWithRoles": "Reader1"
}
]
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | 當前的記錄中不存在提供的DBClusterId。 |
| 404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | 當前的記錄中不存在提供的 DBClusterId。 |
| 404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | 指定的參數DBClusterId無效 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。