amazonka-cloudwatch-2.0: Amazon CloudWatch SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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.

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

Creating a Request

data DescribeAlarmHistory Source #

See: newDescribeAlarmHistory smart constructor.

Constructors

DescribeAlarmHistory' 

Fields

  • alarmName :: Maybe Text

    The name of the alarm.

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

  • historyItemType :: Maybe HistoryItemType

    The type of alarm histories to retrieve.

  • maxRecords :: Maybe Natural

    The maximum number of alarm history records to retrieve.

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

  • startDate :: Maybe ISO8601

    The starting date to retrieve alarm history.

Instances

Instances details
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

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 #

Generic DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Associated Types

type Rep DescribeAlarmHistory :: Type -> Type #

Read DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Show DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

NFData DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Methods

rnf :: DescribeAlarmHistory -> () #

Eq DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Hashable DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

type AWSResponse DescribeAlarmHistory Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

type Rep 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:

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

Constructors

DescribeAlarmHistoryResponse' 

Fields

Instances

Instances details
Generic DescribeAlarmHistoryResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Associated Types

type Rep DescribeAlarmHistoryResponse :: Type -> Type #

Read DescribeAlarmHistoryResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Show DescribeAlarmHistoryResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

NFData DescribeAlarmHistoryResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarmHistory

Eq 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" "amazonka-cloudwatch-2.0-9xq2AWTkbYo3pEtgQNn4jD" '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.

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.