Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Tests an alarm by displaying a banner on the Amazon Lightsail console.
If a notification trigger is configured for the specified alarm, the
test also sends a notification to the notification protocol (Email
and/or SMS
) configured for the alarm.
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.
Synopsis
- data TestAlarm = TestAlarm' {
- alarmName :: Text
- state :: AlarmState
- newTestAlarm :: Text -> AlarmState -> TestAlarm
- testAlarm_alarmName :: Lens' TestAlarm Text
- testAlarm_state :: Lens' TestAlarm AlarmState
- data TestAlarmResponse = TestAlarmResponse' {
- operations :: Maybe [Operation]
- httpStatus :: Int
- newTestAlarmResponse :: Int -> TestAlarmResponse
- testAlarmResponse_operations :: Lens' TestAlarmResponse (Maybe [Operation])
- testAlarmResponse_httpStatus :: Lens' TestAlarmResponse Int
Creating a Request
See: newTestAlarm
smart constructor.
TestAlarm' | |
|
Instances
Create a value of TestAlarm
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:alarmName:TestAlarm'
, testAlarm_alarmName
- The name of the alarm to test.
$sel:state:TestAlarm'
, testAlarm_state
- The alarm state to test.
An alarm has the following possible states that can be tested:
ALARM
- The metric is outside of the defined threshold.INSUFFICIENT_DATA
- The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.OK
- The metric is within the defined threshold.
Request Lenses
testAlarm_state :: Lens' TestAlarm AlarmState Source #
The alarm state to test.
An alarm has the following possible states that can be tested:
ALARM
- The metric is outside of the defined threshold.INSUFFICIENT_DATA
- The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.OK
- The metric is within the defined threshold.
Destructuring the Response
data TestAlarmResponse Source #
See: newTestAlarmResponse
smart constructor.
TestAlarmResponse' | |
|
Instances
Create a value of TestAlarmResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:operations:TestAlarmResponse'
, testAlarmResponse_operations
- An array of objects that describe the result of the action, such as the
status of the request, the timestamp of the request, and the resources
affected by the request.
$sel:httpStatus:TestAlarmResponse'
, testAlarmResponse_httpStatus
- The response's http status code.
Response Lenses
testAlarmResponse_operations :: Lens' TestAlarmResponse (Maybe [Operation]) Source #
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
testAlarmResponse_httpStatus :: Lens' TestAlarmResponse Int Source #
The response's http status code.