@gradientedge/cdk-utils 5.14.0 → 6.0.0
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.
- package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/index.js +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +23 -68
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +120 -241
- package/dist/src/lib/construct/{api-to-eventbridge-target → api-to-eventbridge-target-with-sns}/api-destined-lambda.d.ts +1 -1
- package/dist/src/lib/construct/{api-to-eventbridge-target → api-to-eventbridge-target-with-sns}/api-destined-lambda.js +1 -1
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/index.d.ts +2 -0
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/index.js +18 -0
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +193 -0
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +631 -0
- package/dist/src/lib/construct/index.d.ts +1 -0
- package/dist/src/lib/construct/index.js +1 -0
- package/dist/src/lib/{construct/api-to-eventbridge-target/api-destination-event.d.ts → helper/api-to-eventbridge-target-event.d.ts} +5 -3
- package/dist/src/lib/{construct/api-to-eventbridge-target/api-destination-event.js → helper/api-to-eventbridge-target-event.js} +6 -4
- 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
- package/dist/src/lib/{construct/api-to-eventbridge-target/api-destined-rest-api.js → helper/api-to-eventbridge-target-rest-api.js} +5 -5
- package/dist/src/lib/helper/index.d.ts +2 -0
- package/dist/src/lib/helper/index.js +18 -0
- package/dist/src/lib/types/aws/index.d.ts +10 -5
- package/package.json +1 -1
- package/src/lib/construct/api-to-eventbridge-target/index.ts +0 -3
- package/src/lib/construct/api-to-eventbridge-target/main.ts +127 -278
- package/src/lib/construct/{api-to-eventbridge-target → api-to-eventbridge-target-with-sns}/api-destined-lambda.ts +1 -1
- package/src/lib/construct/api-to-eventbridge-target-with-sns/index.ts +2 -0
- package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +703 -0
- package/src/lib/construct/index.ts +1 -0
- package/src/lib/{construct/api-to-eventbridge-target/api-destination-event.ts → helper/api-to-eventbridge-target-event.ts} +5 -3
- package/src/lib/{construct/api-to-eventbridge-target/api-destined-rest-api.ts → helper/api-to-eventbridge-target-rest-api.ts} +4 -4
- package/src/lib/helper/index.ts +2 -0
- package/src/lib/types/aws/index.ts +10 -5
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import * as events from 'aws-cdk-lib/aws-events'
|
|
2
2
|
import * as logs from 'aws-cdk-lib/aws-logs'
|
|
3
|
-
import * as types from '
|
|
3
|
+
import * as types from '../types/aws'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @stability stable
|
|
7
7
|
* @category cdk-utils.api-to-eventbridge-target
|
|
8
8
|
* @subcategory member
|
|
9
|
-
* @classdesc Provides a construct to contain event resources for
|
|
9
|
+
* @classdesc Provides a construct to contain event resources for ApiToEventBridgeTargetWithSns
|
|
10
10
|
*/
|
|
11
|
-
export class
|
|
11
|
+
export class ApiToEventbridgeTargetEvent implements types.ApiToEventBridgeTargetEventType {
|
|
12
12
|
eventBus: events.IEventBus
|
|
13
|
+
logGroup: logs.LogGroup
|
|
13
14
|
logGroupFailure: logs.LogGroup
|
|
14
15
|
logGroupSuccess: logs.LogGroup
|
|
16
|
+
rule: events.Rule
|
|
15
17
|
ruleFailure: events.Rule
|
|
16
18
|
ruleSuccess: events.Rule
|
|
17
19
|
}
|
|
@@ -3,15 +3,15 @@ import * as acm from 'aws-cdk-lib/aws-certificatemanager'
|
|
|
3
3
|
import * as iam from 'aws-cdk-lib/aws-iam'
|
|
4
4
|
import * as route53 from 'aws-cdk-lib/aws-route53'
|
|
5
5
|
import * as sns from 'aws-cdk-lib/aws-sns'
|
|
6
|
-
import * as types from '
|
|
6
|
+
import * as types from '../types/aws'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @stability stable
|
|
10
10
|
* @category cdk-utils.api-to-eventbridge-target
|
|
11
11
|
* @subcategory member
|
|
12
|
-
* @classdesc Provides a construct to contain api resources for
|
|
12
|
+
* @classdesc Provides a construct to contain api resources for ApiToEventBridgeTargetWithSns
|
|
13
13
|
*/
|
|
14
|
-
export class
|
|
14
|
+
export class ApiToEventbridgeTargetRestApi implements types.ApiToEventBridgeTargetRestApiType {
|
|
15
15
|
api: apig.RestApi
|
|
16
16
|
certificate: acm.ICertificate
|
|
17
17
|
domain: apig.DomainName
|
|
@@ -28,5 +28,5 @@ export class ApiDestinedRestApi implements types.ApiDestinedRestApiType {
|
|
|
28
28
|
resource: apig.Resource
|
|
29
29
|
responseModel: apig.Model
|
|
30
30
|
topic: sns.Topic
|
|
31
|
-
|
|
31
|
+
role: iam.Role
|
|
32
32
|
}
|
|
@@ -242,10 +242,12 @@ export interface GraphQlApiLambdaWithCacheProps extends GraphQlApiLambdaProps {
|
|
|
242
242
|
* @category cdk-utils.api-to-eventbridge-target
|
|
243
243
|
* @subcategory Types
|
|
244
244
|
*/
|
|
245
|
-
export interface
|
|
245
|
+
export interface ApiToEventBridgeTargetEventType {
|
|
246
246
|
eventBus: events.IEventBus
|
|
247
|
+
logGroup: logs.LogGroup
|
|
247
248
|
logGroupFailure: logs.LogGroup
|
|
248
249
|
logGroupSuccess: logs.LogGroup
|
|
250
|
+
rule: events.Rule
|
|
249
251
|
ruleFailure: events.Rule
|
|
250
252
|
ruleSuccess: events.Rule
|
|
251
253
|
}
|
|
@@ -254,7 +256,7 @@ export interface ApiDestinationEventType {
|
|
|
254
256
|
* @category cdk-utils.api-to-eventbridge-target
|
|
255
257
|
* @subcategory Types
|
|
256
258
|
*/
|
|
257
|
-
export interface
|
|
259
|
+
export interface ApiToEventBridgeTargetRestApiType {
|
|
258
260
|
api: apig.IRestApi
|
|
259
261
|
authoriser?: apig.IAuthorizer
|
|
260
262
|
certificate: acm.ICertificate
|
|
@@ -271,8 +273,9 @@ export interface ApiDestinedRestApiType {
|
|
|
271
273
|
methodResponse: apig.MethodResponse
|
|
272
274
|
resource: apig.Resource
|
|
273
275
|
responseModel: apig.Model
|
|
274
|
-
topic
|
|
275
|
-
|
|
276
|
+
topic?: sns.ITopic
|
|
277
|
+
role?: iam.Role
|
|
278
|
+
policy?: iam.PolicyDocument
|
|
276
279
|
}
|
|
277
280
|
|
|
278
281
|
/**
|
|
@@ -329,8 +332,10 @@ interface ApiToEventBridgeTargetLambdaProps {
|
|
|
329
332
|
*/
|
|
330
333
|
interface ApiToEventBridgeTargetEventProps {
|
|
331
334
|
eventBusName?: string
|
|
335
|
+
logGroup?: LogProps
|
|
332
336
|
logGroupSuccess?: LogProps
|
|
333
337
|
logGroupFailure?: LogProps
|
|
338
|
+
rule: EventRuleProps
|
|
334
339
|
ruleSuccess: EventRuleProps
|
|
335
340
|
ruleFailure: EventRuleProps
|
|
336
341
|
}
|
|
@@ -344,7 +349,7 @@ export interface ApiToEventBridgeTargetProps extends CommonStackProps {
|
|
|
344
349
|
apiSubDomain: string
|
|
345
350
|
api: ApiToEventBridgeTargetRestApiProps
|
|
346
351
|
event: ApiToEventBridgeTargetEventProps
|
|
347
|
-
lambda
|
|
352
|
+
lambda?: ApiToEventBridgeTargetLambdaProps
|
|
348
353
|
logLevel: string
|
|
349
354
|
nodeEnv: string
|
|
350
355
|
timezone: string
|