Temporarily sets the state of an alarm for testing purposes. When the
updated state differs from the previous value, the action configured for
the appropriate state is invoked. For example, if your alarm is
configured to send an Amazon SNS message when an alarm is triggered,
temporarily changing the alarm state to
ALARM sends an SNS message.
Metric alarms returns to their actual state quickly, often within
seconds. Because the metric alarm state change happens quickly, it is
typically only visible in the alarm's History tab in the Amazon
CloudWatch console or through
If you use
set_alarm_state on a
composite alarm, the composite alarm is not guaranteed to return to its
actual state. It returns to its actual state only once any of its
children alarms change state. It is also reevaluated if you update its
If an alarm triggers EC2 Auto Scaling policies or application Auto
Scaling policies, you must include information in the
parameter to enable the policy to take the correct action.
cloudwatch_set_alarm_state(AlarmName, StateValue, StateReason, StateReasonData)
[required] The name of the alarm.
[required] The value of the state.
[required] The reason that this alarm is set to this specific state, in text format.
The reason that this alarm is set to this specific state, in JSON format.
For SNS or EC2 alarm actions, this is just informational. But for EC2 Auto Scaling or application Auto Scaling alarm actions, the Auto Scaling policy uses the information in this field to take the correct action.
An empty list.
1 2 3 4 5 6
svc$set_alarm_state( AlarmName = "string", StateValue = "OK"|"ALARM"|"INSUFFICIENT_DATA", StateReason = "string", StateReasonData = "string" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.