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 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:
|
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:
|
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.
|
EndpointType | String | Custom |
The type of the endpoint for the cluster. Valid values:
|
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:
|
RequestId | String | 2DC120BF-6EBA-4C63-BE99-B09F9E****** |
The ID of the request. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/? Action=DescribeDBClusterEndpoints
&DBClusterId=pc-*************
&<Common request parameters>
Sample success responses
XML
format
<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
{
"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.