Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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.
To use this operation and return information about a composite alarm,
you must be signed on with the cloudwatch:DescribeAlarmHistory
permission that is scoped to *
. You can't return information about
composite alarms if your cloudwatch:DescribeAlarmHistory
permission
has a narrower scope.
This operation returns paginated results.
Synopsis
- data DescribeAlarmHistory = DescribeAlarmHistory' {}
- newDescribeAlarmHistory :: DescribeAlarmHistory
- describeAlarmHistory_alarmName :: Lens' DescribeAlarmHistory (Maybe Text)
- describeAlarmHistory_alarmTypes :: Lens' DescribeAlarmHistory (Maybe [AlarmType])
- describeAlarmHistory_endDate :: Lens' DescribeAlarmHistory (Maybe UTCTime)
- describeAlarmHistory_historyItemType :: Lens' DescribeAlarmHistory (Maybe HistoryItemType)
- describeAlarmHistory_maxRecords :: Lens' DescribeAlarmHistory (Maybe Natural)
- describeAlarmHistory_nextToken :: Lens' DescribeAlarmHistory (Maybe Text)
- describeAlarmHistory_scanBy :: Lens' DescribeAlarmHistory (Maybe ScanBy)
- describeAlarmHistory_startDate :: Lens' DescribeAlarmHistory (Maybe UTCTime)
- 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:
DescribeAlarmHistory
, describeAlarmHistory_alarmName
- The name of the alarm.
$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.
DescribeAlarmHistory
, describeAlarmHistory_historyItemType
- The type of alarm histories to retrieve.
$sel:maxRecords:DescribeAlarmHistory'
, describeAlarmHistory_maxRecords
- The maximum number of alarm history records to retrieve.
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:startDate:DescribeAlarmHistory'
, describeAlarmHistory_startDate
- The starting date to retrieve alarm history.
Request Lenses
describeAlarmHistory_alarmName :: Lens' DescribeAlarmHistory (Maybe Text) Source #
The name of the alarm.
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_historyItemType :: Lens' DescribeAlarmHistory (Maybe HistoryItemType) Source #
The type of alarm histories to retrieve.
describeAlarmHistory_maxRecords :: Lens' DescribeAlarmHistory (Maybe Natural) Source #
The maximum number of alarm history records to retrieve.
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_startDate :: Lens' DescribeAlarmHistory (Maybe UTCTime) Source #
The starting date to retrieve alarm history.
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.
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.