tencent cloud

文档反馈

DescribeTimingL4Data

最后更新时间:2024-10-11 15:52:32

    1. API Description

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

    This API is used to query the list of L4 traffic data recorded over time.

    A maximum of 100 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: DescribeTimingL4Data.
    Version Yes String Common Params. The value used for this API: 2022-09-01.
    Region No String Common Params. This parameter is not required.
    StartTime Yes Timestamp ISO8601 The start time.
    EndTime Yes Timestamp ISO8601 The end time.
    MetricNames.N Yes Array of String Query indicator. Values:
  • l4Flow_connections: Number of access connections;
  • l4Flow_flux: Total access traffic;
  • l4Flow_inFlux: Ingress access traffic;
  • l4Flow_outFlux: Egress access traffic.
  • ZoneIds.N No Array of String ZoneId set. This parameter is required.
    ProxyIds.N No Array of String List of L4 proxy IDs. All L4 proxies will be selected if this field is not specified.
    Interval No String The query granularity. Values:
  • min: 1 minute;
  • 5min: 5 minutes;
  • hour: 1 hour;
  • day: 1 day.
  • If this field is not specified, the granularity will be determined based on the query period.
    Period ≤ 1 hour: min;
    1 hour < Period ≤ 2 days: 5min;
    2 days < period ≤ 7 days: hour;
    Period > 7 days: day.
    Filters.N No Array of QueryCondition Filter criteria. The detailed Key values of filter criteria are as follows:
  • ruleId: Filter by forwarding rule ID.
  • proxyId: Filter by L4 proxy instance ID.
  • Area No String Geolocation scope. Values:
  • overseas: Regions outside the Chinese mainland
  • mainland: Chinese mainland
  • global: Global
  • If this field is not specified, the default value global is used.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Total number of query results.
    Data Array of TimingDataRecord The list of L4 traffic data recorded over time.
    Note: This field may return null, indicating that no valid values can be obtained.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Querying L4 Time Sequence Traffic Data

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeTimingL4Data
    <Common request parameters>
    
    {
        "EndTime": "2022-08-29T19:17:59+08:00",
        "Interval": "day",
        "Area": "mainland",
        "StartTime": "2022-07-31T00:00:00+08:00",
        "MetricNames": [
            "l4Flow_inFlux"
        ],
        "ZoneIds": [
            "zone-28kw53cmc6ky"
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "e12e0659-ae34-4140-9878-4a61db0c3639",
            "Data": [
                {
                    "TypeKey": "251227260",
                    "TypeValue": [
                        {
                            "Avg": 740563,
                            "Detail": [
                                {
                                    "Timestamp": 1659139200,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1659225600,
                                    "Value": 0
                                }
                            ],
                            "Max": 6319079,
                            "MetricName": "l4Flow_inFlux",
                            "Sum": 22957455
                        }
                    ]
                }
            ],
            "TotalCount": 1
        }
    }
    

    Example2 Querying L4 Traffic Data based on L4 Proxy ID

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeTimingL4Data
    <Common request parameters>
    
    {
        "EndTime": "2022-08-29T19:17:59+08:00",
        "Interval": "day",
        "Area": "mainland",
        "StartTime": "2022-07-31T00:00:00+08:00",
        "MetricNames": [
            "l4Flow_inFlux"
        ],
        "ZoneIds": [
            "zone-28kw53cmc6ky"
        ],
        "Filters": [
            {
                "Key": "proxyId",
                "Operator": "equals",
                "Value": [
                    "sid-2c2uug8ubfmn"
                ]
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "962792de-3bfe-483d-99a7-3cfde0467495",
            "Data": [
                {
                    "TypeKey": "zone-28kw53cmc6ky",
                    "TypeValue": [
                        {
                            "Avg": 267,
                            "Detail": [
                                {
                                    "Timestamp": 1671669600,
                                    "Value": 390
                                },
                                {
                                    "Timestamp": 1671669900,
                                    "Value": 740
                                },
                                {
                                    "Timestamp": 1671670200,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671670500,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671670800,
                                    "Value": 562
                                },
                                {
                                    "Timestamp": 1671671100,
                                    "Value": 690
                                },
                                {
                                    "Timestamp": 1671671400,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671671700,
                                    "Value": 1353
                                },
                                {
                                    "Timestamp": 1671672000,
                                    "Value": 1291
                                },
                                {
                                    "Timestamp": 1671672300,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671672600,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671672900,
                                    "Value": 300
                                },
                                {
                                    "Timestamp": 1671673200,
                                    "Value": 453
                                },
                                {
                                    "Timestamp": 1671673500,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671673800,
                                    "Value": 19
                                },
                                {
                                    "Timestamp": 1671674100,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671674400,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671674700,
                                    "Value": 204
                                },
                                {
                                    "Timestamp": 1671675000,
                                    "Value": 530
                                },
                                {
                                    "Timestamp": 1671675300,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671675600,
                                    "Value": 975
                                },
                                {
                                    "Timestamp": 1671675900,
                                    "Value": 777
                                },
                                {
                                    "Timestamp": 1671676200,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671676500,
                                    "Value": 530
                                },
                                {
                                    "Timestamp": 1671676800,
                                    "Value": 320
                                },
                                {
                                    "Timestamp": 1671677100,
                                    "Value": 303
                                },
                                {
                                    "Timestamp": 1671677400,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671677700,
                                    "Value": 183
                                },
                                {
                                    "Timestamp": 1671678000,
                                    "Value": 320
                                },
                                {
                                    "Timestamp": 1671678300,
                                    "Value": 670
                                },
                                {
                                    "Timestamp": 1671678600,
                                    "Value": 131
                                },
                                {
                                    "Timestamp": 1671678900,
                                    "Value": 804
                                },
                                {
                                    "Timestamp": 1671679200,
                                    "Value": 131
                                }
                            ],
                            "Max": 31540,
                            "MetricName": "l4Flow_outFlux",
                            "Sum": 147864
                        }
                    ]
                }
            ],
            "TotalCount": 1
        }
    }
    

    Example3 Querying L4 Traffic Data based on the Forwarding Rule ID

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeTimingL4Data
    <Common request parameters>
    
    {
        "EndTime": "2022-08-29T19:17:59+08:00",
        "Interval": "day",
        "Area": "mainland",
        "StartTime": "2022-07-31T00:00:00+08:00",
        "MetricNames": [
            "l4Flow_inFlux"
        ],
        "ZoneIds": [
            "zone-28kw53cmc6ky"
        ],
        "Filters": [
            {
                "Key": "ruleId",
                "Operator": "equals",
                "Value": [
                    "rule-033950bf-6fc4-11ed-8ab2-525400a22580"
                ]
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "962792de-3bfe-483d-99a7-3cfde0467495",
            "Data": [
                {
                    "TypeKey": "zone-28kw53cmc6ky",
                    "TypeValue": [
                        {
                            "Avg": 267,
                            "Detail": [
                                {
                                    "Timestamp": 1671669600,
                                    "Value": 390
                                },
                                {
                                    "Timestamp": 1671669900,
                                    "Value": 740
                                },
                                {
                                    "Timestamp": 1671670200,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671670500,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671670800,
                                    "Value": 562
                                },
                                {
                                    "Timestamp": 1671671100,
                                    "Value": 690
                                },
                                {
                                    "Timestamp": 1671671400,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671671700,
                                    "Value": 1353
                                },
                                {
                                    "Timestamp": 1671672000,
                                    "Value": 1291
                                },
                                {
                                    "Timestamp": 1671672300,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671672600,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671672900,
                                    "Value": 300
                                },
                                {
                                    "Timestamp": 1671673200,
                                    "Value": 453
                                },
                                {
                                    "Timestamp": 1671673500,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671673800,
                                    "Value": 19
                                },
                                {
                                    "Timestamp": 1671674100,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671674400,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671674700,
                                    "Value": 204
                                },
                                {
                                    "Timestamp": 1671675000,
                                    "Value": 530
                                },
                                {
                                    "Timestamp": 1671675300,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671675600,
                                    "Value": 975
                                },
                                {
                                    "Timestamp": 1671675900,
                                    "Value": 777
                                },
                                {
                                    "Timestamp": 1671676200,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671676500,
                                    "Value": 530
                                },
                                {
                                    "Timestamp": 1671676800,
                                    "Value": 320
                                },
                                {
                                    "Timestamp": 1671677100,
                                    "Value": 303
                                },
                                {
                                    "Timestamp": 1671677400,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1671677700,
                                    "Value": 183
                                },
                                {
                                    "Timestamp": 1671678000,
                                    "Value": 320
                                },
                                {
                                    "Timestamp": 1671678300,
                                    "Value": 670
                                },
                                {
                                    "Timestamp": 1671678600,
                                    "Value": 131
                                },
                                {
                                    "Timestamp": 1671678900,
                                    "Value": 804
                                },
                                {
                                    "Timestamp": 1671679200,
                                    "Value": 131
                                }
                            ],
                            "Max": 31540,
                            "MetricName": "l4Flow_outFlux",
                            "Sum": 147864
                        }
                    ]
                }
            ],
            "TotalCount": 1
        }
    }
    

    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
    FailedOperation Operation failed.
    InternalError.ProxyServer An unknown error occurred in the backend server.
    InternalError.RouteError The backend routing address is incorrect.
    LimitExceeded The quota limit has been reached.
    ResourceNotFound The resource doesn’t exist.
    ResourceUnavailable The resource is unavailable.
    UnauthorizedOperation.CamUnauthorized CAM is not authorized.
    联系我们

    联系我们,为您的业务提供专属服务。

    技术支持

    如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

    7x24 电话支持