@gradientedge/cdk-utils 4.6.5 → 4.6.6
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.
|
@@ -515,23 +515,22 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
|
|
|
515
515
|
* @protected
|
|
516
516
|
*/
|
|
517
517
|
createApiBasePathMapping() {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
}));
|
|
527
|
-
});
|
|
528
|
-
}
|
|
518
|
+
if (this.props.api.useExisting)
|
|
519
|
+
return;
|
|
520
|
+
new apig.BasePathMapping(this, `${this.id}-base-bath-mapping`, {
|
|
521
|
+
basePath: '',
|
|
522
|
+
domainName: this.apiDestinedRestApi.domain,
|
|
523
|
+
restApi: this.apiDestinedRestApi.api,
|
|
524
|
+
stage: this.apiDestinedRestApi.api.deploymentStage,
|
|
525
|
+
});
|
|
529
526
|
}
|
|
530
527
|
/**
|
|
531
528
|
* @summary Method to create route53 records for Api API
|
|
532
529
|
* @protected
|
|
533
530
|
*/
|
|
534
531
|
createApiRouteAssets() {
|
|
532
|
+
if (this.props.api.useExisting)
|
|
533
|
+
return;
|
|
535
534
|
this.route53Manager.createApiGatewayARecord(`${this.id}-custom-domain-a-record`, this, this.props.apiSubDomain, this.apiDestinedRestApi.domain, this.apiDestinedRestApi.hostedZone);
|
|
536
535
|
}
|
|
537
536
|
}
|
package/package.json
CHANGED
|
@@ -591,19 +591,13 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
|
|
|
591
591
|
* @protected
|
|
592
592
|
*/
|
|
593
593
|
protected createApiBasePathMapping() {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
restApi: this.apiDestinedRestApi.api,
|
|
602
|
-
stage: this.apiDestinedRestApi.api.deploymentStage,
|
|
603
|
-
})
|
|
604
|
-
)
|
|
605
|
-
})
|
|
606
|
-
}
|
|
594
|
+
if (this.props.api.useExisting) return
|
|
595
|
+
new apig.BasePathMapping(this, `${this.id}-base-bath-mapping`, {
|
|
596
|
+
basePath: '',
|
|
597
|
+
domainName: this.apiDestinedRestApi.domain,
|
|
598
|
+
restApi: this.apiDestinedRestApi.api,
|
|
599
|
+
stage: this.apiDestinedRestApi.api.deploymentStage,
|
|
600
|
+
})
|
|
607
601
|
}
|
|
608
602
|
|
|
609
603
|
/**
|
|
@@ -611,6 +605,7 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
|
|
|
611
605
|
* @protected
|
|
612
606
|
*/
|
|
613
607
|
protected createApiRouteAssets() {
|
|
608
|
+
if (this.props.api.useExisting) return
|
|
614
609
|
this.route53Manager.createApiGatewayARecord(
|
|
615
610
|
`${this.id}-custom-domain-a-record`,
|
|
616
611
|
this,
|