UNPKG

875 BTypeScriptView Raw
1import { IFunction } from './function-base';
2import { Construct } from '@aws-cdk/core';
3/**
4 * A destination configuration
5 */
6export interface DestinationConfig {
7 /**
8 * The Amazon Resource Name (ARN) of the destination resource
9 */
10 readonly destination: string;
11}
12/**
13 * The type of destination
14 */
15export declare enum DestinationType {
16 /**
17 * Failure
18 */
19 FAILURE = "Failure",
20 /**
21 * Success
22 */
23 SUCCESS = "Success"
24}
25/**
26 * Options when binding a destination to a function
27 */
28export interface DestinationOptions {
29 /**
30 * The destination type
31 */
32 readonly type: DestinationType;
33}
34/**
35 * A Lambda destination
36 */
37export interface IDestination {
38 /**
39 * Binds this destination to the Lambda function
40 */
41 bind(scope: Construct, fn: IFunction, options?: DestinationOptions): DestinationConfig;
42}