Modifies an existing mitigation policy.
Operation description
Modifies a mitigation policy.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-antiddosbag:ModifyPolicy |
update |
*Policy
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
string |
Yes |
The ID of the policy. |
c52c2fa6-fdac-40c4-8753-be7c******** |
| ActionType |
integer |
Yes |
The type of action. Valid values:
|
11 |
| Name |
string |
No |
The name of the policy. |
demo** |
| Content |
object |
No |
The content of the policy. |
|
| BlackIpListExpireAt |
integer |
No |
The time when the IP address blacklist expires. This value is a UNIX timestamp. |
1716878000 |
| EnableIntelligence |
boolean |
No |
Specifies whether to enable AI-powered protection. |
true |
| IntelligenceLevel |
string |
No |
The protection level of AI-powered protection. Valid values:
|
default |
| WhitenGfbrNets |
boolean |
No |
Specifies whether to add the origin URLs of Anti-DDoS Pro (the Chinese mainland) and Anti-DDoS Premium (outside the Chinese mainland) to the whitelist. |
false |
| EnableDropIcmp |
boolean |
No |
Specifies whether to disable the ICMP protocol. |
true |
| RegionBlockCountryList |
array |
No |
The list of country codes for the Location Blacklist. |
|
|
integer |
No |
The country code for the Location Blacklist. |
11 |
|
| RegionBlockProvinceList |
array |
No |
The list of province codes for the Location Blacklist. |
|
|
integer |
No |
The province code for the Location Blacklist. |
2 |
|
| SourceLimit |
object |
No |
The Source Rate Limiting settings. |
|
| Pps |
integer |
No |
The rate limit for source PPS. Unit: packets per second. |
64 |
| Bps |
integer |
No |
The rate limit for source bandwidth. Unit: bytes per second. |
2048 |
| SynPps |
integer |
No |
The rate limit for source SYN PPS. Unit: packets per second. |
64 |
| SynBps |
integer |
No |
The rate limit for source SYN bandwidth. Unit: bytes per second. |
2048 |
| SourceBlockList |
array<object> |
No |
The list of source IP addresses to add to the blacklist for Source Rate Limiting. |
|
|
object |
No |
The list of source IP addresses to add to the blacklist for Source Rate Limiting. |
||
| Type |
integer |
Yes |
The type of Source Rate Limiting. Valid values:
|
3 |
| BlockExpireSeconds |
integer |
Yes |
The duration for which a source IP address is added to the blacklist. Unit: seconds. |
120 |
| EverySeconds |
integer |
Yes |
The statistical period for adding a source IP address to the blacklist. Unit: seconds. |
60 |
| ExceedLimitTimes |
integer |
Yes |
The number of times a source IP address exceeds the rate limit within a statistical period. |
5 |
| ReflectBlockUdpPortList |
array |
No |
The list of ports to filter for reflection attack protection. |
|
|
integer |
No |
The port to filter for reflection attack protection. Note
Only UDP is supported. |
123 |
|
| PortRuleList |
array<object> |
No |
The list of Port Blocking rules. |
|
|
object |
No |
The list of Port Blocking rules. |
||
| Id |
string |
No |
The rule ID. |
c52c2fa6-fdac-40c4-8753-be7c********* |
| Protocol |
string |
Yes |
The protocol type. Valid values:
|
tcp |
| SrcPortStart |
integer |
Yes |
The start of the source port range. Valid values: 0 to 65535. |
0 |
| SrcPortEnd |
integer |
Yes |
The end of the source port range. Valid values: 0 to 65535. |
65535 |
| DstPortStart |
integer |
Yes |
The start of the destination port range. Valid values: 0 to 65535. |
0 |
| DstPortEnd |
integer |
Yes |
The end of the destination port range. Valid values: 0 to 65535. |
65535 |
| MatchAction |
string |
Yes |
The action to take upon a match. Valid values:
|
drop |
| SeqNo |
integer |
Yes |
The priority of the rule. The value is an integer. Note
A smaller value indicates a higher priority. |
1 |
| FingerPrintRuleList |
array<object> |
No |
The list of Byte-Match Filter rules. |
|
|
object |
No |
The list of Byte-Match Filter rules. |
||
| Id |
string |
No |
The rule ID. |
5fbe941f-a0cf-4a49-9c7c-8fac******** |
| Protocol |
string |
Yes |
The protocol type. Valid values:
|
udp |
| SrcPortStart |
integer |
Yes |
The start of the source port range. Valid values: 0 to 65535. |
0 |
| SrcPortEnd |
integer |
Yes |
The end of the source port range. Valid values: 0 to 65535. |
65535 |
| DstPortStart |
integer |
Yes |
The start of the destination port range. Valid values: 0 to 65535. |
0 |
| DstPortEnd |
integer |
Yes |
The end of the destination port range. Valid values: 0 to 65535. |
65535 |
| MinPktLen |
integer |
Yes |
The minimum packet length. Valid values: 1 to 1500. |
1 |
| MaxPktLen |
integer |
Yes |
The maximum packet length. Valid values: 1 to 1500. |
1500 |
| Offset |
integer |
No |
The offset. Valid values: 0 to 1500. |
0 |
| PayloadBytes |
string |
No |
The payload to detect. The value is a hexadecimal string. |
abcd |
| MatchAction |
string |
Yes |
The action to take upon a match. Valid values:
|
drop |
| RateValue |
integer |
No |
The rate limit. Valid values: 1 to 100000. Note
This parameter is required when MatchAction is set to ip_rate or session_rate. |
100 |
| SeqNo |
integer |
Yes |
The priority of the rule. The value is an integer. Note
A smaller value indicates a higher priority. |
1 |
| EnableL4Defense |
boolean |
No |
Specifies whether to enable port-specific mitigation. |
true |
| L4RuleList |
array<object> |
No |
The list of port-specific mitigation rules. |
|
|
array<object> |
No |
The list of port-specific mitigation rules. |
||
| Name |
string |
Yes |
The name of the rule. |
test**** |
| Priority |
integer |
No |
The priority of the rule. Valid values: 1 to 100. Note
A smaller value indicates a higher priority. |
1 |
| Method |
string |
No |
The rule type. Valid values:
|
char |
| Match |
string |
No |
The logical operator. Valid values:
|
0 |
| Action |
string |
No |
The action. Valid values:
|
2 |
| Limited |
integer |
No |
The minimum number of bytes in a session stream to trigger rule matching. Valid values: 0 to 2048 |
0 |
| ConditionList |
array<object> |
No |
The list of detection conditions. |
|
|
array<object> |
No |
The list of detection conditions. |
||
| Arg |
string |
No |
The content to detect. Note
If the rule type is char, the value must be an ASCII string. If the rule type is hex, the value must be a hexadecimal string. The maximum length is 2048 characters. |
abcd |
| Position |
integer |
No |
The start position for detection. Valid values: 0 to 2047. |
0 |
| Depth |
integer |
No |
The length of the detection window. Valid values: 1 to 2048. |
1200 |
| Encode |
string |
No |
The character type. Valid values:
|
str |
| Pattern |
string |
No |
The matching pattern. The valid values depend on the value of the Encode parameter. If Encode is set to str, valid values are:
If Encode is set to hex, valid values are:
|
contain |
| Content |
string |
No |
The requirements for this parameter depend on the value of the Encode parameter.
|
test** |
| Offset |
object |
No |
The matching range. |
|
| Start |
integer |
No |
The start position. Valid values: 0 to 1499. |
0 |
| End |
integer |
No |
The end position. Valid values: 0 to 1499. Note
The value of this parameter must be greater than or equal to the value of the Start parameter. |
1499 |
| WhiteIpList |
array |
No |
The list of IP addresses in the whitelist. |
|
|
string |
No |
The IP address in the whitelist. |
1.1.1.* |
|
| BlackIpList |
array |
No |
The list of IP addresses in the blacklist. |
|
|
string |
No |
The IP address in the blacklist. |
2.2.2.* |
|
| PortVersion |
string |
No |
The version of the port-specific mitigation policy. Valid values:
Note
This parameter is supported only for port-specific mitigation policies. |
2 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The ID of the request. |
B4B379C2-9319-4C6B-B579-FE36831**** |
Examples
Success response
JSON format
{
"RequestId": "B4B379C2-9319-4C6B-B579-FE36831****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.