Skip to main content
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

  • uuidStringRequired

    The template UUID.

Query Parameters

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Body Fields

  • updateactivealarmtemplateObjectRequired

    updateactivealarmtemplate request body object.

    • alarmNameString

      Optional. The template name.

    • comparisonOperatorString

      Optional. The threshold comparison operator.

    • periodInteger

      Optional. The threshold comparison operator.

    • thresholdDouble

      Optional. The threshold.

    • repeatIntervalInteger

      Optional. The alarm repeat interval.

    • repeatCountInteger

      Optional. The alarm repeat count.

    • emergencyLevelString

      Optional. The alarm emergency level.

    • labelsString

      Optional.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • inventoryActiveAlarmTemplateInventoryRequired

    See inventory.

    • uuidStringRequired

      The resource UUID.

    • alarmNameStringRequired

      No description provided.

    • periodintRequired

      时间周期。

    • repeatIntervalintRequired

      重复周期。

    • repeatCountintRequired

      重试次数。

    • namespaceStringRequired

      命名空间。

    • metricNameStringRequired

      监控项名称。

    • thresholddoubleRequired

      阈值。

    • labelsStringRequired

      标签列表。

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • comparisonOperatorComparisonOperatorRequired

      See comparisonOperator.

      • GreaterThanOrEqualToComparisonOperatorRequired

        No description provided.

      • GreaterThanComparisonOperatorRequired

        No description provided.

      • LessThanComparisonOperatorRequired

        No description provided.

      • LessThanOrEqualToComparisonOperatorRequired

        No description provided.

    • emergencyLevelEmergencyLevelRequired

      See emergencyLevel.

      • EmergentEmergencyLevelRequired

        No description provided.

      • ImportantEmergencyLevelRequired

        No description provided.

      • NormalEmergencyLevelRequired

        正常。

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

Endpoint

PUT/zstack/v1/zwatch/activealarms/templates/{uuid}/actions

/zstack/v1/zwatch/activealarms/templates/{uuid}/actions

Operation ID

UpdateActiveAlarmTemplate

Permalink

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.

View all change history