import { aws_dynamodb as dynamodb } from 'aws-cdk-lib'; import { Construct } from 'constructs'; import { IWatchful } from './watchful'; /** * Options for defining alarms. */ export interface WatchDynamoDbTableOptions { /** * Threshold of read throttle events. * * @defaultValue 1 */ readonly readThrottleEventsThreshold?: number; /** * Threshold of write throttle events. * * @defaultValue 1 */ readonly writeThrottleEventsThreshold?: number; /** * Threshold of throttled requests events. * * @defaultValue 1 */ readonly throttledRequestsEventsThreshold?: number; /** * Threshold of user errors. * * @defaultValue 1 */ readonly userErrorsThreshold?: number; /** * Threshold of system errors. * * @defaultValue 1 */ readonly systemErrorsThreshold?: number; } /** * Properties for defining a WatchDynamoDbTable */ export interface WatchDynamoDbTableProps extends WatchDynamoDbTableOptions { /** * The reference to IWatchful class. Used internally. */ readonly watchful: IWatchful; /** * The DynamoDb table that should be watched. * [disable-awslint:ref-via-interface] */ readonly dynamoDbTable: dynamodb.Table | dynamodb.TableV2; } /** * A Construct which creates the following alarms for DynamoDb tables: * * - read throttles * - write throttles * - throttled requests * - user errors * - system errors */ export declare class WatchDynamoDbTable extends Construct { private readonly watchful; private readonly dynamoDb; constructor(scope: Construct, id: string, props: WatchDynamoDbTableProps); private createReadThrottleEventsAlarm; private createWriteThrottleEventsAlarm; private createThrottledRequestsEventsAlarm; }