查询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> | 集群地址详情。 | |
| 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 | 网络类型,取值范围如下: 
 
 仅 PolarDB MySQL 版集群支持经典网络类型。 | 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无效 | 
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。