@gradientedge/cdk-utils 4.6.6 → 4.6.7
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.
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as apig from 'aws-cdk-lib/aws-apigateway';
|
|
2
1
|
import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
|
|
3
2
|
import { Construct } from 'constructs';
|
|
4
3
|
import { CommonConstruct } from '../../common';
|
|
@@ -32,7 +31,6 @@ export declare class ApiToEventBridgeTarget extends CommonConstruct {
|
|
|
32
31
|
apiDestinedLambda: types.ApiDestinedLambdaType;
|
|
33
32
|
apiEvent: types.ApiDestinationEventType;
|
|
34
33
|
apiDestinedRestApi: types.ApiDestinedRestApiType;
|
|
35
|
-
apiDestinedBasePathMappings: apig.BasePathMapping[];
|
|
36
34
|
apiResource: string;
|
|
37
35
|
constructor(parent: Construct, id: string, props: types.ApiToEventBridgeTargetProps);
|
|
38
36
|
protected initResources(): void;
|
|
@@ -63,7 +63,6 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
63
63
|
apiEvent;
|
|
64
64
|
/* rest restApi related resources */
|
|
65
65
|
apiDestinedRestApi;
|
|
66
|
-
apiDestinedBasePathMappings = [];
|
|
67
66
|
apiResource;
|
|
68
67
|
constructor(parent, id, props) {
|
|
69
68
|
super(parent, id, props);
|
|
@@ -301,6 +300,7 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
301
300
|
createApiDestinedTopic() {
|
|
302
301
|
if (this.props.api.useExisting) {
|
|
303
302
|
this.apiDestinedRestApi.topic = sns.Topic.fromTopicArn(this, `${this.id}-destined-topic`, `arn:aws:sns:${this.props.region}:${cdk.Stack.of(this).account}:${this.id}-destined-topic-${this.props.stage}`);
|
|
303
|
+
return;
|
|
304
304
|
}
|
|
305
305
|
this.apiDestinedRestApi.topic = this.snsManager.createLambdaNotificationService(`${this.id}-destined-topic`, this, {
|
|
306
306
|
topicName: `${this.id}-destined-topic`,
|
|
@@ -314,6 +314,7 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
314
314
|
createApiDestinedRestApi() {
|
|
315
315
|
if (this.props.api.useExisting) {
|
|
316
316
|
this.apiDestinedRestApi.api = apig.RestApi.fromRestApiId(this, `${this.id}-sns-rest-api`, cdk.Fn.importValue('importedRestApiRef'));
|
|
317
|
+
return;
|
|
317
318
|
}
|
|
318
319
|
this.apiDestinedRestApi.api = new apig.RestApi(this, `${this.id}-sns-rest-api`, {
|
|
319
320
|
...{
|
package/package.json
CHANGED
|
@@ -50,7 +50,6 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
|
|
|
50
50
|
|
|
51
51
|
/* rest restApi related resources */
|
|
52
52
|
apiDestinedRestApi: types.ApiDestinedRestApiType
|
|
53
|
-
apiDestinedBasePathMappings: apig.BasePathMapping[] = []
|
|
54
53
|
apiResource: string
|
|
55
54
|
|
|
56
55
|
constructor(parent: Construct, id: string, props: types.ApiToEventBridgeTargetProps) {
|
|
@@ -348,6 +347,7 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
|
|
|
348
347
|
`${this.id}-destined-topic`,
|
|
349
348
|
`arn:aws:sns:${this.props.region}:${cdk.Stack.of(this).account}:${this.id}-destined-topic-${this.props.stage}`
|
|
350
349
|
)
|
|
350
|
+
return
|
|
351
351
|
}
|
|
352
352
|
this.apiDestinedRestApi.topic = this.snsManager.createLambdaNotificationService(
|
|
353
353
|
`${this.id}-destined-topic`,
|
|
@@ -372,6 +372,7 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
|
|
|
372
372
|
`${this.id}-sns-rest-api`,
|
|
373
373
|
cdk.Fn.importValue('importedRestApiRef')
|
|
374
374
|
)
|
|
375
|
+
return
|
|
375
376
|
}
|
|
376
377
|
this.apiDestinedRestApi.api = new apig.RestApi(this, `${this.id}-sns-rest-api`, {
|
|
377
378
|
...{
|