aws-delivlib
Version:
A fabulous library for defining continuous pipelines for building, testing and releasing code libraries.
18 lines (17 loc) • 999 B
TypeScript
import { CloudWatch } from '@aws-sdk/client-cloudwatch';
export interface ExecutionStateChangeEvent {
readonly pipeline: string;
readonly state: 'STARTED' | 'CANCELED' | 'FAILED' | 'SUCCEEDED';
}
export interface ActionStateChangeEvent extends ExecutionStateChangeEvent {
readonly action: string;
}
export type LambdaExecutionStateChangeEvent = AWSLambda.EventBridgeEvent<'CodePipeline Pipeline Execution State Change', ExecutionStateChangeEvent>;
export type LambdaActionStateChangeEvent = AWSLambda.EventBridgeEvent<'CodePipeline Action Execution State Change', ActionStateChangeEvent>;
export type EventType = LambdaExecutionStateChangeEvent | LambdaActionStateChangeEvent;
export declare const cloudwatch: CloudWatch;
/**
* Lambda function that reacts to an Amazon EventBridge event triggered by a 'CodePipeline Action Execution State Change'.
* The handler reads the event and sends off metrics to CloudWatch.
*/
export declare function handler(event: EventType): Promise<void>;