@gradientedge/cdk-utils 5.13.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts +0 -3
  2. package/dist/src/lib/construct/api-to-eventbridge-target/index.js +0 -3
  3. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +23 -68
  4. package/dist/src/lib/construct/api-to-eventbridge-target/main.js +124 -243
  5. package/dist/src/lib/construct/{api-to-eventbridge-target → api-to-eventbridge-target-with-sns}/api-destined-lambda.d.ts +1 -1
  6. package/dist/src/lib/construct/{api-to-eventbridge-target → api-to-eventbridge-target-with-sns}/api-destined-lambda.js +1 -1
  7. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/index.d.ts +2 -0
  8. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/index.js +18 -0
  9. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +193 -0
  10. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +631 -0
  11. package/dist/src/lib/construct/graphql-api-lambda/main.js +1 -1
  12. package/dist/src/lib/construct/index.d.ts +1 -0
  13. package/dist/src/lib/construct/index.js +1 -0
  14. package/dist/src/lib/construct/site-with-ecs-backend/main.js +1 -1
  15. package/dist/src/lib/{construct/api-to-eventbridge-target/api-destination-event.d.ts → helper/api-to-eventbridge-target-event.d.ts} +5 -3
  16. package/dist/src/lib/{construct/api-to-eventbridge-target/api-destination-event.js → helper/api-to-eventbridge-target-event.js} +6 -4
  17. package/dist/src/lib/{construct/api-to-eventbridge-target/api-destined-rest-api.d.ts → helper/api-to-eventbridge-target-rest-api.d.ts} +4 -4
  18. package/dist/src/lib/{construct/api-to-eventbridge-target/api-destined-rest-api.js → helper/api-to-eventbridge-target-rest-api.js} +5 -5
  19. package/dist/src/lib/helper/index.d.ts +2 -0
  20. package/dist/src/lib/helper/index.js +18 -0
  21. package/dist/src/lib/manager/aws/ecs-manager.js +5 -0
  22. package/dist/src/lib/manager/aws/sqs-manager.js +0 -1
  23. package/dist/src/lib/types/aws/index.d.ts +10 -5
  24. package/package.json +11 -11
  25. package/src/lib/construct/api-to-eventbridge-target/index.ts +0 -3
  26. package/src/lib/construct/api-to-eventbridge-target/main.ts +131 -280
  27. package/src/lib/construct/{api-to-eventbridge-target → api-to-eventbridge-target-with-sns}/api-destined-lambda.ts +1 -1
  28. package/src/lib/construct/api-to-eventbridge-target-with-sns/index.ts +2 -0
  29. package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +703 -0
  30. package/src/lib/construct/graphql-api-lambda/main.ts +1 -1
  31. package/src/lib/construct/index.ts +1 -0
  32. package/src/lib/construct/site-with-ecs-backend/main.ts +1 -1
  33. package/src/lib/{construct/api-to-eventbridge-target/api-destination-event.ts → helper/api-to-eventbridge-target-event.ts} +5 -3
  34. package/src/lib/{construct/api-to-eventbridge-target/api-destined-rest-api.ts → helper/api-to-eventbridge-target-rest-api.ts} +4 -4
  35. package/src/lib/helper/index.ts +2 -0
  36. package/src/lib/manager/aws/ecs-manager.ts +5 -0
  37. package/src/lib/manager/aws/sqs-manager.ts +0 -2
  38. package/src/lib/types/aws/index.ts +10 -5
@@ -0,0 +1,193 @@
1
+ import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
2
+ import { Construct } from 'constructs';
3
+ import { CommonConstruct } from '../../common';
4
+ import * as types from '../../types';
5
+ /**
6
+ * @stability stable
7
+ * @category cdk-utils.api-to-eventbridge-target
8
+ * @subcategory construct
9
+ * @classdesc Provides a construct to create and deploy API Gateway invocations to EventBridge
10
+ *
11
+ * <b>Architecture</b> ![Architecture](./ApiToEventBridgeTargetWithSns.jpg)
12
+ *
13
+ * @example
14
+ * import { ApiToEventBridgeTargetWithSns, ApiToEventBridgeTargetProps } '@gradientedge/cdk-utils'
15
+ * import { Construct } from 'constructs'
16
+ *
17
+ * class CustomConstruct extends ApiToEventBridgeTargetWithSns {
18
+ * constructor(parent: Construct, id: string, props: ApiToEventBridgeTargetProps) {
19
+ * super(parent, id, props)
20
+ * this.props = props
21
+ * this.id = id
22
+ * this.initResources()
23
+ * }
24
+ * }
25
+ *
26
+ */
27
+ export declare class ApiToEventBridgeTargetWithSns extends CommonConstruct {
28
+ props: types.ApiToEventBridgeTargetProps;
29
+ id: string;
30
+ applicationSecrets: secretsmanager.ISecret[];
31
+ apiDestinedLambda: types.ApiDestinedLambdaType;
32
+ apiEvent: types.ApiToEventBridgeTargetEventType;
33
+ apiDestinedRestApi: types.ApiToEventBridgeTargetRestApiType;
34
+ apiResource: string;
35
+ constructor(parent: Construct, id: string, props: types.ApiToEventBridgeTargetProps);
36
+ protected initResources(): void;
37
+ /**
38
+ * @summary Method to resolve secrets from SecretsManager
39
+ * - To be implemented in the overriding method in the implementation class
40
+ * @protected
41
+ */
42
+ protected resolveSecrets(): void;
43
+ /**
44
+ * @summary Method to resolve a hosted zone based on domain attributes
45
+ * @protected
46
+ */
47
+ protected resolveHostedZone(): void;
48
+ /**
49
+ * @summary Method to resolve a certificate based on attributes
50
+ * @protected
51
+ */
52
+ protected resolveCertificate(): void;
53
+ /**
54
+ * @summary Method to create iam policy for Api Destined Lambda function
55
+ * @protected
56
+ */
57
+ protected createApiDestinedLambdaPolicy(): void;
58
+ /**
59
+ * @summary Method to create iam role for Api Destined Lambda function
60
+ * @protected
61
+ */
62
+ protected createApiDestinedLambdaRole(): void;
63
+ /**
64
+ * @summary Method to create environment variables for Api Destined Lambda function
65
+ * @protected
66
+ */
67
+ protected createApiDestinedLambdaEnvironment(): void;
68
+ /**
69
+ * @summary Method to create layers for Api Destined Lambda function
70
+ * @protected
71
+ */
72
+ protected createApiDestinedLambdaLayers(): void;
73
+ /**
74
+ * @summary Method to create destination for Api Destined function
75
+ * @protected
76
+ */
77
+ protected createApiDestinedLambdaDestinations(): void;
78
+ /**
79
+ * @summary Method to create lambda function for Api Destined
80
+ * @protected
81
+ */
82
+ protected createApiDestinedLambdaFunction(): void;
83
+ /**
84
+ * @summary Method to create or use an existing eventbus for api destined payload deliveries
85
+ * @protected
86
+ */
87
+ protected createApiDestinedEventBus(): void;
88
+ /**
89
+ * @summary Method to create a log group for successful api destined payload deliveries
90
+ * @protected
91
+ */
92
+ protected createApiDestinationLogGroupSuccess(): void;
93
+ /**
94
+ * Method to create EventBridge rule with lambda target for success
95
+ * @protected
96
+ */
97
+ protected createApiDestinationRuleSuccess(): void;
98
+ /**
99
+ * @summary Method to create a log group for failed api destined payload deliveries
100
+ * @protected
101
+ */
102
+ protected createApiDestinationLogGroupFailure(): void;
103
+ /**
104
+ * Method to create EventBridge rule with lambda target for failure
105
+ * @protected
106
+ */
107
+ protected createApiDestinationRuleFailure(): void;
108
+ /**
109
+ * @summary Method to create a role for sns topic
110
+ * @protected
111
+ */
112
+ protected createApiDestinedTopicRole(): void;
113
+ /**
114
+ * @summary Method to create API destined SNS topic
115
+ * @protected
116
+ */
117
+ protected createApiDestinedTopic(): void;
118
+ /**
119
+ * @summary Method to create api integration request parameters
120
+ * @protected
121
+ */
122
+ protected createApiDestinedIntegrationRequestParameters(): void;
123
+ /**
124
+ * @summary Method to create api integration request templates
125
+ * @protected
126
+ */
127
+ protected createApiDestinedIntegrationRequestTemplates(): void;
128
+ /**
129
+ * @summary Method to create api integration response
130
+ * @protected
131
+ */
132
+ protected createApiDestinedIntegrationResponse(): void;
133
+ /**
134
+ * @summary Method to create api integration error response
135
+ * @protected
136
+ */
137
+ protected createApiDestinedIntegrationErrorResponse(): void;
138
+ /**
139
+ * @summary Method to create api integration
140
+ * @protected
141
+ */
142
+ protected createApiDestinedIntegration(): void;
143
+ /**
144
+ * @summary Method to create api integration method response
145
+ * @protected
146
+ */
147
+ protected createApiDestinedMethodResponse(): void;
148
+ /**
149
+ * @summary Method to create api integration method error response
150
+ * @protected
151
+ */
152
+ protected createApiDestinedMethodErrorResponse(): void;
153
+ /**
154
+ * @summary Method to create rest restApi for Api
155
+ * @protected
156
+ */
157
+ protected createApiDestinedRestApi(): void;
158
+ /**
159
+ * @summary Method to create api integration response model
160
+ * @protected
161
+ */
162
+ protected createApiDestinedResponseModel(): void;
163
+ /**
164
+ * @summary Method to create api integration error response model
165
+ * @protected
166
+ */
167
+ protected createApiDestinedErrorResponseModel(): void;
168
+ /**
169
+ * @summary Method to create api integration resource
170
+ * @protected
171
+ */
172
+ protected createApiDestinedResource(): void;
173
+ /**
174
+ * @summary Method to create api integration resource method
175
+ * @protected
176
+ */
177
+ protected createApiDestinedResourceMethod(): void;
178
+ /**
179
+ * @summary Method to create custom restApi domain for Api API
180
+ * @protected
181
+ */
182
+ protected createApiDomain(): void;
183
+ /**
184
+ * @summary Method to create base path mappings for Api API
185
+ * @protected
186
+ */
187
+ protected createApiBasePathMapping(): void;
188
+ /**
189
+ * @summary Method to create route53 records for Api API
190
+ * @protected
191
+ */
192
+ protected createApiRouteAssets(): void;
193
+ }