libZSservicesZSamazonka-cloudwatchZSamazonka-cloudwatch
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CloudWatch.DescribeAlarmHistory

Description

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

Creating a Request

data DescribeAlarmHistory Source #

See: newDescribeAlarmHistory smart constructor.

Constructors

DescribeAlarmHistory' 

Fields

  • alarmName :: Maybe Text

    The name of the alarm.

  • historyItemType :: Maybe HistoryItemType

    The type of alarm histories to retrieve.

  • alarmTypes :: Maybe [AlarmType]

    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.

  • endDate :: Maybe ISO8601

    The ending date to retrieve alarm history.

  • startDate :: Maybe ISO8601

    The starting date to retrieve alarm history.

  • nextToken :: Maybe Text

    The token returned by a previous call to indicate that there is more data available.

  • scanBy :: Maybe 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.

  • maxRecords :: Maybe Natural

    The maximum number of alarm history records to retrieve.

Instances

Instances details
Eq DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Read DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Show DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Generic DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Associated Types

type Rep DescribeAlarmHistory :: Type -> Type #

NFData DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Methods

rnf :: DescribeAlarmHistory -> () #

Hashable DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

AWSPager DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

AWSRequest DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Associated Types

type AWSResponse DescribeAlarmHistory #

ToHeaders DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

ToPath DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

ToQuery DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

type Rep DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

type AWSResponse DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

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_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.

Constructors

DescribeAlarmHistoryResponse' 

Fields

Instances

Instances details
Eq DescribeAlarmHistoryResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Read DescribeAlarmHistoryResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Show DescribeAlarmHistoryResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Generic DescribeAlarmHistoryResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Associated Types

type Rep DescribeAlarmHistoryResponse :: Type -> Type #

NFData DescribeAlarmHistoryResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

type Rep DescribeAlarmHistoryResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

type Rep DescribeAlarmHistoryResponse = D1 ('MetaData "DescribeAlarmHistoryResponse" "Amazonka.CloudWatch.DescribeAlarmHistory" "libZSservicesZSamazonka-cloudwatchZSamazonka-cloudwatch" 'False) (C1 ('MetaCons "DescribeAlarmHistoryResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "alarmHistoryItems") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [AlarmHistoryItem])) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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_nextToken :: Lens' DescribeAlarmHistoryResponse (Maybe Text) Source #

The token that marks the start of the next batch of returned results.