Platform O&M/Cloud Monitoring/Monitoring and Alarm/SNS/ZWatch Operations/Alarm Operations
POSTAlarm OperationsSince 2.3SynchronousAuth Required
AddLabelToAlarm
AddLabelToAlarm
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
alarmUuidStringRequiredThe alarm UUID.
Body Fields
paramsObjectRequiredRequest body parameter object.
keyStringRequiredThe label key.
valueStringRequiredThe label value.
operatorStringRequiredThe operator.
resourceUuidStringOptional.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/zwatch/alarms/{alarmUuid}/labels
/zstack/v1/zwatch/alarms/{alarmUuid}/labels
Request Example
curl -X POST 'http://{host}/zstack/v1/zwatch/alarms/{alarmUuid}/labels' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"key":"<key>","value":"<value>","operator":"<operator>","resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "3f54b760c8d64e17bc282258335b718a", "key": "VMUuid", "operator": "\u003d", "value": "dd5b28c103594573b7bb21a02cb000c4" } }Change History
This API has no change history records yet.
