Updates a push alert policy.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sysom:UpdateAlertStrategy |
none |
*All Resource
|
None | None |
Request syntax
POST /api/v1/alertPusher/alert/updateStrategy HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The HTTP request body. |
|
| enabled |
boolean |
Yes |
Specifies whether the alert policy is enabled. |
true |
| id |
integer |
Yes |
The ID of the alert policy. |
1 |
| k8sLabel |
boolean |
No |
The Kubernetes label. |
|
| name |
string |
Yes |
The name of the alerting policy. |
strategy1 |
| strategy |
object |
Yes |
The details of the alert policy. |
|
| clusters |
array |
No |
The collection of clusters that receive alerts. |
|
|
string |
No |
The cluster name. |
cluster1 |
|
| destinations |
array |
No |
The alert contacts. |
|
|
integer |
No |
The alert contacts. |
||
| items |
array |
No |
The collection of exception items that receive alerts. |
|
|
string |
No |
The name of the exception item. |
Node CPU Usage Detection |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| code |
string |
The status code.
|
Success |
| data |
any |
The response data. |
{ "uid": "uid-1", "name": "test-name", "strategy": { "clusters": ["test-cluster-1","test-cluster-2"], "items": ["test-item1","test-item2"] }, "enabled": True } |
| message |
string |
The error message.
|
Failed to update alert policy |
| requestId |
string |
Id of the request |
2D693121-C925-5154-8DF6-C09A8B369822 |
Examples
Success response
JSON format
{
"code": "Success",
"data": "{\n \"uid\": \"uid-1\",\n \"name\": \"test-name\",\n \"strategy\": {\n \"clusters\": [\"test-cluster-1\",\"test-cluster-2\"],\n \"items\": [\"test-item1\",\"test-item2\"]\n },\n \"enabled\": True\n}",
"message": "Failed to update the alert policy",
"requestId": "2D693121-C925-5154-8DF6-C09A8B369822"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.