aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
56 lines (55 loc) • 1.73 kB
TypeScript
import * as cdk from '../../../core';
import { TreatMissingData } from '../alarm';
/**
* Base options for creating CloudWatch alarms
*
* @internal
*/
export interface CreateAlarmOptionsBase {
/**
* Name of the alarm
*
* @default Automatically generated name
*/
readonly alarmName?: string;
/**
* Description for the alarm
*
* @default No description
*/
readonly alarmDescription?: string;
/**
* The number of periods over which data is compared to the specified threshold.
*/
readonly evaluationPeriods: number;
/**
* Specifies whether to evaluate the data and potentially change the alarm state if there are too few data points to be statistically significant.
*
* Used only for alarms that are based on percentiles.
*
* @default - Not configured.
*/
readonly evaluateLowSampleCountPercentile?: string;
/**
* Sets how this alarm is to handle missing data points.
*
* @default TreatMissingData.Missing
*/
readonly treatMissingData?: TreatMissingData;
/**
* Whether the actions for this alarm are enabled
*
* @default true
*/
readonly actionsEnabled?: boolean;
/**
* The number of datapoints that must be breaching to trigger the alarm. This is used only if you are setting an "M
* out of N" alarm. In that case, this value is the M. For more information, see Evaluating an Alarm in the Amazon
* CloudWatch User Guide.
*
* @default ``evaluationPeriods``
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation
*/
readonly datapointsToAlarm?: number;
}