Updating Alarm Configuration
Function
This API allows you to update alarm configuration, such as whether a certain type of alarms will be received, and whether alarms are received through SMS messages or emails.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/warnalert/alertconfig/update
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project 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 the user token. |
| Content-Type | Yes | String | Content-Type request header. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| display_name | Yes | String | Alarm group description. |
| topic_urn | Yes | String | Unique ID of an alarm group. |
| warn_config | Yes | WarnConfig object | Alarm configuration. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| antiDDoS | Yes | Boolean | DDoS attack. |
| back_doors | No | Boolean | Web shell. |
| high_privilege | No | Boolean | Excessive privileges assigned to a database process. |
| remote_login | No | Boolean | Alarms about remote logins. |
| send_frequency | No | Integer | Range Mandatory for the HID. |
| waf | No | Boolean | Reserved field. |
| weak_password | No | Boolean | Weak password (system and database). |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Internal error code. |
| error_msg | String | Internal error description. |
Example Requests
Set the SMN topic to urn:smn:region-7:2d2d90a56a3243bdb909f6a24a27be8d:cnad-test-intl and set the attack notification type to DDoS attacks.
POST https://{endpoint}/v2/{project_id}/warnalert/alertconfig/update
{
"display_name" : "",
"topic_urn" : "urn:smn:region-7:2d2d90a56a3243bdb909f6a24a27be8d:cnad-test-intl",
"warn_config" : {
"antiDDoS" : true,
"back_doors" : false,
"high_privilege" : false,
"remote_login" : false,
"send_frequency" : 1,
"waf" : false,
"weak_password" : false
}
} Example Responses
Status code: 200
Request succeeded.
{
"error_code" : "10000000",
"error_msg" : "Ok",
"task_id" : ""
} 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.