Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com> Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
13 KiB
Querying the Number of Connections to an Instance Node
Function
This API is used to query the number of connections from each client to DDS DB instances.
Constraints
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}
- Parameter description
Table 1 Path parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Specifies the project ID of a tenant in a region.
instance_id
Yes
String
Specifies the DB instance ID.
Table 2 Query parameters Parameter
Mandatory
Type
Description
node_id
No
String
Specifies 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.
Requests
Responses
- Response parameters
Table 3 Response body parameters Parameter
Type
Description
total_connections
Integer
Indicates the total number of connections, including internal and external connections.
total_inner_connections
Integer
Indicates the total number of internal connections.
total_outer_connections
Integer
Indicates the total number of external connections.
inner_connections
Array of objects
Indicates the internal connection statistics array. Up to 200 records are supported. For details, see Table 4.
outer_connections
Array of objects
Indicates the external connection statistics array. Up to 200 records are supported. For details, see Table 4.
- 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} ] }
Error Code
For more information, see Error Code.