Domain name for API request: teo.tencentcloudapi.com.
This API is used to modify DDoS mitigation configuration.
A maximum of 20 requests can be initiated per second for this API.
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: ModifyDDoSPolicy. |
Version | Yes | String | Common Params. The value used for this API: 2022-01-06. |
Region | No | String | Common Params. This parameter is not required for this API. |
PolicyId | Yes | Integer | ID of the policy group |
ZoneId | Yes | String | Top-level domain name |
DdosRule | No | DdosRule | Detailed DDoS mitigation configuration |
Parameter Name | Type | Description |
---|---|---|
PolicyId | Integer | ID of the policy group |
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 set the 10K connections per second limit on new connections.
POST / HTTP/1.1
Host: teo.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyDDoSPolicy
<Common request parameters>
{
"PolicyId": 1,
"ZoneId": "zone-27filz8zp3vi",
"DdosRule": {
"DdosAntiPly": {
"AbnormalConnectNum": 0,
"AbnormalSynNum": 0,
"AbnormalSynRatio": 0,
"ConnectTimeout": 0,
"DestinationConnectLimit": 0,
"DestinationCreateLimit": 0,
"DropIcmp": "on",
"DropOther": "off",
"DropTcp": "off",
"DropUdp": "off",
"EmptyConnectProtect": 0,
"SourceConnectLimit": 0,
"SourceCreateLimit": 10000,
"UdpShard": "off"
}
}
}
{
"Response": {
"RequestId": "cb1f63d0-9173-4a1e-adb9-bd1ee2642b58",
"PolicyId": 1
}
}
This example shows you how to add an IP to the blocklist.
POST / HTTP/1.1
Host: teo.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyDDoSPolicy
<Common request parameters>
{
"PolicyId": 1,
"ZoneId": "zone-27filz8zp3vi",
"DdosRule": {
"DdosAllowBlock": {
"UserAllowBlockIp": [
{
"Ip": "1.1.1.1",
"Mask": 0,
"Ip2": "",
"Mask2": 0,
"Type": "block",
"UpdateTime": 0
}
]
}
}
}
{
"Response": {
"RequestId": "cb1f63d0-9173-4a1e-adb9-bd1ee2642b58",
"PolicyId": 1
}
}
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 |
---|---|
InvalidParameter.Security | Invalid parameter. |
OperationDenied | Operation denied. |
Was this page helpful?