Handling Alarm Events
Function
This API is used to handle alarm events.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
POST /v5/{project_id}/event/operate
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
enterprise_project_id |
No |
String |
ID of the enterprise project that a server belongs. An enterprise project can be configured only after the enterprise project function is enabled. Enterprise project ID. The value 0 indicates the default enterprise project. To query servers in all enterprise projects, set this parameter to all_granted_eps. If you have only the permission on an enterprise project, you need to transfer the enterprise project ID to query the server in the enterprise project. Otherwise, an error is reported due to insufficient permission. |
|
container_name |
No |
String |
Container instance name |
|
container_id |
No |
String |
Container ID |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
|
region |
No |
String |
Region ID |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
operate_type |
Yes |
String |
Definition Handling method. Range |
|
handler |
No |
String |
Definition Remarks. This parameter is available only for handled alarms. Range The value can contain 1 to 256 characters. |
|
operate_event_list |
Yes |
Array of OperateEventRequestInfo objects |
Operated event list |
|
event_white_rule_list |
No |
Array of EventWhiteRuleListRequestInfo objects |
User-defined alarm whitelist |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
event_class_id |
Yes |
String |
Definition Event Category Range
|
|
event_id |
Yes |
String |
Definition Event ID. Range The value can contain 1 to 64 characters. |
|
event_type |
Yes |
Integer |
Definition Event type. Range |
|
occur_time |
Yes |
Integer |
Definition Occurrence time, accurate to milliseconds Range The value ranges from 0 to 9223372036854775807. The time format is a timestamp (UTC time zone, starting from 1970-01-01 00:00:00), in milliseconds. |
|
operate_detail_list |
Yes |
Array of EventDetailRequestInfo objects |
Operation details. If operate_type is set to add_to_alarm_whitelist or remove_from_alarm_whitelist, keyword and hash are mandatory. If operate_type is set to add_to_login_whitelist or remove_from_login_whitelist, login_ip, private_ip, and login_user_name are mandatory. If operate_type is set to isolate_and_kill or do_not_isolate_or_kill, agent_id, file_hash, file_path, and process_pid are mandatory. In other cases, this parameter is optional. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
agent_id |
No |
String |
Definition Unique ID of the antivirus agent installed on a server, which is used to associate the server with the antivirus service. Constraints N/A Range The value can contain 1 to 64 characters. Default Value N/A |
|
process_pid |
No |
Integer |
Definition Process ID. Range The value range is 0 to 2,147,483,647. |
|
file_hash |
No |
String |
Definition File hash. Range The value can contain 1 to 256 characters. |
|
file_path |
No |
String |
Definition File path. Range The value can contain 1 to 256 characters. |
|
file_attr |
No |
String |
Definition System attributes of a file (such as read and write permissions, hidden attributes, and execution permissions). Range The value can contain 1 to 256 characters. |
|
keyword |
No |
String |
Definition Alarm event keyword, which is used only for the alarm whitelist. Range The value can contain 1 to 256 characters. |
|
hash |
No |
String |
Definition Alarm event hash, which is used only for the alarm whitelist. Range The value can contain 1 to 256 characters. |
|
private_ip |
No |
String |
Definition Server private IP address. Range The value can contain 1 to 128 characters. |
|
login_ip |
No |
String |
Definition Login source IP address. Range The value can contain 1 to 256 characters. |
|
login_user_name |
No |
String |
Definition Login username. Range The value can contain 1 to 256 characters. |
|
container_id |
No |
String |
Container ID |
|
container_name |
No |
String |
Container name |
Response Parameters
Status code: 200
Request succeeded.
None
Example Requests
Manually handle the intrusion alarms whose alarm event type is Rootkit and alarm event ID is 2a71e1e2-60f4-4d56-b314-2038fdc39de6.
POST https://{endpoint}/v5/{project_id}/event/operate?enterprise_project_id=xxx
{
"operate_type" : "mark_as_handled",
"handler" : "test",
"operate_event_list" : [ {
"event_class_id" : "rootkit_0001",
"event_id" : "2a71e1e2-60f4-4d56-b314-2038fdc39de6",
"occur_time" : 1672046760353,
"event_type" : 1010,
"operate_detail_list" : [ {
"agent_id" : "c9bed5397db449ebdfba15e85fcfc36accee125c68954daf5cab0528bab59bd8",
"file_hash" : "e8b50f0b91e3dce0885ccc5902846b139d28108a0a7976c9b8d43154c5dbc44d",
"file_path" : "/usr/test",
"process_pid" : 3123,
"file_attr" : 33261,
"keyword" : "file_path=/usr/test",
"hash" : "e8b50f0b91e3dce0885ccc5902846b139d28108a0a7976c9b8d43154c5dbc44d",
"login_ip" : "127.0.0.1",
"private_ip" : "127.0.0.2",
"login_user_name" : "root",
"container_id" : "containerid",
"container_name" : "/test"
} ]
} ]
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot