@@ -5,18 +5,19 @@ import { CfnEventInvokeConfig } from './lambda.generated';
5
5
6
6
/**
7
7
* Options to add an EventInvokeConfig to a function.
8
+ * @deprecated - use `new EventInvokeConfig()` instead
8
9
*/
9
10
export interface EventInvokeConfigOptions {
10
11
/**
11
12
* The destination for failed invocations.
12
- *
13
+ * @deprecated use `new EventInvokeConfig()` instead to define a new event invoke configuration
13
14
* @default - no destination
14
15
*/
15
16
readonly onFailure ?: IDestination ;
16
17
17
18
/**
18
19
* The destination for successful invocations.
19
- *
20
+ * @deprecated use `new EventInvokeConfig()` instead to define a new event invoke configuration
20
21
* @default - no destination
21
22
*/
22
23
readonly onSuccess ?: IDestination ;
@@ -27,7 +28,7 @@ export interface EventInvokeConfigOptions {
27
28
*
28
29
* Minimum: 60 seconds
29
30
* Maximum: 6 hours
30
- *
31
+ * @deprecated use `new EventInvokeConfig()` instead to define a new event invoke configuration
31
32
* @default Duration.hours(6)
32
33
*/
33
34
readonly maxEventAge ?: Duration ;
@@ -37,7 +38,7 @@ export interface EventInvokeConfigOptions {
37
38
*
38
39
* Minimum: 0
39
40
* Maximum: 2
40
- *
41
+ * @deprecated use `new EventInvokeConfig()` instead to define a new event invoke configuration
41
42
* @default 2
42
43
*/
43
44
readonly retryAttempts ?: number ;
@@ -46,7 +47,7 @@ export interface EventInvokeConfigOptions {
46
47
/**
47
48
* Properties for an EventInvokeConfig
48
49
*/
49
- export interface EventInvokeConfigProps extends EventInvokeConfigOptions {
50
+ export interface EventInvokeConfigProps {
50
51
/**
51
52
* The Lambda function
52
53
*/
@@ -58,6 +59,41 @@ export interface EventInvokeConfigProps extends EventInvokeConfigOptions {
58
59
* @default - latest version
59
60
*/
60
61
readonly qualifier ?: string ;
62
+
63
+ /**
64
+ * The destination for failed invocations.
65
+ *
66
+ * @default - no destination
67
+ */
68
+ readonly onFailure ?: IDestination ;
69
+
70
+ /**
71
+ * The destination for successful invocations.
72
+ *
73
+ * @default - no destination
74
+ */
75
+ readonly onSuccess ?: IDestination ;
76
+
77
+ /**
78
+ * The maximum age of a request that Lambda sends to a function for
79
+ * processing.
80
+ *
81
+ * Minimum: 60 seconds
82
+ * Maximum: 6 hours
83
+ *
84
+ * @default Duration.hours(6)
85
+ */
86
+ readonly maxEventAge ?: Duration ;
87
+
88
+ /**
89
+ * The maximum number of times to retry when the function returns an error.
90
+ *
91
+ * Minimum: 0
92
+ * Maximum: 2
93
+ *
94
+ * @default 2
95
+ */
96
+ readonly retryAttempts ?: number ;
61
97
}
62
98
63
99
/**
0 commit comments