Queries the endpoints of a specified PolarDB cluster.
Debugging
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:
|
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:
|
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.
|
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:
|
AutoAddNewNodes | String | Enable |
Indicates whether newly added nodes are automatically associated with the default cluster endpoint. Valid values:
|
Examples
Sample requests
http(s)://polardb.aliyuncs.com/?Action=DescribeDBClusterEndpoints
&DBClusterId=pc-*************
&<Common Request Parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDBClusterEndpointsResponse>
<RequestId>2DC120BF-6EBA-4C63-BE99-B09F9E******</RequestId>
<Items>
<DBEndpointId>pe-*************</DBEndpointId>
<NodeWithRoles>{"pi-*************":"Reader2","pi-*************":"Reader1"}</NodeWithRoles>
<AutoAddNewNodes>Disable</AutoAddNewNodes>
<EndpointType>Custom</EndpointType>
<AddressItems>
<VPCId>vpc-***************</VPCId>
<Port>1521</Port>
<VSwitchId>vsw-***************</VSwitchId>
<ConnectionString>pe-*************.rwlb.polardb-pg-public.rds.aliyuncs.com</ConnectionString>
<IPAddress>192.***.***.***</IPAddress>
<NetType>Private</NetType>
</AddressItems>
<Nodes>pi-*************,pi-*************</Nodes>
<ReadWriteMode>ReadOnly</ReadWriteMode>
<EndpointConfig>{"DistributedTransaction":"off","ConsistLevel":"0","LoadBalanceStrategy":"load","MasterAcceptReads":"on"}</EndpointConfig>
<DBEndpointDescription>test</DBEndpointDescription>
</Items>
</DescribeDBClusterEndpointsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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.