Creates or updates an alarm, and associates it with the specified metric.
An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more information, see Alarms in Amazon Lightsail.
When this action creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA. The alarm is then evaluated and its state is set appropriately. Any actions associated with the new state are then executed.
When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm. The alarm is then evaluated with the updated configuration.
Headers
Request body
The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration of the alarm.
The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic value is used as the first operand.
The value against which the specified statistic is compared.
The number of data points that must be not within the specified threshold to trigger the alarm. If you are setting an "M out of N" alarm, this value (<code>datapointsToAlarm</code>) is the M.
Response
Success