tencent cloud

Feedback

DescribeIpAccessControl

Last updated: 2024-10-10 10:37:05

1. API Description

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

WAF IP blocklist/allowlist query

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: DescribeIpAccessControl.
Version Yes String Common Params. The value used for this API: 2018-01-25.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou, ap-seoul, ap-singapore.
Domain Yes String Domain name
Count Yes Integer Count identifier
ActionType No Integer Action. 40 for querying the allowlist, 42 for querying the blocklist
CtsMin No Integer Timestamp for minimum creation time
CtsMax No Integer Timestamp for Maximum Creation Time
OffSet No Integer Paging offset, a multiple of limit. The minimum value is 0, and the maximum value is Total/Limit rounded up.
Limit No Integer Number of records returned per page, which is 20 by default.
Source No String Source.
Sort No String Sort parameters
Ip No String IP
ValidStatus No Integer Effective status.
ValidTimeStampMin No String Timestamp of the minimum valid time
ValidTimeStampMax No String Timestamp of the maximum valid time
RuleId No Integer Rule ID
TimerType No Integer Filter by scheduled task type. Valid values: 0, 1, 2, 3, 4.

3. Output Parameters

Parameter Name Type Description
Data IpAccessControlData Output.
Note: This field may return null, indicating that no valid values can be obtained.
UsedTotal Integer Total number of IP addresses in the used IP allowlist/blocklist.

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 WAF IP blocklist/allowlist query

This example shows you how to query the WAF IP blocklist.

Input Example

https://waf.tencentcloudapi.com/?Action=DescribeIpAccessControl
&Domain=www.test.com
&Count=1
&ActionType=42
&Limit=20
&OffSet=0
&Sort=ts_version:-1
&<Common request parameters>

Output Example

{
    "Response": {
        "Data": {
            "Res": [
                {
                    "ActionType": 42,
                    "Ip": "1.1.1.1",
                    "Note": "",
                    "Source": "custom",
                    "TsVersion": 1579074751421,
                    "ValidTs": 1579017599
                }
            ],
            "TotalCount": 1
        },
        "RequestId": "c937ce96-cf53-4df8-b288-07c6e092072d"
    }
}

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
InternalError Internal error.
InternalError.DBErr DBErr