Returns the number of current connections of an AnalyticDB for MySQL 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 Yes DescribeConnectionCountRecords

The operation that you want to perform. Set the value to DescribeConnectionCountRecords.

DBClusterId String Yes am-************

The ID of the cluster.

Note You can call the DescribeDBClusters operation to query details about all AnalyticDB for MySQL clusters in a specific region, including cluster IDs.

Response parameters

Parameter Type Example Description
RequestId String 562C7F89-FBE6-4A04-AAAA-7EBC25******

The ID of the request.

DBClusterId String am-**************

The ID of the cluster.

AccessIpRecords Array of AccessIps

Details about the IP address of the client.

AccessIp String 42.120.***.***

The IP address of the client.

Count Long 1

The number of connections.

UserRecords Array of Users

Details about the users.

User String test

The username.

Count Long 1

The number of connections.

Examples

Sample requests

http(s)://adb.aliyuncs.com/?Action=DescribeConnectionCountRecords
&DBClusterId=am-************
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeConnectionCountRecordsResponse>
    <RequestId>562C7F89-FBE6-4A04-AAAA-7EBC25******</RequestId>
    <UserRecords>
        <User>test</User>
        <Count>1</Count>
    </UserRecords>
    <DBClusterId>am-************</DBClusterId>
    <AccessIpRecords>
        <AccessIp>42.120.***.***</AccessIp>
        <Count>1</Count>
    </AccessIpRecords>
</DescribeConnectionCountRecordsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "562C7F89-FBE6-4A04-AAAA-7EBC25******",
  "UserRecords" : [ {
    "User" : "test",
    "Count" : "1"
  } ],
  "DBClusterId" : "am-************",
  "AccessIpRecords" : [ {
    "AccessIp" : "42.120.***.***",
    "Count" : "1"
  } ]
}

Error codes

HTTP status code Error code Error message Description
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified cluster ID does not exist. Check whether the cluster ID is valid.

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