Creates a user-defined defense rule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-sas:AddClientUserDefineRule |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the custom rule. |
Rule1 |
| Type |
integer |
Yes |
The rule type. Valid values:
|
1 |
| Md5List |
string |
No |
The list of process hashes. |
0c9045b5bec90f9825f1f3f64dd4**** |
| ActionType |
integer |
Yes |
The action type. Valid values:
|
1 |
| ProcPath |
string |
No |
The process path. |
c:/windows/system32/i**** |
| Cmdline |
string |
No |
The command line. |
/usr/sbin/s**** |
| Platform |
string |
No |
The operating system type. Valid values:
|
linux |
| IP |
string |
No |
The IP address. |
10.240.XX.XX |
| Port |
integer |
No |
The port number. This parameter is deprecated. |
22 |
| FilePath |
string |
No |
The file path. |
/etc/pam**** |
| RegistryKey |
string |
No |
The registry key. |
HKEY_DYN_**** |
| RegistryContent |
string |
No |
The registry value. |
*SECOH-QAD.exe* |
| NewFilePath |
string |
No |
The new file path for file rename. |
/etc/pam**** |
| ParentProcPath |
string |
No |
The parent process path. |
c:/windows/system32/i**** |
| ParentCmdline |
string |
No |
The parent command line. |
/usr/sbin/s**** |
| PortStr |
string |
No |
The port number. Valid values: 1 to 65535. |
80 |
| Domain |
string |
No |
The domain name. |
example.com |
| TargetDefault |
string |
No |
Specifies whether machines are automatically added to the rule. Default value: add. Valid values:
|
add |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID, which is a unique identifier generated by Alibaba Cloud for the request. You can use this ID to troubleshoot issues. |
32A73759-4C0F-4801-BE98-901223ACEE9A |
| UserDefineRuleAddResult |
object |
The custom rule identifier. |
|
| SwitchId |
string |
The switch ID associated with the rule. |
USER-DEFINE-RULE-SWITCH-TYPE_200**** |
| Id |
integer |
The rule ID. |
1 |
| Platform |
string |
The operating system type. Valid values:
|
linux |
Examples
Success response
JSON format
{
"RequestId": "32A73759-4C0F-4801-BE98-901223ACEE9A",
"UserDefineRuleAddResult": {
"SwitchId": "USER-DEFINE-RULE-SWITCH-TYPE_200****",
"Id": 1,
"Platform": "linux"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidPlatform | Invalid Platform value. | |
| 400 | InvalidUserDefineRuleName | Invalid Name value. | |
| 400 | UserDefineRuleNameTooLong | User define rule name too long. | |
| 400 | InvalidUserDefineRuleActionType | Invalid ActionType value. | |
| 400 | InvalidUserDefineRuleType | Invalid Type value. | |
| 400 | InvalidUserDefineRuleMd5List | Invalid Md5List value. | |
| 400 | UserDefineRuleMd5TooMany | Too many user define rule md5s. | |
| 400 | InvalidProcPath | Process path is invalid. | |
| 400 | UserDefineRuleProcPathMustContainsLetter | User define rule process path must contain letter. | |
| 400 | InvalidUserDefineRuleProcPath | User define rule process path is invalid. | |
| 400 | InvalidCmdline | Command line is invalid. | |
| 400 | UserDefineRuleCmdlineTooLong | User define rule command line too long. | |
| 400 | InvalidIP | Invalid IP value. | |
| 400 | InvalidPort | Invalid PortStr value. | |
| 400 | InvalidFilePath | Invalid FilePath value. | |
| 400 | UserDefineRuleFilePathTooLong | User define rule file path too long. | |
| 400 | UserDefineRulesTooMany | Too many rules. | |
| 500 | ServerError | ServerError | |
| 403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.