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.
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: clb.ap-shanghai-fsi.tencentcloudapi.com
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: |
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) |
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. |
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.
https://clb.tencentcloudapi.com/?Action=ModifyBlockIPList
&LoadBalancerIds.0=lb-6efswuxa
&Type=add_customized_field
&ClientIPField=client_ip_test
&<Common request parameters>
{
"Response": {
"JodId": "localjob010916173469001234512345",
"RequestId": "83329908-a282-4f9f-82ab-033a30212345"
}
}
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.
https://clb.tencentcloudapi.com/?Action=ModifyBlockIPList
&LoadBalancerIds.0=lb-6efswuxa
&Type=add_blocked
&BlockIPList.0=1.2.3.4
&ExpireTime=3000
&AddStrategy=fifo
&ClientIPField=client_ip_test
&<Common request parameters>
{
"Response": {
"JodId": "localjob010916173469001234567890",
"RequestId": "83329908-a282-4f9f-82ab-033a3025baff"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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?