You can call this operation to query the endpoint of a specified ApsaraDB for PolarDB cluster.

Debugging

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-xxxxxxxxxx

The ID of the cluster.

DBEndpointId String No pe-xxxxxxxx

The ID of the cluster endpoint. Example: pe-xxxxxxxx.

Response parameters

Parameter Type Example Description
RequestId String ABA96273-606B-4616-9394-336A06312713

The ID of the request.

Items Array

The ID of the cluster endpoint.

DBEndpointId String pe-xxxxxxxxxx

The ID of the cluster endpoint.

EndpointType String Cluster

The type of the cluster endpoint. Valid values:

  • Cluster: the default endpoint of the cluster.
  • Primary: the primary endpoint of the cluster.
  • Custom: the custom endpoint of the cluster.
Nodes String pi-xxxxxxxxxx,pi-xxxxxxxxxx

The list of nodes configured for an endpoint.

ReadWriteMode String ReadWrite

The read/write mode of the endpoint. Valid values:

  • ReadWrite: receives and forwards read and write requests (automatic read/write splitting).
  • ReadOnly: read-only.
AutoAddNewNodes String Enable

Indicates whether a newly added node is automatically added to this endpoint. Valid values:

  • Enable
  • Disable
EndpointConfig String {\"DistributedTransaction\":\"off\",\"TrackLSNPerTab\":\"on\",\"ConsistLevel\":\"1\",\"StrictSPCalls\":\"on\",\"CausalConsistRead\":\"1\",\"StrictMultiStmt\":\"on\",\"LoadBalanceStrategy\":\"load\",\"MasterAcceptReads\":\"on\"

The advanced configuration of the cluster endpoint.

  • DistributedTransaction: the transaction splitting status. Valid values:
    • on: Transaction splitting is enabled.
    • off: Transaction splitting is disabled.
  • ConsistLevel: the level of session consistency. Valid values:
    • 0: eventual consistency
    • 1: session consistency
  • LoadBalanceStrategy: the policy of load balance that automatically schedules loads. Valid value: load.
AddressItems Array

The information about the connection string.

ConnectionString String pc-xxxxxxxxxx.w.polardb.cn-qd-pldb1.rds.aliyuncs.com

The connection string.

IPAddress String 172.xx.xx.xx

The IP address.

NetType String Private

The network type of the cluster endpoint. Valid values:

  • Public: the public network
  • Private: the private work
Port String 3306

The port number of the cluster endpoint.

VPCId String vpc-xxxxxxxxxx

The VPC ID of the cluster endpoint.

VSwitchId String vsw-xxxxxxxxxx

The VSwitch ID of the cluster endpoint.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeDBClusterEndpoints
&DBClusterId=pc-xxxxxxxxxx
&<Common request parameters>

Sample success responses

XML format

<Items>
    <EndpointType>Cluster</EndpointType>
    <AutoAddNewNodes>Enable</AutoAddNewNodes>
    <ReadWriteMode>ReadWrite</ReadWriteMode>
    <AddressItems>
        <Port>3306</Port>
        <ConnectionString>pc-bpxxxxxxxx.rwlb.rds.aliyuncs.com</ConnectionString>
        <VPCId>vpc-bpxxxxxxxx</VPCId>
        <IPAddress>192.168.xx.xxx</IPAddress>
        <NetType>Private</NetType>
        <VSwitchId>vsw-bpxxxxxxxx</VSwitchId>
    </AddressItems>
    <Nodes>pi-bpxxxxxxxx,pi-bpxxxxxxxx</Nodes>
    <DBEndpointId>pe-bpxxxxxxxx</DBEndpointId>
    <EndpointConfig>{"DistributedTransaction":"off","TrackLSNPerTab":"on","ConsistLevel":"1","StrictSPCalls":"on","CausalConsistRead":"1","StrictMultiStmt":"on","LoadBalanceStrategy":"load","MasterAcceptReads":"on"}</EndpointConfig>
</Items>
<Items>
    <EndpointType>Primary</EndpointType>
    <AddressItems>
        <Port>3306</Port>
        <ConnectionString>pc-bpxxxxxxxx.mysql.polardb.rds.aliyuncs.com</ConnectionString>
        <VPCId>vpc-bpxxxxxxxx</VPCId>
        <IPAddress>192.168.xx.xxx</IPAddress>
        <NetType>Private</NetType>
        <VSwitchId>vsw-bpxxxxxxxx</VSwitchId>
    </AddressItems>
    <Nodes>pi-bpxxxxxxxx</Nodes>
    <DBEndpointId>pe-bpxxxxxxxx</DBEndpointId>
    <EndpointConfig>{}</EndpointConfig>
</Items>
<RequestId>0E6CDE6C-107C-48C0-8995-BA976DF558A2</RequestId>

JSON format

{
    "Items": [
        {
            "EndpointType": "Cluster",
            "AutoAddNewNodes": "Enable",
            "ReadWriteMode": "ReadWrite",
            "AddressItems": [
                {
                    "Port": "3306",
                    "ConnectionString": "pc-bpxxxxxxxx.rwlb.rds.aliyuncs.com",
                    "VPCId": "vpc-bpxxxxxxxx",
                    "IPAddress": "192.168.xx.xxx",
                    "NetType": "Private",
                    "VSwitchId": "vsw-bpxxxxxxxx"
                }
            ],
            "Nodes": "pi-bpxxxxxxxx,pi-bpxxxxxxxx",
            "DBEndpointId": "pe-bpxxxxxxxx",
            "EndpointConfig": "{\"DistributedTransaction\":\"off\",\"TrackLSNPerTab\":\"on\",\"ConsistLevel\":\"1\",\"StrictSPCalls\":\"on\",\"CausalConsistRead\":\"1\",\"StrictMultiStmt\":\"on\",\"LoadBalanceStrategy\":\"load\",\"MasterAcceptReads\":\"on\"}"
        },
        {
            "EndpointType": "Primary",
            "AddressItems": [
                {
                    "Port": "3306",
                    "ConnectionString": "pc-bpxxxxxxxx.mysql.polardb.rds.aliyuncs.com",
                    "VPCId": "vpc-bpxxxxxxxx",
                    "IPAddress": "192.168.xx.xxx",
                    "NetType": "Private",
                    "VSwitchId": "vsw-bpxxxxxxxx"
                }
            ],
            "Nodes": "pi-bpxxxxxxxx",
            "DBEndpointId": "pe-bpxxxxxxxx",
            "EndpointConfig": "{}"
        }
    ],
    "RequestId": "0E6CDE6C-107C-48C0-8995-BA976DF558A2"
}

Error codes

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