tencent cloud

Feedback

ModifyBlockIgnoreList

Last updated: 2023-05-04 17:40:12

1. API Description

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

This API is used to manage blocked/allowed IPs and domains.
Add IPs/domains to the blocked/allowed list
Remove IPs/domains from the blocked/allowed list
Modify events related with the IPs/domains in the blocked/allowed list

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: ModifyBlockIgnoreList.
Version Yes String Common Params. The value used for this API: 2019-09-04.
Region No String Common Params. This parameter is not required for this API.
RuleType Yes Integer Type of the rule. Values: 1 (Blocklist); 2 (Allowlist)
IOC.N Yes Array of IocListData Either IP or Domain is required
IocAction Yes String Optional values: delete, edit, and add
StartTime No String Time format: yyyy-MM-dd HH:mm:ss. Required when IocAction is edit or add
EndTime No String End time of the period in the format of yyyy-MM-dd HH:mm:ss. It must be later than both the start time and the current time. It’s required when IocAction is edit or add.

3. Output Parameters

Parameter Name Type Description
ReturnMsg String Return message
ReturnCode Integer Error code. 0: success; non-0: failed
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Modifying a block-/allowlist

Input Example

POST / HTTP/1.1
Host: cfw.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyBlockIgnoreList
<Common request parameters>

{
    "IOC": [
        {
            "IP": "192.168.1.1",
            "Direction": 1,
            "Domain": ""
        }
    ],
    "RuleType": 1,
    "IocAction": "add",
    "StartTime": "2021-04-16 18:01:09",
    "EndTime": "3000-01-01 00:00:00"
}

Output Example

{
    "Response": {
        "ReturnCode": 0,
        "ReturnMsg": "success",
        "RequestId": "cd0e1fdf-157d-438c-9bc8-75925e5d4e20"
    }
}

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.
InvalidParameter Invalid parameter.
LimitExceeded The quota limit has been reached.
UnauthorizedOperation Unauthorized operation.