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 PolarDB cluster.

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

The ID of the endpoint for the cluster.

Response parameters

Parameter Type Example Description
Items Array of DBEndpoint

The details about the endpoints for the cluster.

AddressItems Array of Address

The information about the connection string.

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

The connection string.

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

The IP address.

NetType String Private

The type of the network. Valid values:

  • Public: Internet
  • Private: private network
Port String 1521

The port number.

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

The private domain name that is bound to the endpoint.

VPCId String vpc-***************

The ID of the virtual private cloud (VPC).

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

The ID of the VSwitch.

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

The ID of the VPC-connected instance.

Note This parameter is returned for only PolarDB for MySQL clusters.
AutoAddNewNodes String Enable

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

  • Enable
  • Disable
DBEndpointDescription String test

The name of the custom cluster endpoint.

Note This parameter is returned for only custom cluster endpoints.
DBEndpointId String pe-*************

The ID of the endpoint.

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

The advanced configurations of the endpoint for the cluster.

  • DistributedTransaction: indicates whether transaction splitting is enabled. Valid values:
    • on: Transaction splitting is enabled.
    • off: Transaction splitting is disabled.
  • ConsistLevel: the consistency level for sessions. Valid values:
    • 0: eventual consistency
    • 1: session consistency
    • 2: global consistency
  • LoadBalanceStrategy: the load balancing policy that automatically schedules loads. The only value of this parameter is load.
  • MasterAcceptReads: indicates whether the primary node accepts read requests. Valid values:
    • on: The primary node accepts read requests.
    • off: The primary node does not accept read requests.
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: the custom cluster endpoint
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 differentiation, such as Reader1 and Reader2.

Note This parameter is returned for only PolarDB for PostgreSQL clusters and PolarDB-O 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 is enabled.
  • ReadOnly: receives and forwards only read requests.
RequestId String 2DC120BF-6EBA-4C63-BE99-B09F9E******

The ID of the request.


Sample requests

http(s)://polardb.aliyuncs.com/? Action=DescribeDBClusterEndpoints
&<Common request parameters>

Sample success responses

XML format


JSON format

    "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.