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 |
Retrieves the history for the specified alarm. You can filter the results by date range or item type. If an alarm name is not specified, the histories for either all metric alarms or all composite alarms are returned.
CloudWatch retains the history of an alarm even if you delete the alarm.
This operation returns paginated results.
Synopsis
- data DescribeAlarmHistory = DescribeAlarmHistory' {}
- newDescribeAlarmHistory :: DescribeAlarmHistory
- describeAlarmHistory_alarmName :: Lens' DescribeAlarmHistory (Maybe Text)
- describeAlarmHistory_historyItemType :: Lens' DescribeAlarmHistory (Maybe HistoryItemType)
- describeAlarmHistory_alarmTypes :: Lens' DescribeAlarmHistory (Maybe [AlarmType])
- describeAlarmHistory_endDate :: Lens' DescribeAlarmHistory (Maybe UTCTime)
- describeAlarmHistory_startDate :: Lens' DescribeAlarmHistory (Maybe UTCTime)
- describeAlarmHistory_nextToken :: Lens' DescribeAlarmHistory (Maybe Text)
- describeAlarmHistory_scanBy :: Lens' DescribeAlarmHistory (Maybe ScanBy)
- describeAlarmHistory_maxRecords :: Lens' DescribeAlarmHistory (Maybe Natural)
- data DescribeAlarmHistoryResponse = DescribeAlarmHistoryResponse' {}
- newDescribeAlarmHistoryResponse :: Int -> DescribeAlarmHistoryResponse
- describeAlarmHistoryResponse_alarmHistoryItems :: Lens' DescribeAlarmHistoryResponse (Maybe [AlarmHistoryItem])
- describeAlarmHistoryResponse_nextToken :: Lens' DescribeAlarmHistoryResponse (Maybe Text)
- describeAlarmHistoryResponse_httpStatus :: Lens' DescribeAlarmHistoryResponse Int
Creating a Request
data DescribeAlarmHistory Source #
See: newDescribeAlarmHistory
smart constructor.
DescribeAlarmHistory' | |
|
Instances
newDescribeAlarmHistory :: DescribeAlarmHistory Source #
Create a value of DescribeAlarmHistory
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:DescribeAlarmHistory'
, describeAlarmHistory_alarmName
- The name of the alarm.
$sel:historyItemType:DescribeAlarmHistory'
, describeAlarmHistory_historyItemType
- The type of alarm histories to retrieve.
$sel:alarmTypes:DescribeAlarmHistory'
, describeAlarmHistory_alarmTypes
- Use this parameter to specify whether you want the operation to return
metric alarms or composite alarms. If you omit this parameter, only
metric alarms are returned.
$sel:endDate:DescribeAlarmHistory'
, describeAlarmHistory_endDate
- The ending date to retrieve alarm history.
$sel:startDate:DescribeAlarmHistory'
, describeAlarmHistory_startDate
- The starting date to retrieve alarm history.
$sel:nextToken:DescribeAlarmHistory'
, describeAlarmHistory_nextToken
- The token returned by a previous call to indicate that there is more
data available.
$sel:scanBy:DescribeAlarmHistory'
, describeAlarmHistory_scanBy
- Specified whether to return the newest or oldest alarm history first.
Specify TimestampDescending
to have the newest event history returned
first, and specify TimestampAscending
to have the oldest history
returned first.
$sel:maxRecords:DescribeAlarmHistory'
, describeAlarmHistory_maxRecords
- The maximum number of alarm history records to retrieve.
Request Lenses
describeAlarmHistory_alarmName :: Lens' DescribeAlarmHistory (Maybe Text) Source #
The name of the alarm.
describeAlarmHistory_historyItemType :: Lens' DescribeAlarmHistory (Maybe HistoryItemType) Source #
The type of alarm histories to retrieve.
describeAlarmHistory_alarmTypes :: Lens' DescribeAlarmHistory (Maybe [AlarmType]) Source #
Use this parameter to specify whether you want the operation to return metric alarms or composite alarms. If you omit this parameter, only metric alarms are returned.
describeAlarmHistory_endDate :: Lens' DescribeAlarmHistory (Maybe UTCTime) Source #
The ending date to retrieve alarm history.
describeAlarmHistory_startDate :: Lens' DescribeAlarmHistory (Maybe UTCTime) Source #
The starting date to retrieve alarm history.
describeAlarmHistory_nextToken :: Lens' DescribeAlarmHistory (Maybe Text) Source #
The token returned by a previous call to indicate that there is more data available.
describeAlarmHistory_scanBy :: Lens' DescribeAlarmHistory (Maybe ScanBy) Source #
Specified whether to return the newest or oldest alarm history first.
Specify TimestampDescending
to have the newest event history returned
first, and specify TimestampAscending
to have the oldest history
returned first.
describeAlarmHistory_maxRecords :: Lens' DescribeAlarmHistory (Maybe Natural) Source #
The maximum number of alarm history records to retrieve.
Destructuring the Response
data DescribeAlarmHistoryResponse Source #
See: newDescribeAlarmHistoryResponse
smart constructor.
DescribeAlarmHistoryResponse' | |
|
Instances
newDescribeAlarmHistoryResponse Source #
Create a value of DescribeAlarmHistoryResponse
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:alarmHistoryItems:DescribeAlarmHistoryResponse'
, describeAlarmHistoryResponse_alarmHistoryItems
- The alarm histories, in JSON format.
$sel:nextToken:DescribeAlarmHistory'
, describeAlarmHistoryResponse_nextToken
- The token that marks the start of the next batch of returned results.
$sel:httpStatus:DescribeAlarmHistoryResponse'
, describeAlarmHistoryResponse_httpStatus
- The response's http status code.
Response Lenses
describeAlarmHistoryResponse_alarmHistoryItems :: Lens' DescribeAlarmHistoryResponse (Maybe [AlarmHistoryItem]) Source #
The alarm histories, in JSON format.
describeAlarmHistoryResponse_nextToken :: Lens' DescribeAlarmHistoryResponse (Maybe Text) Source #
The token that marks the start of the next batch of returned results.
describeAlarmHistoryResponse_httpStatus :: Lens' DescribeAlarmHistoryResponse Int Source #
The response's http status code.