Platform O&M/Cloud Monitoring/Monitoring and Alarm/SNS/ZWatch Operations/Alarm Operations
PUTAlarm OperationsSince 4.7.0SynchronousAuth Required
UpdateActiveAlarmTemplate
UpdateActiveAlarmTemplate
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Query Parameters
Request Inputs
Path Parameters
uuidStringRequiredThe template UUID.
Query Parameters
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Body Fields
updateactivealarmtemplateObjectRequiredupdateactivealarmtemplate request body object.
alarmNameStringOptional. The template name.
comparisonOperatorStringOptional. The threshold comparison operator.
periodIntegerOptional. The threshold comparison operator.
thresholdDoubleOptional. The threshold.
repeatIntervalIntegerOptional. The alarm repeat interval.
repeatCountIntegerOptional. The alarm repeat count.
emergencyLevelStringOptional. The alarm emergency level.
labelsStringOptional.
Responses
Endpoint
PUT/zstack/v1/zwatch/activealarms/templates/{uuid}/actions
/zstack/v1/zwatch/activealarms/templates/{uuid}/actions
Request Example
curl -X PUT 'http://{host}/zstack/v1/zwatch/activealarms/templates/{uuid}/actions?systemTags=<systemTags>&userTags=<userTags>' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"updateactivealarmtemplate":{"alarmName":"<alarmName>","comparisonOperator":"<comparisonOperator>","period":1,"threshold":1,"repeatInterval":1,"repeatCount":1,"emergencyLevel":"<emergencyLevel>","labels":"<labels>"}}'
Response Example
200{ "inventory": { "uuid": "ea8aa7b6b2e43d4a9f3a19ba121ab72a", "alarmName": "VM CPU Alarm", "comparisonOperator": "LessThanOrEqualTo", "period": 60, "repeatInterval": 60, "repeatCount": -1, "namespace": "zstack/VM", "metricName": "CPUIdleUtilization", "threshold": 30.0, "emergencyLevel": "Emergent", "labels": "[{\"uuid\":\"48cc4d3273a249009ea2166b71495785\",\"key\":\"VMUuid\",\"operator\":\"\u003d\",\"value\":\"c69d93586ca349b9a3bc074e2739e20a\"}]", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } }Change History
This API has no change history records yet.
