All Products
Search
Document Center

PolarDB:DescribeDBClusterEndpoints

Last Updated:Mar 01, 2024

Queries the endpoints of a PolarDB cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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
polardb:DescribeDBClusterEndpointsREAD
  • dbcluster
    acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
    none
none

Request parameters

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
object
RequestIdstring

The ID of the request.

2DC120BF-6EBA-4C63-BE99-B09F9E******
Itemsobject []

The details of the endpoints.

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, such as Reader1 and Reader2.

Note This parameter is valid only for PolarDB for PostgreSQL clusters and PolarDB for PostgreSQL (Compatible with Oracle)) clusters.
Reader1
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
AddressItemsobject []

The details of the endpoint.

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.***.***.***
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******

Examples

Sample success responses

JSONformat

{
  "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

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.

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

Change history

Change timeSummary of changesOperation
2023-09-12The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 404 change
2023-07-20The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 404
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: DescribeType
2023-05-11The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 404
2022-07-13The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 404 change