@certenza/aws-cdk-infrastructure-commons 2.3.0 → 2.3.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.
package/dist/src/apigateway.d.ts
CHANGED
|
@@ -20,9 +20,8 @@ declare const createApiGateway: (scope: Construct, apiName: string, domainName:
|
|
|
20
20
|
/**
|
|
21
21
|
* Imports an API Gateway from the given stack name
|
|
22
22
|
* @param scope - The scope of the API Gateway
|
|
23
|
-
* @param stackName - The name of the stack to import the API Gateway from
|
|
24
23
|
* @param apiName - The name of the API Gateway to import
|
|
25
24
|
* @returns The imported API Gateway
|
|
26
25
|
*/
|
|
27
|
-
declare const importApiGateway: (scope: Construct,
|
|
26
|
+
declare const importApiGateway: (scope: Construct, apiName: string) => apigateway.IRestApi;
|
|
28
27
|
export { createApiGateway, getApiGatewayDomainName, importApiGateway };
|
package/dist/src/apigateway.js
CHANGED
|
@@ -116,14 +116,13 @@ exports.createApiGateway = createApiGateway;
|
|
|
116
116
|
/**
|
|
117
117
|
* Imports an API Gateway from the given stack name
|
|
118
118
|
* @param scope - The scope of the API Gateway
|
|
119
|
-
* @param stackName - The name of the stack to import the API Gateway from
|
|
120
119
|
* @param apiName - The name of the API Gateway to import
|
|
121
120
|
* @returns The imported API Gateway
|
|
122
121
|
*/
|
|
123
|
-
const importApiGateway = (scope,
|
|
122
|
+
const importApiGateway = (scope, apiName) => {
|
|
124
123
|
return apigateway.RestApi.fromRestApiAttributes(scope, `Imported-${apiName}-Api`, {
|
|
125
|
-
restApiId: aws_cdk_lib_1.Fn.importValue(`CertenzaInfrastructureApiGatewayStack-${apiName}
|
|
126
|
-
rootResourceId: aws_cdk_lib_1.Fn.importValue(`CertenzaInfrastructureApiGatewayStack-${apiName}
|
|
124
|
+
restApiId: aws_cdk_lib_1.Fn.importValue(`CertenzaInfrastructureApiGatewayStack-${apiName}Id`),
|
|
125
|
+
rootResourceId: aws_cdk_lib_1.Fn.importValue(`CertenzaInfrastructureApiGatewayStack-${apiName}RootResourceId`),
|
|
127
126
|
});
|
|
128
127
|
};
|
|
129
128
|
exports.importApiGateway = importApiGateway;
|
package/package.json
CHANGED