Queries the endpoints of a specified PolarDB cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | 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 the clusters that belong to your Alibaba Cloud account, such as cluster IDs. |
DBEndpointId | String | No | pe-************* | The ID of the endpoint. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 2DC120BF-6EBA-4C63-BE99-B09F9E****** | The ID of the request. |
Items | Array of DBEndpoint | Details about endpoints | |
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 PostgreSQL(Compatible with Oracle) clusters. |
Nodes | String | pi-***************,pi-*************** | The list of nodes that have endpoints. |
ReadWriteMode | String | ReadOnly | The read/write mode. Valid values:
|
AddressItems | Array of Address | Details about endpoints. | |
VSwitchId | String | vsw-************ | The vSwitch ID of the endpont. |
PrivateZoneConnectionString | String | ***.***.**.com | The private domain name that is bound to the endpoint. |
ConnectionString | String | ********.rwlb.polardb-pg-public.rds.aliyuncs.com | The endpoint of the cluster. |
NetType | String | Private | The network type of the endpoint. Valid values:
|
Port | String | 1521 | The port number. |
VpcInstanceId | String | pe-************* | The VPC ID of the cluster. Note This parameter is returned for only PolarDB for MySQL clusters. |
VPCId | String | vpc-*************** | The VPC ID of the endpoint. |
IPAddress | String | 192.***.***.*** | The IP address of the endpoint. |
DBEndpointId | String | pe-************* | The ID of the endpoint. |
EndpointConfig | String | {\"DistributedTransaction\":\"off\",\"ConsistLevel\":\"0\",\"LoadBalanceStrategy\":\"load\",\"MasterAcceptReads\":\"on\"} | The advanced configurations of the endpoint.
|
DBEndpointDescription | String | test | The name of the endpoint. |
EndpointType | String | Custom | The type of the endpoint. Valid values:
|
AutoAddNewNodes | String | Enable | Indicates whether newly added nodes are automatically associated with the default cluster endpoint. Valid values:
|
DBClusterId | String | pc-bp1s826a1up****** | The ID of the cluster. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/?Action=DescribeDBClusterEndpoints
&DBClusterId=pc-*************
&DBEndpointId=pe-*************
&<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>
<NodeWithRoles>Reader1</NodeWithRoles>
<Nodes>pi-***************,pi-***************</Nodes>
<ReadWriteMode>ReadOnly</ReadWriteMode>
<AddressItems>
<VSwitchId>vsw-************</VSwitchId>
<PrivateZoneConnectionString>***.***.**.com</PrivateZoneConnectionString>
<ConnectionString>********.rwlb.polardb-pg-public.rds.aliyuncs.com</ConnectionString>
<NetType>Private</NetType>
<Port>1521</Port>
<VpcInstanceId>pe-*************</VpcInstanceId>
<VPCId>vpc-***************</VPCId>
<IPAddress>192.***.***.***</IPAddress>
</AddressItems>
<DBEndpointId>pe-*************</DBEndpointId>
<EndpointConfig>{\"DistributedTransaction\":\"off\",\"ConsistLevel\":\"0\",\"LoadBalanceStrategy\":\"load\",\"MasterAcceptReads\":\"on\"}</EndpointConfig>
<DBEndpointDescription>test</DBEndpointDescription>
<EndpointType>Custom</EndpointType>
<AutoAddNewNodes>Enable</AutoAddNewNodes>
<DBClusterId>pc-bp1s826a1up******</DBClusterId>
</Items>
</DescribeDBClusterEndpointsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "2DC120BF-6EBA-4C63-BE99-B09F9E******",
"Items" : [ {
"NodeWithRoles" : "Reader1",
"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.***.***.***"
} ],
"DBEndpointId" : "pe-*************",
"EndpointConfig" : "{\\\"DistributedTransaction\\\":\\\"off\\\",\\\"ConsistLevel\\\":\\\"0\\\",\\\"LoadBalanceStrategy\\\":\\\"load\\\",\\\"MasterAcceptReads\\\":\\\"on\\\"}",
"DBEndpointDescription" : "test",
"EndpointType" : "Custom",
"AutoAddNewNodes" : "Enable",
"DBClusterId" : "pc-bp1s826a1up******"
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The error message returned because the specified DBClusterId does not exist in the current record. |
404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | The error message returned because the specified DBClusterId does not exist in the current record. |
For a list of error codes, visit the API Error Center.