Platform O&M/Cloud Monitoring/Monitoring and Alarm/SNS/ZWatch Operations/Alarm Operations
PUTAlarm OperationsSince 2.3SynchronousAuth Required
UpdateAlarm
UpdateAlarm
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
uuidStringRequiredThe resource UUID.
Body Fields
updatealarmObjectRequiredupdatealarm request body object.
nameStringOptional. The resource name.
descriptionStringOptional. The detailed description of the resource.
comparisonOperatorStringOptional. The threshold comparison operator.
periodIntegerOptional. The threshold duration.
thresholdDoubleOptional. The threshold.
repeatIntervalIntegerOptional. The alarm repeat interval.
repeatCountIntegerOptional. The alarm repeat count.
repeatCountIntegerOptional. The alarm repeat count.
enableRecoveryBooleanOptional. Whether to enable the recovery notification.
emergencyLevelStringThe alarm emergency level.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
PUT/zstack/v1/zwatch/alarms/{uuid}/actions
/zstack/v1/zwatch/alarms/{uuid}/actions
Request Example
curl -X PUT 'http://{host}/zstack/v1/zwatch/alarms/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"updatealarm":{"name":"<name>","description":"<description>","comparisonOperator":"<comparisonOperator>","period":1,"threshold":1,"repeatInterval":1,"repeatCount":1,"enableRecovery":true,"emergencyLevel":"<emergencyLevel>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "33e642a1eb3c4f27a7da7acc5891de0a", "name": "VM CPU Alarm", "comparisonOperator": "LessThanOrEqualTo", "period": 60.0, "namespace": "ZStack/VM", "metricName": "org.zstack.zwatch.datatype.Metric@22c0dd63", "threshold": 30.0, "repeatInterval": 1800.0, "repeatCount": -1.0, "status": "Alarm", "state": "Enabled", "createDate": "Jan 8, 2019 4:11:27 PM", "lastOpDate": "Jan 8, 2019 4:11:27 PM", "labels": [ { "uuid": "c4da2db2fa454368a3a05016ae8c8070", "key": "VMUuid", "operator": "\u003d", "value": "396d863211e446938ea01eb10bc9fd18" } ], "actions": [ { "alarmUuid": "0d18a844bbf544bb914ab9287651f59f", "actionType": "sns", "actionUuid": "17b884822b284e6e9a0b67307a28955c" } ] } }Change History
This API has no change history records yet.
