全部產品
Search
文件中心

:DescribeDBClusterEndpoints - 查詢PolarDB叢集的地址資訊

更新時間:Dec 11, 2025

查詢PolarDB叢集的地址資訊

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

polardb:DescribeDBClusterEndpoints

get

*dbcluster

acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}

請求參數

名稱

類型

必填

描述

樣本值

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

讀寫入模式:

  • ReadWrite:可讀可寫(自動讀寫分離)。

  • ReadOnly:唯讀。

ReadOnly

AddressItems

array<object>

串連串資訊。

object

VSwitchId

string

虛擬交換器 ID。

vsw-************

PrivateZoneConnectionString

string

綁定的私人網域名稱,

***.***.**.com

ConnectionString

string

串連串。

********.rwlb.polardb-pg-public.rds.aliyuncs.com

NetType

string

網路類型,取值範圍如下:

  • Public:公網

  • Private:私網

Private

Port

string

連接埠。

1521

VpcInstanceId

string

VPC 執行個體 ID。

說明

僅 PolarDB MySQL 版叢集會返回該參數。

pe-*************

VPCId

string

專用網路 ID。

vpc-***************

IPAddress

string

IP 位址。

192.***.***.***

DashboardUsed

boolean

是否為 PolarDB Search-節點 Dashboard 地址

  • Ture:是

  • False:否

True

DBEndpointId

string

串連地址 ID。

pe-*************

EndpointConfig

string

叢集地址的進階配置。

  • DistributedTransaction:事務拆分狀態,取值範圍如下:

    • on:事務拆分已開啟

    • off:事務拆分已關閉

  • ConsistLevel:會話一致性層級,取值範圍如下:

    • 0:最終一致性

    • 1:會話一致性。

    • 2:全域一致性

  • LoadBalanceStrategy:負載平衡策略,基於負載的自動調度,取值固定為 load

  • MasterAcceptReads:主庫是否接受讀,取值範圍如下:

    • on:主庫接受讀

    • off:主庫不接受讀

{\"DistributedTransaction\":\"off\",\"ConsistLevel\":\"0\",\"LoadBalanceStrategy\":\"load\",\"MasterAcceptReads\":\"on\"}

DBEndpointDescription

string

位址名稱。

test

EndpointType

string

叢集地址類型:

  • Cluster:預設叢集地址。

  • Primary:主地址。

  • Custom:自訂叢集地址。

Custom

AutoAddNewNodes

string

新節點是否自動加入預設叢集地址:

  • Enable

  • Disable

Enable

DBClusterId

string

叢集 ID。

pc-bp1s826a1up******

SccMode

string

節點是否開啟全域一致性(高效能模式)功能。取值範圍如下:

  • on:開啟

  • off:關閉

on

PolarSccTimeoutAction

string

全域一致性逾時策略。取值範圍如下:

  • 0:發送該請求到主節點

  • 2:逾時降級,當全域一致性讀逾時後,本次查詢操作會自動降級為非一致性讀取,且用戶端不會收到報錯資訊

0

PolarSccWaitTimeout

string

全域一致性逾時時間

100

NodeWithRoles

string

目標串連地址下各節點的角色名稱,其中主節點為 Writer;由於一個串連地址下可加入多個唯讀節點,因此每個唯讀節點的角色名稱後會加上數字作為區分,如 Reader1Reader2,以此類推。

說明

僅 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無效

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情