UNPKG

cdk-monitoring-constructs

Version:

[![NPM version](https://badge.fury.io/js/cdk-monitoring-constructs.svg)](https://badge.fury.io/js/cdk-monitoring-constructs) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.cdklabs/cdkmonitoringconstructs/badge.svg)](https://m

29 lines (28 loc) 1.55 kB
import { IAlarmDedupeStringProcessor } from "./IAlarmDedupeStringProcessor"; import { AlarmNamingInput, IAlarmNamingStrategy } from "./IAlarmNamingStrategy"; export declare class AlarmNamingStrategy implements IAlarmNamingStrategy { protected readonly globalPrefix: string; protected readonly localPrefix: string; protected readonly dedupeStringStrategy: IAlarmDedupeStringProcessor; constructor(globalPrefix: string, localPrefix: string, dedupeStringStrategy?: IAlarmDedupeStringProcessor); /** * Alarm name is resolved like this: * - If "alarmNameOverride" is defined for an alarm, it will be used as alarm name. * - Otherwise, the alarm name will be generated by joining: global prefix, local prefix, alarm name suffix, disambiguator. * * @param props properties */ getName(props: AlarmNamingInput): string; getWidgetLabel(props: AlarmNamingInput): string; /** * Dedupe string resolved like this: * - If "dedupeStringOverride" is defined for an alarm, it will be used as a dedupe string. * - If "alarmDedupeStringSuffix" from the alarm factory is defined, "GlobalPrefix-LocalPrefix-AlarmDedupeStringSuffix" will be used as a dedupe string. * - Otherwise, the alarm dedupe string will not be set. * If a dedupe string strategy is set, it will be used to process the final string. * * @param props properties */ getDedupeString(props: AlarmNamingInput): string | undefined; protected joinDistinct(parts: string[], separator: string): string; }