@gradientedge/cdk-utils 8.117.0 → 8.119.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.
Files changed (148) hide show
  1. package/app/api-destined-function/package.json +1 -1
  2. package/dist/src/lib/common/construct.d.ts +32 -32
  3. package/dist/src/lib/common/construct.js +36 -59
  4. package/dist/src/lib/common/stack.d.ts +8 -7
  5. package/dist/src/lib/common/stack.js +17 -37
  6. package/dist/src/lib/common/types.d.ts +2 -2
  7. package/dist/src/lib/construct/api-to-eventbridge-target/api.d.ts +22 -22
  8. package/dist/src/lib/construct/api-to-eventbridge-target/event.d.ts +9 -9
  9. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +3 -3
  10. package/dist/src/lib/construct/api-to-eventbridge-target/main.js +37 -60
  11. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +9 -9
  12. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +3 -3
  13. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +40 -63
  14. package/dist/src/lib/construct/api-to-lambda-target/api.d.ts +23 -23
  15. package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +2 -2
  16. package/dist/src/lib/construct/api-to-lambda-target/main.js +15 -38
  17. package/dist/src/lib/construct/application-configuration/main.d.ts +7 -7
  18. package/dist/src/lib/construct/application-configuration/main.js +17 -41
  19. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +17 -17
  20. package/dist/src/lib/construct/graphql-api-lambda/main.js +6 -29
  21. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +5 -5
  22. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +7 -7
  23. package/dist/src/lib/construct/lambda-with-iam-access/main.d.ts +16 -16
  24. package/dist/src/lib/construct/lambda-with-iam-access/main.js +8 -31
  25. package/dist/src/lib/construct/lambda-with-iam-access/types.d.ts +4 -4
  26. package/dist/src/lib/construct/rest-api-lambda/main.d.ts +16 -16
  27. package/dist/src/lib/construct/rest-api-lambda/main.js +5 -28
  28. package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +5 -5
  29. package/dist/src/lib/construct/rest-api-lambda-with-cache/main.js +9 -32
  30. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +38 -39
  31. package/dist/src/lib/construct/site-with-ecs-backend/main.js +33 -54
  32. package/dist/src/lib/construct/static-asset-deployment/main.d.ts +4 -4
  33. package/dist/src/lib/construct/static-asset-deployment/main.js +3 -26
  34. package/dist/src/lib/construct/static-site/main.d.ts +15 -15
  35. package/dist/src/lib/construct/static-site/main.js +4 -27
  36. package/dist/src/lib/services/aws/api-gateway/main.d.ts +10 -10
  37. package/dist/src/lib/services/aws/api-gateway/main.js +21 -44
  38. package/dist/src/lib/services/aws/api-gateway/types.d.ts +2 -2
  39. package/dist/src/lib/services/aws/appconfig/main.d.ts +7 -7
  40. package/dist/src/lib/services/aws/appconfig/main.js +14 -37
  41. package/dist/src/lib/services/aws/certificate-manager/main.d.ts +5 -5
  42. package/dist/src/lib/services/aws/certificate-manager/main.js +10 -33
  43. package/dist/src/lib/services/aws/certificate-manager/types.d.ts +2 -2
  44. package/dist/src/lib/services/aws/cloudfront/main.d.ts +18 -18
  45. package/dist/src/lib/services/aws/cloudfront/main.js +46 -45
  46. package/dist/src/lib/services/aws/cloudfront/types.d.ts +2 -3
  47. package/dist/src/lib/services/aws/cloudtrail/main.d.ts +5 -5
  48. package/dist/src/lib/services/aws/cloudtrail/main.js +5 -28
  49. package/dist/src/lib/services/aws/codebuild/main.d.ts +3 -3
  50. package/dist/src/lib/services/aws/codebuild/main.js +7 -30
  51. package/dist/src/lib/services/aws/dynamodb/main.d.ts +3 -3
  52. package/dist/src/lib/services/aws/dynamodb/main.js +8 -31
  53. package/dist/src/lib/services/aws/elastic-container-registry/main.d.ts +2 -2
  54. package/dist/src/lib/services/aws/elastic-container-registry/main.js +4 -27
  55. package/dist/src/lib/services/aws/elastic-container-service/main.d.ts +10 -10
  56. package/dist/src/lib/services/aws/elastic-container-service/main.js +27 -50
  57. package/dist/src/lib/services/aws/elastic-container-service/types.d.ts +4 -4
  58. package/dist/src/lib/services/aws/elastic-file-system/main.d.ts +3 -3
  59. package/dist/src/lib/services/aws/elastic-file-system/main.js +12 -35
  60. package/dist/src/lib/services/aws/elastic-kubernetes-service/main.d.ts +4 -4
  61. package/dist/src/lib/services/aws/elastic-kubernetes-service/main.js +8 -31
  62. package/dist/src/lib/services/aws/elasticache/main.d.ts +4 -4
  63. package/dist/src/lib/services/aws/elasticache/main.js +10 -33
  64. package/dist/src/lib/services/aws/eventbridge/main.d.ts +13 -13
  65. package/dist/src/lib/services/aws/eventbridge/main.js +26 -49
  66. package/dist/src/lib/services/aws/eventbridge/target.d.ts +10 -10
  67. package/dist/src/lib/services/aws/eventbridge/target.js +6 -29
  68. package/dist/src/lib/services/aws/evidently/main.d.ts +7 -7
  69. package/dist/src/lib/services/aws/evidently/main.js +18 -41
  70. package/dist/src/lib/services/aws/identity-access-management/main.d.ts +48 -49
  71. package/dist/src/lib/services/aws/identity-access-management/main.js +110 -133
  72. package/dist/src/lib/services/aws/key-management-service/main.d.ts +2 -2
  73. package/dist/src/lib/services/aws/key-management-service/main.js +5 -28
  74. package/dist/src/lib/services/aws/lambda/main.d.ts +11 -13
  75. package/dist/src/lib/services/aws/lambda/main.js +31 -58
  76. package/dist/src/lib/services/aws/route53/main.d.ts +9 -9
  77. package/dist/src/lib/services/aws/route53/main.js +21 -44
  78. package/dist/src/lib/services/aws/secrets-manager/main.d.ts +5 -6
  79. package/dist/src/lib/services/aws/secrets-manager/main.js +10 -33
  80. package/dist/src/lib/services/aws/simple-notification-service/main.d.ts +4 -4
  81. package/dist/src/lib/services/aws/simple-notification-service/main.js +11 -34
  82. package/dist/src/lib/services/aws/simple-queue-service/main.d.ts +6 -7
  83. package/dist/src/lib/services/aws/simple-queue-service/main.js +15 -38
  84. package/dist/src/lib/services/aws/simple-storage-service/main.d.ts +10 -11
  85. package/dist/src/lib/services/aws/simple-storage-service/main.js +31 -54
  86. package/dist/src/lib/services/aws/step-function/main.d.ts +31 -32
  87. package/dist/src/lib/services/aws/step-function/main.js +33 -57
  88. package/dist/src/lib/services/aws/systems-manager/main.d.ts +4 -4
  89. package/dist/src/lib/services/aws/systems-manager/main.js +10 -33
  90. package/dist/src/lib/services/aws/virtual-private-cloud/main.d.ts +5 -6
  91. package/dist/src/lib/services/aws/virtual-private-cloud/main.js +14 -37
  92. package/dist/src/lib/services/aws/web-application-firewall/main.d.ts +3 -3
  93. package/dist/src/lib/services/aws/web-application-firewall/main.js +8 -31
  94. package/dist/src/lib/utils/aws/index.d.ts +6 -3
  95. package/dist/src/lib/utils/aws/index.js +9 -26
  96. package/package.json +21 -21
  97. package/src/lib/common/construct.ts +97 -67
  98. package/src/lib/common/stack.ts +12 -12
  99. package/src/lib/common/types.ts +2 -2
  100. package/src/lib/construct/api-to-eventbridge-target/api.ts +31 -22
  101. package/src/lib/construct/api-to-eventbridge-target/event.ts +9 -9
  102. package/src/lib/construct/api-to-eventbridge-target/main.ts +56 -41
  103. package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +9 -9
  104. package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +62 -47
  105. package/src/lib/construct/api-to-lambda-target/api.ts +33 -23
  106. package/src/lib/construct/api-to-lambda-target/main.ts +24 -18
  107. package/src/lib/construct/application-configuration/main.ts +31 -24
  108. package/src/lib/construct/graphql-api-lambda/main.ts +22 -22
  109. package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +13 -13
  110. package/src/lib/construct/lambda-with-iam-access/main.ts +25 -25
  111. package/src/lib/construct/lambda-with-iam-access/types.ts +4 -4
  112. package/src/lib/construct/rest-api-lambda/main.ts +21 -21
  113. package/src/lib/construct/rest-api-lambda-with-cache/main.ts +14 -14
  114. package/src/lib/construct/site-with-ecs-backend/main.ts +79 -60
  115. package/src/lib/construct/static-asset-deployment/main.ts +6 -6
  116. package/src/lib/construct/static-site/main.ts +23 -17
  117. package/src/lib/services/aws/api-gateway/main.ts +42 -36
  118. package/src/lib/services/aws/api-gateway/types.ts +2 -2
  119. package/src/lib/services/aws/appconfig/main.ts +19 -19
  120. package/src/lib/services/aws/certificate-manager/main.ts +14 -14
  121. package/src/lib/services/aws/certificate-manager/types.ts +2 -2
  122. package/src/lib/services/aws/cloudfront/main.ts +88 -74
  123. package/src/lib/services/aws/cloudfront/types.ts +6 -3
  124. package/src/lib/services/aws/cloudtrail/main.ts +11 -11
  125. package/src/lib/services/aws/codebuild/main.ts +7 -7
  126. package/src/lib/services/aws/dynamodb/main.ts +8 -8
  127. package/src/lib/services/aws/elastic-container-registry/main.ts +4 -4
  128. package/src/lib/services/aws/elastic-container-service/main.ts +48 -37
  129. package/src/lib/services/aws/elastic-container-service/types.ts +4 -4
  130. package/src/lib/services/aws/elastic-file-system/main.ts +16 -16
  131. package/src/lib/services/aws/elastic-kubernetes-service/main.ts +11 -11
  132. package/src/lib/services/aws/elasticache/main.ts +10 -10
  133. package/src/lib/services/aws/eventbridge/main.ts +37 -37
  134. package/src/lib/services/aws/eventbridge/target.ts +14 -14
  135. package/src/lib/services/aws/evidently/main.ts +18 -18
  136. package/src/lib/services/aws/identity-access-management/main.ts +142 -134
  137. package/src/lib/services/aws/key-management-service/main.ts +5 -5
  138. package/src/lib/services/aws/lambda/main.ts +65 -59
  139. package/src/lib/services/aws/route53/main.ts +31 -31
  140. package/src/lib/services/aws/secrets-manager/main.ts +11 -15
  141. package/src/lib/services/aws/simple-notification-service/main.ts +13 -13
  142. package/src/lib/services/aws/simple-queue-service/main.ts +18 -18
  143. package/src/lib/services/aws/simple-storage-service/main.ts +40 -40
  144. package/src/lib/services/aws/step-function/main.ts +77 -65
  145. package/src/lib/services/aws/systems-manager/main.ts +17 -12
  146. package/src/lib/services/aws/virtual-private-cloud/main.ts +16 -16
  147. package/src/lib/services/aws/web-application-firewall/main.ts +8 -8
  148. package/src/lib/utils/aws/index.ts +8 -5
@@ -1,33 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.ApiToLambdaTarget = void 0;
27
- const cdk = __importStar(require("aws-cdk-lib"));
28
- const apig = __importStar(require("aws-cdk-lib/aws-apigateway"));
29
- const iam = __importStar(require("aws-cdk-lib/aws-iam"));
30
- const lambda = __importStar(require("aws-cdk-lib/aws-lambda"));
4
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
5
+ const aws_apigateway_1 = require("aws-cdk-lib/aws-apigateway");
6
+ const aws_iam_1 = require("aws-cdk-lib/aws-iam");
7
+ const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
31
8
  const common_1 = require("../../common");
32
9
  const api_1 = require("./api");
33
10
  /**
@@ -126,19 +103,19 @@ class ApiToLambdaTarget extends common_1.CommonConstruct {
126
103
  };
127
104
  }
128
105
  resolveApiToLambdaTargetFunction() {
129
- this.apiToLambdaTargetRestApi.lambda = lambda.Function.fromFunctionName(this, `${this.id}-lambda`, this.props.lambdaFunctionName);
106
+ this.apiToLambdaTargetRestApi.lambda = aws_lambda_1.Function.fromFunctionName(this, `${this.id}-lambda`, this.props.lambdaFunctionName);
130
107
  }
131
108
  /**
132
109
  * @summary Method to create rest restApi for Api
133
110
  */
134
111
  createApiToLambdaTargetRestApi() {
135
112
  if (this.props.api.useExisting && this.props.api.importedRestApiRef) {
136
- this.apiToLambdaTargetRestApi.api = apig.RestApi.fromRestApiId(this, `${this.id}-rest-api`, cdk.Fn.importValue(this.props.api.importedRestApiRef));
113
+ this.apiToLambdaTargetRestApi.api = aws_apigateway_1.RestApi.fromRestApiId(this, `${this.id}-rest-api`, aws_cdk_lib_1.Fn.importValue(this.props.api.importedRestApiRef));
137
114
  return;
138
115
  }
139
116
  const accessLogGroup = this.logManager.createLogGroup(`${this.id}-rest-api-access-log`, this, {
140
117
  logGroupName: `/custom/api/${this.id}-rest-api-access`,
141
- removalPolicy: cdk.RemovalPolicy.DESTROY,
118
+ removalPolicy: aws_cdk_lib_1.RemovalPolicy.DESTROY,
142
119
  });
143
120
  this.props.api.restApi = {
144
121
  ...this.props.api.restApi,
@@ -150,7 +127,7 @@ class ApiToLambdaTarget extends common_1.CommonConstruct {
150
127
  ],
151
128
  },
152
129
  deployOptions: {
153
- accessLogDestination: new apig.LogGroupLogDestination(accessLogGroup),
130
+ accessLogDestination: new aws_apigateway_1.LogGroupLogDestination(accessLogGroup),
154
131
  },
155
132
  },
156
133
  };
@@ -166,9 +143,9 @@ class ApiToLambdaTarget extends common_1.CommonConstruct {
166
143
  return;
167
144
  let rootResource;
168
145
  if (this.props.api.withResource && this.props.api.importedRestApiRootResourceRef) {
169
- rootResource = apig.Resource.fromResourceAttributes(this, `${this.id}-root-resource`, {
146
+ rootResource = aws_apigateway_1.Resource.fromResourceAttributes(this, `${this.id}-root-resource`, {
170
147
  path: '/',
171
- resourceId: cdk.Fn.importValue(this.props.api.importedRestApiRootResourceRef),
148
+ resourceId: aws_cdk_lib_1.Fn.importValue(this.props.api.importedRestApiRootResourceRef),
172
149
  restApi: this.apiToLambdaTargetRestApi.api,
173
150
  });
174
151
  }
@@ -178,7 +155,7 @@ class ApiToLambdaTarget extends common_1.CommonConstruct {
178
155
  this.apiToLambdaTargetRestApi.resource = rootResource.addResource(this.props.api.resource ?? this.apiResource);
179
156
  }
180
157
  createApiToLambdaTargetPolicy() {
181
- this.apiToLambdaTargetRestApi.policy = new iam.PolicyDocument({
158
+ this.apiToLambdaTargetRestApi.policy = new aws_iam_1.PolicyDocument({
182
159
  statements: [
183
160
  this.iamManager.statementForPutEvents(),
184
161
  this.iamManager.statementForInvokeLambda([this.apiToLambdaTargetRestApi.lambda.functionArn]),
@@ -191,8 +168,8 @@ class ApiToLambdaTarget extends common_1.CommonConstruct {
191
168
  createApiToLambdaTargetRole() {
192
169
  if (!this.apiToLambdaTargetRestApi.policy)
193
170
  throw 'Policy undefined';
194
- this.apiToLambdaTargetRestApi.role = new iam.Role(this, `${this.id}-rest-api-role`, {
195
- assumedBy: new iam.ServicePrincipal('apigateway.amazonaws.com'),
171
+ this.apiToLambdaTargetRestApi.role = new aws_iam_1.Role(this, `${this.id}-rest-api-role`, {
172
+ assumedBy: new aws_iam_1.ServicePrincipal('apigateway.amazonaws.com'),
196
173
  inlinePolicies: { policy: this.apiToLambdaTargetRestApi.policy },
197
174
  });
198
175
  }
@@ -200,7 +177,7 @@ class ApiToLambdaTarget extends common_1.CommonConstruct {
200
177
  * @summary Method to create api integration resource method
201
178
  */
202
179
  createApiToLambdaTargetIntegration() {
203
- this.apiToLambdaTargetRestApi.integration = new apig.LambdaIntegration(this.apiToLambdaTargetRestApi.lambda, {
180
+ this.apiToLambdaTargetRestApi.integration = new aws_apigateway_1.LambdaIntegration(this.apiToLambdaTargetRestApi.lambda, {
204
181
  allowTestInvoke: true,
205
182
  credentialsRole: this.apiToLambdaTargetRestApi.role,
206
183
  });
@@ -235,7 +212,7 @@ class ApiToLambdaTarget extends common_1.CommonConstruct {
235
212
  createApiBasePathMapping() {
236
213
  if (this.props.api.useExisting)
237
214
  return;
238
- new apig.BasePathMapping(this, `${this.id}-base-bath-mapping`, {
215
+ new aws_apigateway_1.BasePathMapping(this, `${this.id}-base-bath-mapping`, {
239
216
  basePath: '',
240
217
  domainName: this.apiToLambdaTargetRestApi.domain,
241
218
  restApi: this.apiToLambdaTargetRestApi.api,
@@ -1,15 +1,15 @@
1
+ import { CfnApplication, CfnConfigurationProfile, CfnDeploymentStrategy, CfnEnvironment, CfnHostedConfigurationVersion } from 'aws-cdk-lib/aws-appconfig';
1
2
  import { Construct } from 'constructs';
2
- import * as appconfig from 'aws-cdk-lib/aws-appconfig';
3
- import { ApplicationConfigurationProps } from './types';
4
3
  import { CommonConstruct } from '../../common';
4
+ import { ApplicationConfigurationProps } from './types';
5
5
  export declare class ApplicationConfiguration extends CommonConstruct {
6
6
  props: ApplicationConfigurationProps;
7
7
  id: string;
8
- appConfigApplication: appconfig.CfnApplication;
9
- appConfigEnvironment: appconfig.CfnEnvironment;
10
- appConfigProfile: appconfig.CfnConfigurationProfile;
11
- appConfigVersion: appconfig.CfnHostedConfigurationVersion;
12
- appConfigDeploymentStrategy: appconfig.CfnDeploymentStrategy;
8
+ appConfigApplication: CfnApplication;
9
+ appConfigEnvironment: CfnEnvironment;
10
+ appConfigProfile: CfnConfigurationProfile;
11
+ appConfigVersion: CfnHostedConfigurationVersion;
12
+ appConfigDeploymentStrategy: CfnDeploymentStrategy;
13
13
  constructor(parent: Construct, id: string, props: ApplicationConfigurationProps);
14
14
  initResources(): void;
15
15
  protected createConfiguration(): void;
@@ -1,34 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.ApplicationConfiguration = void 0;
27
- const cdk = __importStar(require("aws-cdk-lib"));
28
- const appconfig = __importStar(require("aws-cdk-lib/aws-appconfig"));
4
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
5
+ const aws_appconfig_1 = require("aws-cdk-lib/aws-appconfig");
29
6
  const common_1 = require("../../common");
30
7
  class ApplicationConfiguration extends common_1.CommonConstruct {
31
- props;
32
8
  id;
33
9
  appConfigApplication;
34
10
  appConfigEnvironment;
@@ -56,21 +32,21 @@ class ApplicationConfiguration extends common_1.CommonConstruct {
56
32
  this.appConfigApplication = this.appConfigManager.createApplication(`${this.id}-ac-application`, this, this.props.appConfig);
57
33
  }
58
34
  createAppConfigEnvironment() {
59
- this.appConfigEnvironment = this.appConfigManager.createEnvironment(`${this.id}-ac-environment`, this, cdk.Fn.ref(this.appConfigApplication.logicalId), this.props.appConfig);
35
+ this.appConfigEnvironment = this.appConfigManager.createEnvironment(`${this.id}-ac-environment`, this, aws_cdk_lib_1.Fn.ref(this.appConfigApplication.logicalId), this.props.appConfig);
60
36
  }
61
37
  createAppConfigProfile() {
62
- this.appConfigProfile = this.appConfigManager.createConfigurationProfile(`${this.id}-ac-profile`, this, cdk.Fn.ref(this.appConfigApplication.logicalId), this.props.appConfig);
38
+ this.appConfigProfile = this.appConfigManager.createConfigurationProfile(`${this.id}-ac-profile`, this, aws_cdk_lib_1.Fn.ref(this.appConfigApplication.logicalId), this.props.appConfig);
63
39
  }
64
40
  createAppConfigVersion() {
65
- this.appConfigVersion = new appconfig.CfnHostedConfigurationVersion(this, `${this.id}-ac-configuration`, {
66
- applicationId: cdk.Fn.ref(this.appConfigApplication.logicalId),
67
- configurationProfileId: cdk.Fn.ref(this.appConfigProfile.logicalId),
41
+ this.appConfigVersion = new aws_appconfig_1.CfnHostedConfigurationVersion(this, `${this.id}-ac-configuration`, {
42
+ applicationId: aws_cdk_lib_1.Fn.ref(this.appConfigApplication.logicalId),
43
+ configurationProfileId: aws_cdk_lib_1.Fn.ref(this.appConfigProfile.logicalId),
68
44
  content: JSON.stringify(this.props.appConfigContent),
69
45
  contentType: 'application/json',
70
46
  });
71
47
  }
72
48
  createAppConfigDeploymentStrategy() {
73
- this.appConfigDeploymentStrategy = new appconfig.CfnDeploymentStrategy(this, `${this.id}-ac-deployment-strategy`, {
49
+ this.appConfigDeploymentStrategy = new aws_appconfig_1.CfnDeploymentStrategy(this, `${this.id}-ac-deployment-strategy`, {
74
50
  deploymentDurationInMinutes: this.props.appConfig.deploymentStrategy.deploymentDurationInMinutes,
75
51
  growthFactor: this.props.appConfig.deploymentStrategy.growthFactor,
76
52
  name: this.props.appConfig.deploymentStrategy.name,
@@ -78,19 +54,19 @@ class ApplicationConfiguration extends common_1.CommonConstruct {
78
54
  });
79
55
  }
80
56
  createAppConfigDeployment() {
81
- new appconfig.CfnDeployment(this, `${this.id}-app-config-deployment`, {
82
- applicationId: cdk.Fn.ref(this.appConfigApplication.logicalId),
83
- configurationProfileId: cdk.Fn.ref(this.appConfigProfile.logicalId),
84
- configurationVersion: cdk.Fn.ref(this.appConfigVersion.logicalId),
85
- deploymentStrategyId: cdk.Fn.ref(this.appConfigDeploymentStrategy.logicalId),
86
- environmentId: cdk.Fn.ref(this.appConfigEnvironment.logicalId),
57
+ new aws_appconfig_1.CfnDeployment(this, `${this.id}-app-config-deployment`, {
58
+ applicationId: aws_cdk_lib_1.Fn.ref(this.appConfigApplication.logicalId),
59
+ configurationProfileId: aws_cdk_lib_1.Fn.ref(this.appConfigProfile.logicalId),
60
+ configurationVersion: aws_cdk_lib_1.Fn.ref(this.appConfigVersion.logicalId),
61
+ deploymentStrategyId: aws_cdk_lib_1.Fn.ref(this.appConfigDeploymentStrategy.logicalId),
62
+ environmentId: aws_cdk_lib_1.Fn.ref(this.appConfigEnvironment.logicalId),
87
63
  });
88
64
  }
89
65
  resolveEnvironmentVariables() {
90
66
  return {
91
- APP_CONFIG_APPLICATION_ID: cdk.Fn.ref(this.appConfigApplication.logicalId),
92
- APP_CONFIG_CONFIGURATION_PROFILE_ID: cdk.Fn.ref(this.appConfigProfile.logicalId),
93
- APP_CONFIG_ENVIRONMENT_ID: cdk.Fn.ref(this.appConfigEnvironment.logicalId),
67
+ APP_CONFIG_APPLICATION_ID: aws_cdk_lib_1.Fn.ref(this.appConfigApplication.logicalId),
68
+ APP_CONFIG_CONFIGURATION_PROFILE_ID: aws_cdk_lib_1.Fn.ref(this.appConfigProfile.logicalId),
69
+ APP_CONFIG_ENVIRONMENT_ID: aws_cdk_lib_1.Fn.ref(this.appConfigEnvironment.logicalId),
94
70
  };
95
71
  }
96
72
  }
@@ -1,9 +1,9 @@
1
- import * as apig from 'aws-cdk-lib/aws-apigateway';
2
- import * as acm from 'aws-cdk-lib/aws-certificatemanager';
3
- import * as iam from 'aws-cdk-lib/aws-iam';
4
- import * as lambda from 'aws-cdk-lib/aws-lambda';
5
- import * as route53 from 'aws-cdk-lib/aws-route53';
6
- import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
1
+ import { BasePathMapping, DomainName, RestApi } from 'aws-cdk-lib/aws-apigateway';
2
+ import { ICertificate } from 'aws-cdk-lib/aws-certificatemanager';
3
+ import { PolicyDocument, Role } from 'aws-cdk-lib/aws-iam';
4
+ import { IFunction, ILayerVersion } from 'aws-cdk-lib/aws-lambda';
5
+ import { IHostedZone } from 'aws-cdk-lib/aws-route53';
6
+ import { ISecret } from 'aws-cdk-lib/aws-secretsmanager';
7
7
  import { Construct } from 'constructs';
8
8
  import { CommonConstruct } from '../../common';
9
9
  import { GraphQlApiLambdaEnvironment, GraphQlApiLambdaProps } from './types';
@@ -11,7 +11,7 @@ import { GraphQlApiLambdaEnvironment, GraphQlApiLambdaProps } from './types';
11
11
  * @deprecated Use RestApiLambda instead. This will be removed in a future release.
12
12
  * @classdesc Provides a construct to create and deploy a Graphql API as Lambda
13
13
  *
14
- * <b>Architecture</b><br/> ![Architecture](./GraphQLApiLambda.jpg)
14
+ * <b>Architecture</b><br/> ![Architecture](./GraphQLApi.jpg)
15
15
  * @example
16
16
  * import { GraphQLApiLambda, GraphQlApiLambdaProps } '@gradientedge/cdk-utils'
17
17
  * import { Construct } from 'constructs'
@@ -28,17 +28,17 @@ import { GraphQlApiLambdaEnvironment, GraphQlApiLambdaProps } from './types';
28
28
  export declare class GraphQLApiLambda extends CommonConstruct {
29
29
  props: GraphQlApiLambdaProps;
30
30
  id: string;
31
- applicationSecrets: secretsmanager.ISecret[];
32
- graphQLApiLambdaPolicy: iam.PolicyDocument;
33
- graphQLApiLambdaRole: iam.Role;
31
+ applicationSecrets: ISecret[];
32
+ graphQLApiLambdaPolicy: PolicyDocument;
33
+ graphQLApiLambdaRole: Role;
34
34
  graphQLApiLambdaEnvironment: GraphQlApiLambdaEnvironment;
35
- graphQLApiLambdaLayers: lambda.ILayerVersion[];
36
- graphQLApiLambdaFunction: lambda.Function;
37
- graphQLApi: apig.RestApi;
38
- graphQLApiHostedZone: route53.IHostedZone;
39
- graphQLApiCertificate: acm.ICertificate;
40
- graphQLApiDomain: apig.DomainName;
41
- graphQLApiBasePathMappings: apig.BasePathMapping[];
35
+ graphQLApiLambdaLayers: ILayerVersion[];
36
+ graphQLApiLambdaFunction: IFunction;
37
+ graphQLApi: RestApi;
38
+ graphQLApiHostedZone: IHostedZone;
39
+ graphQLApiCertificate: ICertificate;
40
+ graphQLApiDomain: DomainName;
41
+ graphQLApiBasePathMappings: BasePathMapping[];
42
42
  constructor(parent: Construct, id: string, props: GraphQlApiLambdaProps);
43
43
  /**
44
44
  * @summary Initialise and provision resources
@@ -1,37 +1,14 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.GraphQLApiLambda = void 0;
27
- const apig = __importStar(require("aws-cdk-lib/aws-apigateway"));
28
- const iam = __importStar(require("aws-cdk-lib/aws-iam"));
4
+ const aws_apigateway_1 = require("aws-cdk-lib/aws-apigateway");
5
+ const aws_iam_1 = require("aws-cdk-lib/aws-iam");
29
6
  const common_1 = require("../../common");
30
7
  /**
31
8
  * @deprecated Use RestApiLambda instead. This will be removed in a future release.
32
9
  * @classdesc Provides a construct to create and deploy a Graphql API as Lambda
33
10
  *
34
- * <b>Architecture</b><br/> ![Architecture](./GraphQLApiLambda.jpg)
11
+ * <b>Architecture</b><br/> ![Architecture](./GraphQLApi.jpg)
35
12
  * @example
36
13
  * import { GraphQLApiLambda, GraphQlApiLambdaProps } '@gradientedge/cdk-utils'
37
14
  * import { Construct } from 'constructs'
@@ -111,7 +88,7 @@ class GraphQLApiLambda extends common_1.CommonConstruct {
111
88
  * @summary Method to create iam policy for GraphQL Lambda function
112
89
  */
113
90
  createLambdaPolicy() {
114
- this.graphQLApiLambdaPolicy = new iam.PolicyDocument({
91
+ this.graphQLApiLambdaPolicy = new aws_iam_1.PolicyDocument({
115
92
  statements: [this.iamManager.statementForCreateAnyLogStream()],
116
93
  });
117
94
  }
@@ -170,7 +147,7 @@ class GraphQLApiLambda extends common_1.CommonConstruct {
170
147
  const apiRootPaths = this.props.apiRootPaths;
171
148
  if (apiRootPaths && apiRootPaths.length > 0) {
172
149
  apiRootPaths.forEach((apiRootPath) => {
173
- this.graphQLApiBasePathMappings.push(new apig.BasePathMapping(this, `${this.id}-base-bath-mapping-${apiRootPath}`, {
150
+ this.graphQLApiBasePathMappings.push(new aws_apigateway_1.BasePathMapping(this, `${this.id}-base-bath-mapping-${apiRootPath}`, {
174
151
  basePath: apiRootPath,
175
152
  domainName: this.graphQLApiDomain,
176
153
  restApi: this.graphQLApi,
@@ -180,7 +157,7 @@ class GraphQLApiLambda extends common_1.CommonConstruct {
180
157
  return;
181
158
  }
182
159
  // add default mapping if apiRootPaths not set
183
- new apig.BasePathMapping(this, `${this.id}-base-bath-mapping`, {
160
+ new aws_apigateway_1.BasePathMapping(this, `${this.id}-base-bath-mapping`, {
184
161
  domainName: this.graphQLApiDomain,
185
162
  restApi: this.graphQLApi,
186
163
  stage: this.graphQLApi.deploymentStage,
@@ -1,5 +1,5 @@
1
- import * as ec2 from 'aws-cdk-lib/aws-ec2';
2
- import * as elasticache from 'aws-cdk-lib/aws-elasticache';
1
+ import { ISecurityGroup, IVpc } from 'aws-cdk-lib/aws-ec2';
2
+ import { CfnReplicationGroup } from 'aws-cdk-lib/aws-elasticache';
3
3
  import { Construct } from 'constructs';
4
4
  import { GraphQLApiLambda } from '..';
5
5
  import { GraphQlApiLambdaWithCacheProps } from './types';
@@ -24,9 +24,9 @@ import { GraphQlApiLambdaWithCacheProps } from './types';
24
24
  export declare class GraphQLApiLambdaWithCache extends GraphQLApiLambda {
25
25
  props: GraphQlApiLambdaWithCacheProps;
26
26
  id: string;
27
- graphQLVpc: ec2.IVpc;
28
- graphQLElastiCache: elasticache.CfnReplicationGroup;
29
- graphQLSecurityGroup: ec2.ISecurityGroup;
27
+ graphQLVpc: IVpc;
28
+ graphQLElastiCache: CfnReplicationGroup;
29
+ graphQLSecurityGroup: ISecurityGroup;
30
30
  securityGroupExportName: string;
31
31
  constructor(parent: Construct, id: string, props: GraphQlApiLambdaWithCacheProps);
32
32
  protected initResources(): void;
@@ -24,9 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.GraphQLApiLambdaWithCache = void 0;
27
- const cdk = __importStar(require("aws-cdk-lib"));
28
- const ec2 = __importStar(require("aws-cdk-lib/aws-ec2"));
29
- const iam = __importStar(require("aws-cdk-lib/aws-iam"));
27
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
28
+ const aws_ec2_1 = require("aws-cdk-lib/aws-ec2");
29
+ const aws_iam_1 = require("aws-cdk-lib/aws-iam");
30
30
  const __1 = require("..");
31
31
  const utils = __importStar(require("../../utils"));
32
32
  /**
@@ -83,14 +83,14 @@ class GraphQLApiLambdaWithCache extends __1.GraphQLApiLambda {
83
83
  */
84
84
  setSecurityGroup() {
85
85
  if (this.props.securityGroupExportName) {
86
- this.graphQLSecurityGroup = ec2.SecurityGroup.fromSecurityGroupId(this, `${this.id}`, cdk.Fn.importValue(this.props.securityGroupExportName));
86
+ this.graphQLSecurityGroup = aws_ec2_1.SecurityGroup.fromSecurityGroupId(this, `${this.id}`, aws_cdk_lib_1.Fn.importValue(this.props.securityGroupExportName));
87
87
  }
88
88
  else {
89
- this.graphQLSecurityGroup = new ec2.SecurityGroup(this, `${this.id}-security-group-${this.props.stage}`, {
89
+ this.graphQLSecurityGroup = new aws_ec2_1.SecurityGroup(this, `${this.id}-security-group-${this.props.stage}`, {
90
90
  securityGroupName: `${this.id}-security-group-${this.props.stage}`,
91
91
  vpc: this.graphQLVpc,
92
92
  });
93
- this.graphQLSecurityGroup.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.allTraffic(), 'All Traffic');
93
+ this.graphQLSecurityGroup.addIngressRule(aws_ec2_1.Peer.anyIpv4(), aws_ec2_1.Port.allTraffic(), 'All Traffic');
94
94
  utils.createCfnOutput(`${this.id}-security-group-id`, this, this.graphQLSecurityGroup.securityGroupId);
95
95
  }
96
96
  }
@@ -105,7 +105,7 @@ class GraphQLApiLambdaWithCache extends __1.GraphQLApiLambda {
105
105
  */
106
106
  createLambdaRole() {
107
107
  super.createLambdaRole();
108
- this.graphQLApiLambdaRole.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSLambdaVPCAccessExecutionRole'));
108
+ this.graphQLApiLambdaRole.addManagedPolicy(aws_iam_1.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSLambdaVPCAccessExecutionRole'));
109
109
  }
110
110
  /**
111
111
  * @summary Method to create environment variables for GraphQL Lambda function
@@ -1,8 +1,8 @@
1
- import * as ec2 from 'aws-cdk-lib/aws-ec2';
2
- import * as efs from 'aws-cdk-lib/aws-efs';
3
- import * as iam from 'aws-cdk-lib/aws-iam';
4
- import * as lambda from 'aws-cdk-lib/aws-lambda';
5
- import * as secretsManager from 'aws-cdk-lib/aws-secretsmanager';
1
+ import { ISecurityGroup, IVpc, SubnetSelection } from 'aws-cdk-lib/aws-ec2';
2
+ import { IAccessPoint } from 'aws-cdk-lib/aws-efs';
3
+ import { CfnAccessKey, PolicyDocument, Role, User } from 'aws-cdk-lib/aws-iam';
4
+ import { IFunction, ILayerVersion } from 'aws-cdk-lib/aws-lambda';
5
+ import { Secret } from 'aws-cdk-lib/aws-secretsmanager';
6
6
  import { Construct } from 'constructs';
7
7
  import { CommonConstruct } from '../../common';
8
8
  import { LambdaWithIamAccessEnvironment, LambdaWithIamAccessProps } from './types';
@@ -24,19 +24,19 @@ import { LambdaWithIamAccessEnvironment, LambdaWithIamAccessProps } from './type
24
24
  export declare class LambdaWithIamAccess extends CommonConstruct {
25
25
  props: LambdaWithIamAccessProps;
26
26
  id: string;
27
- lambdaPolicy: iam.PolicyDocument;
28
- lambdaRole: iam.Role;
27
+ lambdaPolicy: PolicyDocument;
28
+ lambdaRole: Role;
29
29
  lambdaEnvironment: LambdaWithIamAccessEnvironment;
30
- lambdaLayers: lambda.ILayerVersion[];
31
- lambdaFunction: lambda.Function;
32
- lambdaIamUser: iam.User;
33
- lambdaUserAccessKey: iam.CfnAccessKey;
34
- lambdaUserAccessSecret: secretsManager.Secret;
35
- lambdaVpc: ec2.IVpc;
36
- lambdaSecurityGroups: ec2.ISecurityGroup[];
37
- lambdaAccessPoint: efs.IAccessPoint;
30
+ lambdaLayers: ILayerVersion[];
31
+ lambdaFunction: IFunction;
32
+ lambdaIamUser: User;
33
+ lambdaUserAccessKey: CfnAccessKey;
34
+ lambdaUserAccessSecret: Secret;
35
+ lambdaVpc: IVpc;
36
+ lambdaSecurityGroups: ISecurityGroup[];
37
+ lambdaAccessPoint: IAccessPoint;
38
38
  lambdaMountPath: string;
39
- lambdaVpcSubnets: ec2.SubnetSelection;
39
+ lambdaVpcSubnets: SubnetSelection;
40
40
  constructor(parent: Construct, id: string, props: LambdaWithIamAccessProps);
41
41
  /**
42
42
  * @summary Initialise and provision resources
@@ -1,31 +1,8 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.LambdaWithIamAccess = void 0;
27
- const iam = __importStar(require("aws-cdk-lib/aws-iam"));
28
- const secretsManager = __importStar(require("aws-cdk-lib/aws-secretsmanager"));
4
+ const aws_iam_1 = require("aws-cdk-lib/aws-iam");
5
+ const aws_secretsmanager_1 = require("aws-cdk-lib/aws-secretsmanager");
29
6
  const common_1 = require("../../common");
30
7
  /**
31
8
  * @classdesc Provides a construct to create a lambda function with IAM access
@@ -91,7 +68,7 @@ class LambdaWithIamAccess extends common_1.CommonConstruct {
91
68
  * @summary Method to create iam policy for Lambda function
92
69
  */
93
70
  createLambdaPolicy() {
94
- this.lambdaPolicy = new iam.PolicyDocument({
71
+ this.lambdaPolicy = new aws_iam_1.PolicyDocument({
95
72
  statements: [this.iamManager.statementForCreateAnyLogStream()],
96
73
  });
97
74
  }
@@ -133,20 +110,20 @@ class LambdaWithIamAccess extends common_1.CommonConstruct {
133
110
  * @summary Method to create iam user for the lambda function
134
111
  */
135
112
  createIamUserForLambdaFunction() {
136
- this.lambdaIamUser = new iam.User(this, `${this.id}-lambda-user`, {
113
+ this.lambdaIamUser = new aws_iam_1.User(this, `${this.id}-lambda-user`, {
137
114
  userName: `${this.id}-user-${this.props.stage}`,
138
115
  });
139
- new iam.Policy(this, `${this.id}-lambda-user-policy`, {
116
+ new aws_iam_1.Policy(this, `${this.id}-lambda-user-policy`, {
140
117
  policyName: `${this.id}-policy-${this.props.stage}`,
141
118
  statements: [
142
- new iam.PolicyStatement({
119
+ new aws_iam_1.PolicyStatement({
143
120
  actions: ['lambda:InvokeFunction'],
144
121
  resources: [this.lambdaFunction.functionArn],
145
122
  }),
146
123
  ],
147
124
  users: [this.lambdaIamUser],
148
125
  });
149
- this.lambdaUserAccessKey = new iam.CfnAccessKey(this, `${this.id}-access-key-${this.props.stage}`, {
126
+ this.lambdaUserAccessKey = new aws_iam_1.CfnAccessKey(this, `${this.id}-access-key-${this.props.stage}`, {
150
127
  userName: this.lambdaIamUser.userName,
151
128
  });
152
129
  }
@@ -154,7 +131,7 @@ class LambdaWithIamAccess extends common_1.CommonConstruct {
154
131
  * @summary Method to create iam secret for the lambda function
155
132
  */
156
133
  createIamSecretForLambdaFunction() {
157
- this.lambdaUserAccessSecret = new secretsManager.Secret(this, `${this.id}-lambda-user-secret-${this.props.stage}`, this.props.lambdaSecret);
134
+ this.lambdaUserAccessSecret = new aws_secretsmanager_1.Secret(this, `${this.id}-lambda-user-secret-${this.props.stage}`, this.props.lambdaSecret);
158
135
  const cfnSecret = this.lambdaUserAccessSecret.node.defaultChild;
159
136
  cfnSecret.generateSecretString = undefined;
160
137
  cfnSecret.secretString = `{ "ACCESS_KEY_ID": "${this.lambdaUserAccessKey.ref}", "ACCESS_KEY_SECRET": "${this.lambdaUserAccessKey.attrSecretAccessKey}" }`;
@@ -1,13 +1,13 @@
1
- import * as lambda from 'aws-cdk-lib/aws-lambda';
1
+ import { AssetCode } from 'aws-cdk-lib/aws-lambda';
2
2
  import { SecretProps } from 'aws-cdk-lib/aws-secretsmanager';
3
- import { LambdaEnvironment, LambdaProps } from '../../services';
4
3
  import { CommonStackProps } from '../../common';
4
+ import { LambdaEnvironment, LambdaProps } from '../../services';
5
5
  export interface LambdaWithIamAccessProps extends CommonStackProps {
6
6
  lambda: LambdaProps;
7
7
  lambdaHandler?: string;
8
- lambdaLayerSources: lambda.AssetCode[];
8
+ lambdaLayerSources: AssetCode[];
9
9
  lambdaSecret: SecretProps;
10
- lambdaSource: lambda.AssetCode;
10
+ lambdaSource: AssetCode;
11
11
  logLevel: string;
12
12
  nodeEnv: string;
13
13
  timezone: string;
@@ -1,9 +1,9 @@
1
- import * as apig from 'aws-cdk-lib/aws-apigateway';
2
- import * as acm from 'aws-cdk-lib/aws-certificatemanager';
3
- import * as iam from 'aws-cdk-lib/aws-iam';
4
- import * as lambda from 'aws-cdk-lib/aws-lambda';
5
- import * as route53 from 'aws-cdk-lib/aws-route53';
6
- import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
1
+ import { BasePathMapping, DomainName, RestApi } from 'aws-cdk-lib/aws-apigateway';
2
+ import { ICertificate } from 'aws-cdk-lib/aws-certificatemanager';
3
+ import { PolicyDocument, Role } from 'aws-cdk-lib/aws-iam';
4
+ import { IFunction, ILayerVersion } from 'aws-cdk-lib/aws-lambda';
5
+ import { IHostedZone } from 'aws-cdk-lib/aws-route53';
6
+ import { ISecret } from 'aws-cdk-lib/aws-secretsmanager';
7
7
  import { Construct } from 'constructs';
8
8
  import { CommonConstruct } from '../../common';
9
9
  import { RestApiLambdaEnvironment, RestApiLambdaProps } from './types';
@@ -27,17 +27,17 @@ import { RestApiLambdaEnvironment, RestApiLambdaProps } from './types';
27
27
  export declare abstract class RestApiLambda extends CommonConstruct {
28
28
  props: RestApiLambdaProps;
29
29
  id: string;
30
- applicationSecrets: secretsmanager.ISecret[];
31
- restApiLambdaPolicy: iam.PolicyDocument;
32
- restApiLambdaRole: iam.Role;
30
+ applicationSecrets: ISecret[];
31
+ restApiLambdaPolicy: PolicyDocument;
32
+ restApiLambdaRole: Role;
33
33
  restApiLambdaEnvironment: RestApiLambdaEnvironment;
34
- restApiLambdaLayers: lambda.ILayerVersion[];
35
- restApiLambdaFunction: lambda.Function;
36
- restApi: apig.RestApi;
37
- restApiHostedZone: route53.IHostedZone;
38
- restApiCertificate: acm.ICertificate;
39
- restApiDomain: apig.DomainName;
40
- restApiBasePathMappings: apig.BasePathMapping[];
34
+ restApiLambdaLayers: ILayerVersion[];
35
+ restApiLambdaFunction: IFunction;
36
+ restApi: RestApi;
37
+ restApiHostedZone: IHostedZone;
38
+ restApiCertificate: ICertificate;
39
+ restApiDomain: DomainName;
40
+ restApiBasePathMappings: BasePathMapping[];
41
41
  protected constructor(parent: Construct, id: string, props: RestApiLambdaProps);
42
42
  /**
43
43
  * @summary Initialise and provision resources