Updates the status of a push alert policy.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sysom:UpdateAlertEnabled |
none |
*All Resource
|
None | None |
Request syntax
POST /api/v1/alertPusher/alert/updateEnabled HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body parameters. |
|
| enabled |
boolean |
No |
Specifies whether the alert policy is enabled. |
true |
| id |
integer |
No |
The ID of the alert policy. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| code |
string |
The status code.
|
Success |
| data |
any |
The response data. |
{ "uid": "1808078950770264", "name": "test-name", "strategy": { "items": [ "Node CPU usage detection" ], "clusters": [ "cluster1" ] }, "enabled": true, "id": 1, "created_at": 1753172727, "updated_at": 1753172727 } |
| message |
string |
The error message.
|
success |
| requestId |
string |
Id of the request |
2D693121-C925-5154-8DF6-C09A8B369822 |
Examples
Success response
JSON format
{
"code": "Success",
"data": "{\n \"uid\": \"1808078950770264\",\n \"name\": \"test-name\",\n \"strategy\": {\n \"items\": [\n \"节点CPU使用率检测\"\n ],\n \"clusters\": [\n \"cluster1\"\n ]\n },\n \"enabled\": true,\n \"id\": 1,\n \"created_at\": 1753172727,\n \"updated_at\": 1753172727\n }",
"message": "success",
"requestId": "2D693121-C925-5154-8DF6-C09A8B369822\n"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.