Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DescribeAlarmHistoryCommand

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.

example

Use a bare-bones client and the command you need to make an API call.

import { CloudWatchClient, DescribeAlarmHistoryCommand } from "@aws-sdk/client-cloudwatch"; // ES Modules import
// const { CloudWatchClient, DescribeAlarmHistoryCommand } = require("@aws-sdk/client-cloudwatch"); // CommonJS import
const client = new CloudWatchClient(config);
const command = new DescribeAlarmHistoryCommand(input);
const response = await client.send(command);
see

DescribeAlarmHistoryCommandInput for command's input shape.

see

DescribeAlarmHistoryCommandOutput for command's response shape.

see

config for CloudWatchClient's config shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

Properties

Readonly input

input: DescribeAlarmHistoryCommandInput

Readonly middlewareStack