tencent cloud

Feedback

DescribeDDoSTrend

Last updated: 2024-07-01 09:54:30

    1. API Description

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

    This API is used to get DDoS attack traffic bandwidth and attack packet rate.

    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: DescribeDDoSTrend.
    Version Yes String Common Params. The value used for this API: 2020-03-09.
    Region No String Common Params. This parameter is not required for this API.
    Business Yes String Anti-DDoS service type. bgpip: Anti-DDoS Advanced; bgp: Anti-DDoS Pro (Single IP); bgp-multip: Anti-DDoS Pro (Multi-IP); net: Anti-DDoS Ultimate; basic: Anti-DDoS Basic
    Ip Yes String Instance IP
    Period Yes Integer Sampling period. Valid values: 300 (5 minutes), 3600 (one hour), 86400 (one day)
    StartTime Yes Timestamp Beginning of the time range for the query
    EndTime Yes Timestamp End of the time range for the query
    MetricName Yes String Metric. Valid values: bps: attack traffic bandwidth; pps: attack packet rate
    Id No String Instance ID. Leave this field empty when Business is basic, as basic protection does not require an instance.

    3. Output Parameters

    Parameter Name Type Description
    Count Integer Number of values returned
    Business String Anti-DDoS service type. bgpip: Anti-DDoS Advanced; bgp: Anti-DDoS Pro (Single IP); bgp-multip: Anti-DDoS Pro (Multi-IP); net: Anti-DDoS Ultimate; basic: Anti-DDoS Basic
    Ip String Instance IP
    Period Integer Sampling period. Valid values: 300 (5 minutes), 3600 (one hour), 86400 (one day)
    StartTime Timestamp Beginning of the time range for the query
    EndTime Timestamp End of the time range for the query
    Data Array of Integer Value array. The unit for attack traffic bandwidth is Mbps, and that for the packet rate is pps.
    Id String Instance ID
    Note: this field may return null, indicating that no valid values can be obtained.
    MetricName String Metric. Valid values: bps: attack traffic bandwidth; pps: attack packet rate
    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 Getting DDoS attack data

    Input Example

    POST / HTTP/1.1
    Host: antiddos.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeDDoSTrend
    <Common request parameters>
    
    {
        "Business": "bgpip",
        "Ip": "1.1.1.1",
        "Period": 330,
        "StartTime": "2022-10-10 01:08:00",
        "EndTime": "2022-10-10 01:13:00",
        "Id": "bgpip-00000xxx",
        "MetricName": "pps"
    }
    

    Output Example

    {
        "Response": {
            "Business": "bgpip",
            "Count": 2,
            "Data": [
                30,
                20
            ],
            "EndTime": "2022-10-10 01:13:00",
            "Id": "bgpip-00000xxx",
            "Ip": "1.1.1.1",
            "MetricName": "pps",
            "Period": 300,
            "RequestId": "2f44a9d8-2b6f-4a9a-b1da-9d05d9e6ad83",
            "StartTime": "2022-10-10 01:05:00"
        }
    }
    

    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

    There is no error code related to the API business logic. For other error codes, please see Common Error Codes.