Creates a custom defense rule.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Name | string | Yes | The name of the custom defense rule. | Rule 1 |
Type | integer | Yes | The type of the custom defense rule. Valid values:
| 1 |
Md5List | string | No | The hash values of processes. | 0c9045b5bec90f9825f1f3f64dd4**** |
ActionType | integer | Yes | The action of the custom defense rule. Valid values:
| 1 |
ProcPath | string | No | The path to the process. | c:/windows/system32/i**** |
Cmdline | string | No | The command line. | /usr/sbin/s**** |
Platform | string | No | The type of the operating system. 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 after the file is renamed. | /etc/pam**** |
ParentProcPath | string | No | The path to the parent process. | 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 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "379a9b8f-107b-4630-9e95-2299a1ea****",
"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. | - |
403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
500 | ServerError | ServerError | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-03-13 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-10-20 | The Error code has changed | View Change Details |
2023-09-07 | The Error code has changed | View Change Details |