Last updated: 2020-10-16 18:26:14

1. API Description

Domain name for API request:

This API is used to modify the client IP blocklist of a CLB instance. One forwarding rule supports blocking up to 2,000,000 IPs. One blocklist can contain up to 2,000,000 entries.
(This API is in beta test. To use it, please submit a ticket.)

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

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example:

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 parameter. The value used for this API: ModifyBlockIPList.
Version Yes String Common parameter. The value used for this API: 2018-03-17.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
LoadBalancerIds.N Yes Array of String CLB instance ID
Type Yes String Operation type. Valid values:
  • add_customized_field (sets header initially to enable the blocklist feature)
  • set_customized_field (modifies header)
  • del_customized_field (deletes header)
  • add_blocked (adds IPs to blocklist)
  • del_blocked (deletes IPs from blocklist)
  • flush_blocked (clears blocklist)
  • ClientIPField Yes String Header field that stores real client IPs
    BlockIPList.N No Array of String List of blocked IPs. The array can contain up to 200,000 entries in one operation.
    ExpireTime No Integer Expiration time in seconds. Default value: 3600
    AddStrategy No String IP adding policy. Valid value: fifo (if a blocklist is full, new IPs added to the blocklist will adopt the first-in first-out policy)

    3. Output Parameters

    Parameter Name Type Description
    JodId String Async task ID
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Blacklisting

    This example shows you how to blacklist IPs. You need to specify the header field storing real client IPs to enable the blacklist feature first, and then you can blacklist IPs (you can delete IPs from the blacklist or clear the blacklist in a similar way).

    Input Example
    &<Common request parameters>

    Output Example

      "Response": {
        "JodId": "localjob010916173469001234567890",
        "RequestId": "83329908-a282-4f9f-82ab-033a3025baff"

    Example2 Setting header to enable blacklist feature

    This example shows you how to use the blacklist feature. You need to set the header first by specifying the header field storing real client IPs to enable the blacklist feature.

    Input Example
    &<Common request parameters>

    Output Example

      "Response": {
        "JodId": "localjob010916173469001234512345",
        "RequestId": "83329908-a282-4f9f-82ab-033a30212345"

    5. Developer Resources

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.


    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 Internal error.
    InvalidParameter Parameter error.
    InvalidParameter.FormatError Wrong parameter format.
    InvalidParameterValue Incorrect parameter value.
    InvalidParameterValue.Length Wrong parameter length.
    MissingParameter Missing parameter.
    UnauthorizedOperation Unauthorized operation.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback