32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import type { Construct } from 'constructs';
|
|
import type * as cloudwatch from '../../aws-cloudwatch';
|
|
import type * as lambda from '../../aws-lambda';
|
|
/**
|
|
* Properties for Lambda Alarm Action
|
|
*/
|
|
export interface LambdaActionProps {
|
|
/**
|
|
* Whether to generate unique Lambda Permission id
|
|
*
|
|
* Use this parameter to resolve id collision in case of multiple alarms triggering the same action
|
|
*
|
|
* @see https://github.com/aws/aws-cdk/issues/33958
|
|
* @default - false
|
|
*/
|
|
readonly useUniquePermissionId?: boolean;
|
|
}
|
|
/**
|
|
* Use a Lambda action as an Alarm action
|
|
*/
|
|
export declare class LambdaAction implements cloudwatch.IAlarmAction {
|
|
private lambdaFunction;
|
|
private props?;
|
|
constructor(lambdaFunction: lambda.IAlias | lambda.IVersion | lambda.IFunction, props?: LambdaActionProps);
|
|
/**
|
|
* Returns an alarm action configuration to use a Lambda action as an alarm action.
|
|
*
|
|
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html
|
|
*/
|
|
bind(scope: Construct, alarm: cloudwatch.IAlarm): cloudwatch.AlarmActionConfig;
|
|
}
|