import { TreatMissingData } from "aws-cdk-lib/aws-cloudwatch"; import type { AlarmDefinition, AlarmMetric } from "./alarm-definition.js"; import type { AlarmName } from "./alarm-name.js"; /** * Fluent builder for constructing deferred {@link AlarmDefinition}s. * * Stores a metric factory `(construct: T) => AlarmMetric` at configuration time * (a `Metric` or a `MathExpression`). Call {@link resolve} during build to * invoke the factory and produce a complete {@link AlarmDefinition}. * * @typeParam TConstruct - The construct type the metric factory receives. */ export declare class AlarmDefinitionBuilder { #private; constructor(key: string); metric(factory: (construct: TConstruct) => AlarmMetric): this; /** * Sets an explicit CloudWatch alarm name. When unset, {@link createAlarms} * derives a default from the stack name, builder id, and alarm key. Use * the {@link alarmName} helper to construct branded values. */ alarmName(name: AlarmName): this; /** * Sets an explicit construct id for the created alarm, used verbatim. When * unset, {@link createAlarms} derives `` `${id}${Capitalize(key)}Alarm` ``. * * Set this to preserve an existing CloudFormation logical ID when * grandfathering alarms into a stack. */ constructId(id: string): this; threshold(value: number): this; greaterThan(): this; greaterThanOrEqual(): this; lessThan(): this; lessThanOrEqual(): this; evaluationPeriods(n: number): this; datapointsToAlarm(n: number): this; treatMissingData(treatment: TreatMissingData): this; description(text: string | ((definition: AlarmDefinition) => string)): this; /** * Resolves the deferred metric factory against a construct and * returns a complete {@link AlarmDefinition}. * * @throws If {@link metric} was not called before resolve. */ resolve(construct: TConstruct): AlarmDefinition; } //# sourceMappingURL=alarm-definition-builder.d.ts.map