tencent cloud



Last updated: 2022-02-21 10:11:15

1. API Description

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

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.

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.
This document describes the parameters for Signature V1. It's recommended to use the V3 signature, which provides higher security. Note that for Signature V3, the common parameters need to be placed in the HTTP Header. See details.

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 Setting the header to enable the blocklist feature

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

    Input Example

    &<Common request parameters>

    Output Example

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

    Example2 Blocking IPs

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

    Input Example

    &<Common request parameters>

    Output Example

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

    5. Developer Resources


    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.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support