Modifies the content of a mitigation policy.
Operation description
When you call this operation, you must specify all parameters. If you do not specify a parameter, its existing configuration is deleted.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-antiddosbag:ModifyPolicyContent |
update |
*Policy
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
string |
Yes |
The policy ID. |
83967609-7ea5-4f6d-a6ea-380b09e**** |
| Name |
string |
No |
The policy name. |
demo** |
| Content |
object |
No |
The policy content. |
|
| BlackIpListExpireAt |
integer |
No |
The timeout period for the IP address blacklist. 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 (for the Chinese mainland) and Anti-DDoS Premium (for 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 countries for the Location Blacklist. |
|
|
integer |
No |
The country code for the Location Blacklist. |
11 |
|
| RegionBlockProvinceList |
array |
No |
The list of provinces 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 source rate limit for PPS. Unit: packets/s. |
64 |
| Bps |
integer |
No |
The source rate limit for bandwidth. Unit: bytes/s. |
2048 |
| SynPps |
integer |
No |
The source rate limit for SYN PPS. Unit: packets/s. |
64 |
| SynBps |
integer |
No |
The source rate limit for SYN bandwidth. Unit: bytes/s. |
2048 |
| SourceBlockList |
array<object> |
No |
The blacklist for Source Rate Limiting. |
|
|
object |
No |
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 prevention. |
|
|
integer |
No |
The port to filter for reflection attack prevention. 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. |
412a7312-58ff-4e32-a202-0ab0******* |
| 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 on a matched packet. 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. |
83967609-7ea5-4f6d-a6ea-380b09e**** |
| 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 |
| 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 detection payload. The value is a hexadecimal string. |
abcd |
| MatchAction |
string |
Yes |
The action to take on a packet that matches the fingerprint. 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 rule name. |
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 detection content. 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. Valid values:
|
contain |
| Content |
string |
No |
The content to match.
|
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 end position must be greater than or equal to the start position. |
1499 |
| PortVersion |
string |
No |
The version of the port-specific mitigation policy. Valid values:
Note
This parameter is supported only by port-specific mitigation policies. |
2 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The ID of the request. |
3777EF25-940B-51F4-BB1D-99B5******** |
Examples
Success response
JSON format
{
"RequestId": "3777EF25-940B-51F4-BB1D-99B5********"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.