import * as cloudwatchActions from "aws-cdk-lib/aws-cloudwatch-actions"; import * as lambda from "aws-cdk-lib/aws-lambda"; import type * as secretsmanager from "aws-cdk-lib/aws-secretsmanager"; import * as sns from "aws-cdk-lib/aws-sns"; import * as constructs from "constructs"; export interface SlackAlarmProps { projectName: string; envName: string; /** * A plaintext secret containing the URL of a Slack incoming webhook. * The webhook should be created through a Slack app, and only allows posting to one specific Slack channel. * See Slack's official documentation (e.g., https://api.slack.com/messaging/webhooks) for more details. * * NOTE: Incoming webhooks created through legacy custom integrations in Slack are not supported. */ slackWebhookUrlSecret: secretsmanager.ISecret; } /** * Creates * - SNS Topic that can be used to action alarms, with a Lambda * that will send a message to Slack for the alarm. * - A reusable Lambda that accepts CloudWatch Logs subscription events and posts * formatted error messages to Slack. */ export declare class SlackAlarm extends constructs.Construct { readonly alarmTopic: sns.Topic; readonly snsAction: cloudwatchActions.SnsAction; readonly logHandler: lambda.Function; constructor(scope: constructs.Construct, id: string, props: SlackAlarmProps); }