Update alarm (PUT /v2/alarms/{alarm_id})
Updates the specified alarm.
{alarm_id}: ID of the alarm.
Request headers
Refer to "Common API items".
Request parameters
None.
Request body
Information (in JSON format) on the updated alarm.
The required fields ("name", "type", "threshold_rule", "meter_name", and "threshold") cannot be omitted. If other fields are omitted, the default values are set.
Refer to "type Alarm" for details.
Response headers
Status
If normal, the following status is returned.
200: Normal completion
Refer to "Common API error codes" if the state is error.
Data type | Cardinality |
---|---|
Int | 1..1 |
Response elements
Information (in JSON format) on the updated alarm.
Refer to "type Alarm" for details.
Example of request
Example: Update the target alarm evaluation from "enabled" to "disabled".
curl -X PUT -H 'Content-Type: application/json' \
-H 'X-Auth-Token: ImFkbWluVVJMIjogImh0dHA6Ly8xMC4x . . .' \
-d requestBody 'https://telemetry.jp-east-1.cloud.global.fujitsu.com/v2/alarms/8278b049-ca2b-4e05-99c9-641c0b692edd'
Request body (JSON format)
{
"enabled": false,
"name": "my_alarm",
"threshold_rule": {
"comparison_operator": "gt",
"meter_name": "my_meter",
"threshold": 0.0
},
"type": "threshold"
}
Example of response
{
"alarm_actions": [],
"alarm_id": "8278b049-ca2b-4e05-99c9-641c0b692edd",
"description": "Alarm when my_meter is gt a avg of 0.0 over 60 seconds",
"enabled": false,
"insufficient_data_actions": [],
"name": "my_alarm",
"ok_actions": [],
"project_id": "39bd0d0341484a1a88f8ecdb1b21311c",
"repeat_actions": false,
"severity": "low",
"state": "insufficient data",
"state_timestamp": "2014-10-24T08:43:30.682976",
"threshold_rule": {
"comparison_operator": "gt",
"evaluation_periods": 1,
"exclude_outliers": false,
"meter_name": "my_meter",
"period": 60,
"query": [],
"statistic": "avg",
"threshold": 0.0
},
"time_constraints": [],
"timestamp": "2014-10-24T08:51:14.940014",
"type": "threshold",
"user_id": "9953aae1953a4caab3cc278e3018cf68"
}