92 lines
3.0 KiB
TypeScript
92 lines
3.0 KiB
TypeScript
import type { Construct } from 'constructs';
|
|
import type { IAlarm, IAlarmRule } from './alarm-base';
|
|
import { AlarmBase } from './alarm-base';
|
|
import { Duration } from '../../core';
|
|
import type { IAlarmRef } from '../../interfaces/generated/aws-cloudwatch-interfaces.generated';
|
|
/**
|
|
* Properties for creating a Composite Alarm
|
|
*/
|
|
export interface CompositeAlarmProps {
|
|
/**
|
|
* Whether the actions for this alarm are enabled
|
|
*
|
|
* @default true
|
|
*/
|
|
readonly actionsEnabled?: boolean;
|
|
/**
|
|
* Description for the alarm
|
|
*
|
|
* @default - No description.
|
|
*/
|
|
readonly alarmDescription?: string;
|
|
/**
|
|
* Name of the alarm
|
|
*
|
|
* @default - Automatically generated name.
|
|
*/
|
|
readonly compositeAlarmName?: string;
|
|
/**
|
|
* Expression that specifies which other alarms are to be evaluated to determine this composite alarm's state.
|
|
*/
|
|
readonly alarmRule: IAlarmRule;
|
|
/**
|
|
* Actions will be suppressed if the suppressor alarm is in the ALARM state.
|
|
*
|
|
* @default - alarm will not be suppressed.
|
|
*/
|
|
readonly actionsSuppressor?: IAlarmRef;
|
|
/**
|
|
* The maximum duration that the composite alarm waits after suppressor alarm goes out of the ALARM state.
|
|
* After this time, the composite alarm performs its actions.
|
|
*
|
|
* @default - 1 minute extension period will be set.
|
|
*/
|
|
readonly actionsSuppressorExtensionPeriod?: Duration;
|
|
/**
|
|
* The maximum duration that the composite alarm waits for the suppressor alarm to go into the ALARM state.
|
|
* After this time, the composite alarm performs its actions.
|
|
*
|
|
* @default - 1 minute wait period will be set.
|
|
*/
|
|
readonly actionsSuppressorWaitPeriod?: Duration;
|
|
}
|
|
/**
|
|
* A Composite Alarm based on Alarm Rule.
|
|
*/
|
|
export declare class CompositeAlarm extends AlarmBase {
|
|
/** Uniquely identifies this class. */
|
|
static readonly PROPERTY_INJECTION_ID: string;
|
|
/**
|
|
* Import an existing CloudWatch composite alarm provided an Name.
|
|
*
|
|
* @param scope The parent creating construct (usually `this`)
|
|
* @param id The construct's name
|
|
* @param compositeAlarmName Composite Alarm Name
|
|
*/
|
|
static fromCompositeAlarmName(scope: Construct, id: string, compositeAlarmName: string): IAlarm;
|
|
/**
|
|
* Import an existing CloudWatch composite alarm provided an ARN.
|
|
*
|
|
* @param scope The parent creating construct (usually `this`)
|
|
* @param id The construct's name
|
|
* @param compositeAlarmArn Composite Alarm ARN (i.e. arn:aws:cloudwatch:<region>:<account-id>:alarm:CompositeAlarmName)
|
|
*/
|
|
static fromCompositeAlarmArn(scope: Construct, id: string, compositeAlarmArn: string): IAlarm;
|
|
/**
|
|
* ARN of this alarm
|
|
*
|
|
* @attribute
|
|
*/
|
|
get alarmArn(): string;
|
|
/**
|
|
* Name of this alarm.
|
|
*
|
|
* @attribute
|
|
*/
|
|
get alarmName(): string;
|
|
private readonly alarmRule;
|
|
private readonly resource;
|
|
constructor(scope: Construct, id: string, props: CompositeAlarmProps);
|
|
private generateUniqueId;
|
|
}
|