DescribeDBClusterEndpoints

Updated at: 2025-04-11 01:47

Queries the endpoints of a PolarDB cluster.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
OperationAccess levelResource typeCondition keyAssociated operation
polardb:DescribeDBClusterEndpointsget
*dbcluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the cluster.

Note
You can call the DescribeDBClusters operation to query the details of the clusters that belong to your Alibaba Cloud account, such as cluster IDs.
pc-*************
DBEndpointIdstringNo

The ID of the endpoint.

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

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

2DC120BF-6EBA-4C63-BE99-B09F9E******
Itemsarray<object>

The information about the endpoints.

DBEndpointobject
Nodesstring

The nodes in the endpoint.

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

The read/write mode. Valid values:

  • ReadWrite: handles read and write requests. Automatic read/write splitting is enabled.
  • ReadOnly: handles read-only requests.
ReadOnly
AddressItemsarray<object>

The details of the endpoint.

Addressobject
VSwitchIdstring

The ID of the vSwitch.

vsw-************
PrivateZoneConnectionStringstring

The private domain name that is bound to the endpoint.

***.***.**.com
ConnectionStringstring

The endpoint.

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

The network type of the endpoint. Valid values:

  • Public
  • Private
Private
Portstring

The port.

1521
VpcInstanceIdstring

The ID of the virtual private cloud (VPC) instance.

Note
This parameter is returned for only PolarDB for MySQL clusters.
pe-*************
VPCIdstring

The ID of the VPC.

vpc-***************
IPAddressstring

The IP address.

192.***.***.***
DashboardUsedboolean

Whether it is the dashboard endpoint of the PolarDB search node.

  • Ture
  • False
True
DBEndpointIdstring

The ID of the endpoint.

pe-*************
EndpointConfigstring

The advanced configurations of the endpoint.

  • DistributedTransaction: indicates whether transaction splitting is enabled. Valid values:

    • on
    • off
  • 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. Only load may be returned.

  • MasterAcceptReads: indicates whether the primary node processes read requests. Valid values:

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

The name of the endpoint.

test
EndpointTypestring

The type of the endpoint. Valid values:

  • Cluster: the default endpoint.
  • Primary: the primary endpoint.
  • Custom: a custom cluster endpoint.
Custom
AutoAddNewNodesstring

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

  • Enable
  • Disable
Enable
DBClusterIdstring

The ID of the cluster.

pc-bp1s826a1up******
SccModestring

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

  • on: enabled.
  • off: disabled
on
PolarSccTimeoutActionstring

The global consistency timeout policy. Valid values:

  • 0: sends the request to the primary node.
  • 2: downgrades the consistency level of a query to inconsistent read when a global consistent read in the query times out. No error message is returned to the client.
0
PolarSccWaitTimeoutstring

Global consistency timeout.

100
NodeWithRolesstring

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 valid only for PolarDB for PostgreSQL clusters and PolarDB for PostgreSQL (Compatible with Oracle)) clusters.
Reader1

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
HTTP status codeError codeError messageDescription
404InvalidDBCluster.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.
404InvalidDBClusterId.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.
404InvalidDBClusterId.MalformedThe specified parameter DBClusterId is not valid.The specified DBClusterId parameter is invalid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
Change timeSummary of changesOperation
2024-07-30The Error code has changed. The response structure of the API has changedView Change Details
2023-09-12The Error code has changedView Change Details
2023-07-20The Error code has changed. The request parameters of the API has changedView Change Details
2023-05-11The Error code has changedView Change Details
2022-07-13The Error code has changedView Change Details
  • On this page (1)
  • Debugging
  • Authorization information
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
  • Change history
Feedback