Queries the endpoints of a specified PolarDB cluster.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No DescribeDBClusterEndpoints

The operation that you want to perform. Set the value to DescribeDBClusterEndpoints.

DBClusterId String Yes pc-*************

The ID of the cluster.

Note You can call the DescribeDBClusters operation to query the details of all clusters that belong to your account, such as the cluster ID.
DBEndpointId String No pe-*************

The ID of the cluster endpoint.

Response parameters

Parameter Type Example Description
RequestId String 2DC120BF-6EBA-4C63-BE99-B09F9E******

The ID of the request.

Items Array of DBEndpoint

The details of the endpoint for the cluster.

NodeWithRoles String Reader1

The role name of each node in the endpoint. The role name of the primary node is Writer. Multiple read-only nodes can be associated with an endpoint. Therefore, the role name of each read-only node is suffixed with a number. For example, you can use Reader1 and Reader2 as the role names.

Note This parameter is returned for only PolarDB for PostgreSQL clusters and PolarDB for Oracle clusters.
Nodes String pi-***************,pi-***************

The list of nodes that are configured for the endpoint.

ReadWriteMode String ReadOnly

The read/write mode. Valid values:

  • ReadWrite: receives and forwards read and write requests (automatic read/write splitting).
  • ReadOnly: receives and forwards only read requests.
AddressItems Array of Address

The information about the connection string.

VSwitchId String vsw-************

The ID of the vSwitch associated with the specified VPC.

PrivateZoneConnectionString String ***.***.**.com

The private domain name that is bound to the endpoint.

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

The connection string.

NetType String Private

The type of network. Valid values:

  • Public: Internet
  • Private: virtual private cloud (VPC)
Port String 1521

The port number of the endpoint.

VpcInstanceId String pe-*************

The ID of the VPC-connected instance.

Note This parameter is returned for only PolarDB for MySQL clusters.
VPCId String vpc-***************

The ID of the VPC.

IPAddress String 192.***.***.***

The IP address.

DBEndpointId String pe-*************

The ID of the endpoint.

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

The advanced configurations of the cluster endpoint.

  • DistributedTransaction: indicates whether transaction splitting is enabled. Valid values:
    • on: Transaction splitting is enabled.
    • off: Transaction splitting is disabled.
  • ConsistLevel: the consistency level of sessions. Valid values:
    • 0: eventual consistency
    • 1: session consistency
    • 2: global consistency
  • LoadBalanceStrategy: the load balancing policy that automatically schedules loads. Set the value to load.
  • MasterAcceptReads: indicates whether the primary node processes read requests. Valid values:
    • on: The primary node processes read requests.
    • off: The primary node does not process read requests.
DBEndpointDescription String test

The name of the custom cluster endpoint.

Note This parameter is returned for only custom cluster endpoints.
EndpointType String Custom

The type of the endpoint for the cluster. Valid values:

  • Cluster: the default cluster endpoint
  • Primary: the primary endpoint of the cluster
  • Custom: a custom cluster endpoint
AutoAddNewNodes String Enable

Indicates whether newly added nodes are automatically associated with the default cluster endpoint. Valid values:

  • Enable
  • Disable


Sample requests

&<Common Request Parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "2DC120BF-6EBA-4C63-BE99-B09F9E******",
  "Items" : [ {
    "DBEndpointId" : "pe-*************",
    "NodeWithRoles" : "{\"pi-*************\":\"Reader2\",\"pi-*************\":\"Reader1\"}",
    "AutoAddNewNodes" : "Disable",
    "EndpointType" : "Custom",
    "AddressItems" : [ {
      "VPCId" : "vpc-***************",
      "Port" : "1521",
      "VSwitchId" : "vsw-***************",
      "ConnectionString" : "pe-*************.rwlb.polardb-pg-public.rds.aliyuncs.com",
      "IPAddress" : "192.***.***.***",
      "NetType" : "Private"
    } ],
    "Nodes" : "pi-*************,pi-*************",
    "ReadWriteMode" : "ReadOnly",
    "EndpointConfig" : "{\"DistributedTransaction\":\"off\",\"ConsistLevel\":\"0\",\"LoadBalanceStrategy\":\"load\",\"MasterAcceptReads\":\"on\"}",
    "DBEndpointDescription" : "test"
  } ]

Error codes

For a list of error codes, visit the API Error Center.