Remove Action from Alarm

DELETE/zstack/v1/zwatch/alarms/{alarmUuid}/actions/{actionUuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/zwatch/alarms/2c95bdf5490131bbb421622579b59eb8/actions/41c582ab1cea31d5addd02bb00bb173d

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
alarmUuidStringurlAlarm UUID. 2.3
actionUuidStringurlAlarm action UUID. 2.3
deleteMode (Optional)Stringbody  2.3
systemTags (Optional)ListbodySystem tags. 2.3
userTags (Optional)ListbodyUser tags. 2.3

API Response

Response Example

{
  "inventory": {
    "uuid": "3f753a2f9dd44becb0435b2a517fd5d4",
    "name": "VM CPU Alarm",
    "comparisonOperator": "LessThanOrEqualTo",
    "period": 60.0,
    "namespace": "ZStack/VM",
    "metricName": "org.zstack.zwatch.datatype.Metric@565e1ebe",
    "threshold": 30.0,
    "repeatInterval": 1800.0,
    "status": "Alarm",
    "state": "Enabled",
    "createDate": "Jul 6, 2018 1:50:59 PM",
    "lastOpDate": "Jul 6, 2018 1:50:59 PM",
    "labels": [
      {
        "uuid": "cf7ff04d570f4f509e6b22851ceb231d",
        "key": "VMUuid",
        "operator": "=",
        "value": "cda155f903f1417f951578ea74623f5e"
      }
    ],
    "actions": [
      {
        "alarmUuid": "5d2a502edc8d4c34b90ae499c7fdb437",
        "actionType": "sns",
        "actionUuid": "4b7903efe370462aab75bb5890971e6d"
      }
    ]
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null on success. See error for details.2.3
inventoryAlarmInventorySee inventory for details.2.3

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001.2.3
descriptionStringA brief description of the error.2.3
detailsStringDetailed information about the error.2.3
elaborationStringA reserved field. Default is null.2.3
opaqueLinkedHashMapA reserved field. Default is null.2.3
causeErrorCodeThe root error. The source error that caused the current error. This field is null if there is no root error.2.3

inventory

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource.2.3
nameStringResource name.2.3
descriptionStringDetailed description of the resource.2.3
periodIntegerThreshold duration.2.3
namespaceStringNamespace.2.3
metricNameStringMetric name.2.3
thresholdDoubleThreshold.2.3
repeatIntervalIntegerAlarm repeat interval.2.3
createDateTimestampCreation time.2.3
lastOpDateTimestampLast modification time.2.3
comparisonOperatorComparisonOperatorSee comparisonOperator for details.2.3
statusAlarmStatusSee status for details.2.3
labelsListSee labels for details.2.3
actionsListSee actions for details.2.3

comparisonOperator

NameTypeDescriptionStarting Version
nameStringResource name.2.3
ordinalint 2.3

status

NameTypeDescriptionStarting Version
OKAlarmStatusMonitoring.2.3
AlarmAlarmStatusTriggered.2.3
InsufficientDataAlarmStatusInsufficient data.2.3

labels

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource.2.3
keyStringLabel key.2.3
operatorStringComparison operator.2.3
valueStringLabel value.2.3

actions

NameTypeDescriptionStarting Version
alarmUuidStringAlarm UUID.2.3
actionTypeStringAlarm action type.2.3
actionUuidStringAlarm action UUID.2.3

SDK Examples

Java SDK

RemoveActionFromAlarmAction action = new RemoveActionFromAlarmAction();
action.alarmUuid = "2c95bdf5490131bbb421622579b59eb8";
action.actionUuid = "41c582ab1cea31d5addd02bb00bb173d";
action.deleteMode = "Permissive";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
RemoveActionFromAlarmAction.Result res = action.call();

Python SDK

RemoveActionFromAlarmAction action = RemoveActionFromAlarmAction()
action.alarmUuid = "2c95bdf5490131bbb421622579b59eb8"
action.actionUuid = "41c582ab1cea31d5addd02bb00bb173d"
action.deleteMode = "Permissive"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
RemoveActionFromAlarmAction.Result res = action.call()