tencent cloud

Feedback

DescribeProxyProcessStatistics

Last updated: 2023-10-17 10:51:54

    1. API Description

    Domain name for API request: dbbrain.tencentcloudapi.com.

    This API is used to get the session statistics of a single proxy under the current instance, and can only be called in particular environments.

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: DescribeProxyProcessStatistics.
    Version Yes String Common Params. The value used for this API: 2021-05-27.
    Region No String Common Params. This parameter is not required for this API.
    InstanceId Yes String Instance ID.
    InstanceProxyId Yes String The proxy ID you want to query under the instance
    Limit Yes Integer Number of returned results.
    Product Yes String Service type. Valid value: redis (TencentDB for Redis).
    Offset No Integer Offset. Default value: 0.
    SortBy No String Sort by field. Valid values: AllConn, ActiveConn, Ip.
    OrderDirection No String Sorting order. Valid values: DESC, ASC.

    3. Output Parameters

    Parameter Name Type Description
    ProcessStatistics ProcessStatistic Real-time session statistics.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Getting the session statistics of a single proxy

    This example shows you how to get the session statistics of a single proxy.

    Input Example

    POST / HTTP/1.1
    Host: dbbrain.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeProxyProcessStatistics
    <Common request parameters>
    
    {
        "InstanceId": "redis-test",
        "Product": "redis",
        "Limit": "20",
        "InstanceProxyId": "b237ff3c5f30b0"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "099479c0-7b7c-11ed-8d71-fdsafda",
            "ProcessStatistics": {
                "Items": [
                    {
                        "Ip": "127.0.0.1",
                        "ActiveConn": "1",
                        "AllConn": 10
                    },
                    {
                        "Ip": "127.0.0.2",
                        "ActiveConn": "3",
                        "AllConn": 5
                    }
                ],
                "AllConnSum": 15,
                "ActiveConnSum": 4
            }
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    AuthFailure Error with CAM signature/authentication.
    DryRunOperation DryRun operation, which means the DryRun parameter is passed in yet the request will still be successful.
    FailedOperation Operation failed.
    InternalError Internal error.
    InvalidParameter Incorrect parameter.
    InvalidParameterValue Incorrect parameter value.
    LimitExceeded The quota limit is exceeded.
    MissingParameter Missing parameter.
    OperationDenied Operation denied.
    OperationDenied.UserHasNoStrategy Error with CAM authentication.
    RequestLimitExceeded The number of requests exceeds the frequency limit.
    UnauthorizedOperation The operation is unauthorized.
    UnknownParameter Unknown parameter.
    UnsupportedOperation Unsupported operation.