All Products
Search
Document Center

PolarDB:DescribeDBClusterEndpoints

Last Updated:Oct 14, 2025

Queries information about the endpoints of a PolarDB cluster.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

polardb:DescribeDBClusterEndpoints

get

*dbcluster

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

None None

Request parameters

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

The cluster ID.

Note

Call the DescribeDBClusters operation to query the details of all clusters in your account, including the cluster IDs.

pc-*************

DBEndpointId

string

No

The ID of the cluster endpoint.

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

DescribeType

string

No

Specifies whether to return information about AI nodes.

AI

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

2DC120BF-6EBA-4C63-BE99-B09F9E******

Items

array<object>

The details of the cluster endpoints.

object

Nodes

string

A list of nodes for the endpoint.

pi-***************,pi-***************

ReadWriteMode

string

The read/write mode. Valid values:

  • ReadWrite: read and write (automatic read/write splitting).

  • ReadOnly: read-only.

ReadOnly

AddressItems

array<object>

The connection string information.

object

VSwitchId

string

The ID of the virtual switch.

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

PrivateZoneConnectionString

string

The bound private domain name.

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

ConnectionString

string

The connection string.

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

NetType

string

The network type. Valid values:

  • Public: Internet

  • Private: private network

Private

Port

string

The port.

1521

VpcInstanceId

string

The ID of the VPC instance.

Note

This parameter is returned only for PolarDB for MySQL clusters.

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

VPCId

string

The ID of the VPC.

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

IPAddress

string

The IP address.

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

DashboardUsed

boolean

Indicates whether the endpoint is a PolarDB Search node dashboard endpoint.

  • True: yes

  • False: no

True

DBEndpointId

string

The ID of the endpoint.

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

EndpointConfig

string

The advanced configurations of the cluster endpoint.

  • DistributedTransaction: The transaction splitting status. Valid values:

    • on: enabled

    • off: disabled

  • ConsistLevel: The session consistency level. Valid values:

    • 0: eventual consistency

    • 1: session consistency

    • 2: global consistency

  • LoadBalanceStrategy: The load balancing policy. The value is fixed as load, which indicates load-based scheduling.

  • MasterAcceptReads: Specifies 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.

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

DBEndpointDescription

string

The endpoint name.

test

EndpointType

string

The type of the cluster endpoint. Valid values:

  • Cluster: default cluster endpoint.

  • Primary: primary endpoint.

  • Custom: custom cluster endpoint.

Custom

AutoAddNewNodes

string

Indicates whether new nodes are automatically added to the default cluster endpoint. Valid values:

  • Enable

  • Disable

Enable

DBClusterId

string

The cluster ID.

pc-bp1s826a1up******

SccMode

string

Indicates whether global consistency (high-performance mode) is enabled for the node. Valid values:

  • on: enabled

  • off: disabled

on

PolarSccTimeoutAction

string

The policy for handling global consistency read timeouts. Valid values:

  • 0: Send the request to the primary node.

  • 2: Downgrade the request. If a global consistency read times out, the query is automatically downgraded to a regular request, and the client does not receive an error message.

0

PolarSccWaitTimeout

string

The timeout period for global consistency.

100

NodeWithRoles

string

The role of each node in the endpoint. The primary node has the Writer role. Because multiple read-only nodes can be added to an endpoint, the role of each read-only node is distinguished by a number, such as Reader1, Reader2, and so on.

Note

This parameter is supported only by PolarDB for PostgreSQL clusters and PolarDB for PostgreSQL (compatible with Oracle) clusters.

Reader1

Examples

Success response

JSON format

{ "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" } ] }

Error codes

HTTP status code

Error code

Error message

Description

404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The specified DBClusterId parameter does not exist in the current record.
404 InvalidDBClusterId.NotFound The DBClusterId provided does not exist in our records. The specified DBClusterId parameter does not exist in the current record.
404 InvalidDBClusterId.Malformed The specified parameter DBClusterId is not valid. The specified DBClusterId parameter is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.