Querying the Number of Connections to an Instance Node
Description
This API is used to query the number of connections from each client to DDS DB instances.
Restrictions
Frozen instances do not support this operation.
URI
- URI format
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/conn-statistics?node_id={node_id}
- URI example
https://dds.ap-southeast1.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/cc6345c64cec47499182467ea0dd432ain02/conn-statistics?node_id=51a90da2cfc846688abcdd23861077b5no02
Requests
Parameter description
Name |
Type |
IN |
Mandatory |
Description |
---|---|---|---|---|
X-Auth-Token |
string |
header |
Yes |
User token obtained from IAM. For details, see Authentication. |
project_id |
string |
path |
Yes |
Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID. |
instance_id |
string |
path |
Yes |
Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one. |
node_id |
string |
query |
No |
The node ID. If this parameter is left blank, the number of connections of all nodes that can be connected in the instance is queried by default. |
Responses
- Response parameters
Table 2 Response body parameters Parameter
Type
Mandatory
Description
total_connections
Integer
Yes
The total number of connections, including internal and external connections.
total_inner_connections
Integer
Yes
The total number of internal connections.
total_outer_connections
Integer
Yes
The total number of external connections.
inner_connections
Array of objects
Yes
The internal connection statistics array. Up to 200 records are supported. For details, see Table 3.
outer_connections
Array of objects
Yes
The external connection statistics array. Up to 200 records are supported. For details, see Table 3.
- Response example
{ "total_connections": 75, "total_inner_connections": 50, "total_outer_connections": 25, "inner_connections": [ {"client_ip": "10.10.10.24", "count": 19}, {"client_ip": "9.3.185.42", "count": 6}, {"client_ip": "10.10.4.156", "count": 3} ], "outer_connections": [ {"client_ip": "10.10.10.25", "count": 11}, {"client_ip": "9.3.185.46", "count": 8}, {"client_ip": "10.10.4.157", "count": 4} ] }
SDK
Click Document Database Service DDS SDK to download the SDK or view the SDK document. To learn how to install and authenticate an SDK, read the Usage section.
Status Code
For more information, see Status Code.
Error Code
For more information, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot