Skip to content

Retrieves the history for the specified alarm

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.

Usage

cloudwatch_describe_alarm_history(AlarmName, AlarmContributorId,
  AlarmTypes, HistoryItemType, StartDate, EndDate, MaxRecords, NextToken,
  ScanBy)

Arguments

  • AlarmName

    The name of the alarm.

  • AlarmContributorId

    The unique identifier of a specific alarm contributor to filter the alarm history results.

  • AlarmTypes

    Use this parameter to specify whether you want the operation to return metric alarms, composite alarms, or log alarms. If you omit this parameter, only metric alarms are returned.

  • HistoryItemType

    The type of alarm histories to retrieve.

  • StartDate

    The starting date to retrieve alarm history.

  • EndDate

    The ending date to retrieve alarm history.

  • MaxRecords

    The maximum number of alarm history records to retrieve.

  • NextToken

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

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

Value

A list with the following syntax:

list(
  AlarmHistoryItems = list(
    list(
      AlarmName = "string",
      AlarmContributorId = "string",
      AlarmType = "CompositeAlarm"|"MetricAlarm"|"LogAlarm",
      Timestamp = as.POSIXct(
        "2015-01-01"
      ),
      HistoryItemType = "ConfigurationUpdate"|"StateUpdate"|"Action"|"AlarmContributorStateUpdate"|"AlarmContributorAction",
      HistorySummary = "string",
      HistoryData = "string",
      AlarmContributorAttributes = list(
        "string"
      )
    )
  ),
  NextToken = "string"
)

Request syntax

svc$describe_alarm_history(
  AlarmName = "string",
  AlarmContributorId = "string",
  AlarmTypes = list(
    "CompositeAlarm"|"MetricAlarm"|"LogAlarm"
  ),
  HistoryItemType = "ConfigurationUpdate"|"StateUpdate"|"Action"|"AlarmContributorStateUpdate"|"AlarmContributorAction",
  StartDate = as.POSIXct(
    "2015-01-01"
  ),
  EndDate = as.POSIXct(
    "2015-01-01"
  ),
  MaxRecords = 123,
  NextToken = "string",
  ScanBy = "TimestampDescending"|"TimestampAscending"
)