@gradientedge/cdk-utils 8.118.0 → 8.120.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 (309) 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 → api-gateway}/main.d.ts +10 -10
  37. package/dist/src/lib/services/{aws/api-gateway → api-gateway}/main.js +21 -44
  38. package/dist/src/lib/services/api-gateway/types.d.ts +7 -0
  39. package/dist/src/lib/services/{aws/appconfig → appconfig}/main.d.ts +7 -7
  40. package/dist/src/lib/services/{aws/appconfig → appconfig}/main.js +14 -37
  41. package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/main.d.ts +5 -5
  42. package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/main.js +10 -33
  43. package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/types.d.ts +2 -2
  44. package/dist/src/lib/services/{aws/cloudfront → cloudfront}/main.d.ts +19 -19
  45. package/dist/src/lib/services/{aws/cloudfront → cloudfront}/main.js +47 -46
  46. package/dist/src/lib/services/{aws/cloudfront → cloudfront}/types.d.ts +3 -4
  47. package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/main.d.ts +6 -6
  48. package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/main.js +5 -28
  49. package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.d.ts +1 -1
  50. package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.js +1 -1
  51. package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/main.d.ts +1 -1
  52. package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/main.js +1 -1
  53. package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/types.d.ts +1 -1
  54. package/dist/src/lib/services/{aws/codebuild → codebuild}/main.d.ts +4 -4
  55. package/dist/src/lib/services/{aws/codebuild → codebuild}/main.js +7 -30
  56. package/dist/src/lib/services/{aws/dynamodb → dynamodb}/main.d.ts +4 -4
  57. package/dist/src/lib/services/{aws/dynamodb → dynamodb}/main.js +8 -31
  58. package/dist/src/lib/services/{aws/dynamodb → dynamodb}/types.d.ts +1 -1
  59. package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/main.d.ts +3 -3
  60. package/dist/src/lib/services/elastic-container-registry/main.js +37 -0
  61. package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.d.ts +11 -11
  62. package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.js +27 -50
  63. package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.d.ts +4 -4
  64. package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.d.ts +4 -4
  65. package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.js +12 -35
  66. package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.d.ts +5 -5
  67. package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.js +8 -31
  68. package/dist/src/lib/services/{aws/elasticache → elasticache}/main.d.ts +5 -5
  69. package/dist/src/lib/services/{aws/elasticache → elasticache}/main.js +10 -33
  70. package/dist/src/lib/services/{aws/eventbridge → eventbridge}/main.d.ts +14 -14
  71. package/dist/src/lib/services/{aws/eventbridge → eventbridge}/main.js +26 -49
  72. package/dist/src/lib/services/{aws/eventbridge → eventbridge}/target.d.ts +11 -11
  73. package/dist/src/lib/services/{aws/eventbridge → eventbridge}/target.js +6 -29
  74. package/dist/src/lib/services/{aws/eventbridge → eventbridge}/types.d.ts +1 -1
  75. package/dist/src/lib/services/{aws/evidently → evidently}/main.d.ts +8 -8
  76. package/dist/src/lib/services/{aws/evidently → evidently}/main.js +18 -41
  77. package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/main.d.ts +49 -50
  78. package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/main.js +110 -133
  79. package/dist/src/lib/services/index.d.ts +28 -1
  80. package/dist/src/lib/services/index.js +28 -1
  81. package/dist/src/lib/services/{aws/key-management-service → key-management-service}/main.d.ts +3 -3
  82. package/dist/src/lib/services/{aws/key-management-service → key-management-service}/main.js +5 -28
  83. package/dist/src/lib/services/{aws/lambda → lambda}/main.d.ts +12 -14
  84. package/dist/src/lib/services/{aws/lambda → lambda}/main.js +32 -59
  85. package/dist/src/lib/services/{aws/lambda → lambda}/types.d.ts +1 -1
  86. package/dist/src/lib/services/{aws/route53 → route53}/main.d.ts +10 -10
  87. package/dist/src/lib/services/{aws/route53 → route53}/main.js +21 -44
  88. package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/main.d.ts +6 -7
  89. package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/main.js +10 -33
  90. package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.d.ts +5 -5
  91. package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.js +11 -34
  92. package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.d.ts +7 -8
  93. package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.js +15 -38
  94. package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.d.ts +1 -1
  95. package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.d.ts +10 -11
  96. package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.js +31 -54
  97. package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.d.ts +1 -1
  98. package/dist/src/lib/services/{aws/step-function → step-function}/main.d.ts +32 -33
  99. package/dist/src/lib/services/{aws/step-function → step-function}/main.js +33 -57
  100. package/dist/src/lib/services/{aws/systems-manager → systems-manager}/main.d.ts +5 -5
  101. package/dist/src/lib/services/{aws/systems-manager → systems-manager}/main.js +10 -33
  102. package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/main.d.ts +6 -7
  103. package/dist/src/lib/services/virtual-private-cloud/main.js +70 -0
  104. package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.d.ts +4 -4
  105. package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.js +8 -31
  106. package/dist/src/lib/utils/aws/index.d.ts +6 -3
  107. package/dist/src/lib/utils/aws/index.js +9 -26
  108. package/package.json +15 -15
  109. package/src/lib/common/construct.ts +97 -67
  110. package/src/lib/common/stack.ts +12 -12
  111. package/src/lib/common/types.ts +2 -2
  112. package/src/lib/construct/api-to-eventbridge-target/api.ts +31 -22
  113. package/src/lib/construct/api-to-eventbridge-target/event.ts +9 -9
  114. package/src/lib/construct/api-to-eventbridge-target/main.ts +56 -41
  115. package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +9 -9
  116. package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +62 -47
  117. package/src/lib/construct/api-to-lambda-target/api.ts +33 -23
  118. package/src/lib/construct/api-to-lambda-target/main.ts +24 -18
  119. package/src/lib/construct/application-configuration/main.ts +31 -24
  120. package/src/lib/construct/graphql-api-lambda/main.ts +22 -22
  121. package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +13 -13
  122. package/src/lib/construct/lambda-with-iam-access/main.ts +25 -25
  123. package/src/lib/construct/lambda-with-iam-access/types.ts +4 -4
  124. package/src/lib/construct/rest-api-lambda/main.ts +21 -21
  125. package/src/lib/construct/rest-api-lambda-with-cache/main.ts +14 -14
  126. package/src/lib/construct/site-with-ecs-backend/main.ts +79 -60
  127. package/src/lib/construct/static-asset-deployment/main.ts +6 -6
  128. package/src/lib/construct/static-site/main.ts +23 -17
  129. package/src/lib/services/{aws/api-gateway → api-gateway}/main.ts +42 -36
  130. package/src/lib/services/api-gateway/types.ts +8 -0
  131. package/src/lib/services/{aws/appconfig → appconfig}/main.ts +19 -19
  132. package/src/lib/services/{aws/certificate-manager → certificate-manager}/main.ts +14 -14
  133. package/src/lib/services/{aws/certificate-manager → certificate-manager}/types.ts +2 -2
  134. package/src/lib/services/{aws/cloudfront → cloudfront}/main.ts +89 -75
  135. package/src/lib/services/{aws/cloudfront → cloudfront}/types.ts +7 -4
  136. package/src/lib/services/{aws/cloudtrail → cloudtrail}/main.ts +12 -12
  137. package/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.ts +2 -2
  138. package/src/lib/services/{aws/cloudwatch → cloudwatch}/main.ts +2 -2
  139. package/src/lib/services/{aws/cloudwatch → cloudwatch}/types.ts +1 -1
  140. package/src/lib/services/{aws/codebuild → codebuild}/main.ts +8 -8
  141. package/src/lib/services/{aws/dynamodb → dynamodb}/main.ts +9 -9
  142. package/src/lib/services/{aws/dynamodb → dynamodb}/types.ts +1 -1
  143. package/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/main.ts +5 -5
  144. package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.ts +49 -38
  145. package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.ts +4 -4
  146. package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.ts +17 -17
  147. package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.ts +12 -12
  148. package/src/lib/services/{aws/elasticache → elasticache}/main.ts +11 -11
  149. package/src/lib/services/{aws/eventbridge → eventbridge}/main.ts +38 -38
  150. package/src/lib/services/{aws/eventbridge → eventbridge}/target.ts +15 -15
  151. package/src/lib/services/{aws/eventbridge → eventbridge}/types.ts +1 -1
  152. package/src/lib/services/{aws/evidently → evidently}/main.ts +19 -19
  153. package/src/lib/services/{aws/identity-access-management → identity-access-management}/main.ts +143 -135
  154. package/src/lib/services/index.ts +28 -1
  155. package/src/lib/services/{aws/key-management-service → key-management-service}/main.ts +6 -6
  156. package/src/lib/services/{aws/lambda → lambda}/main.ts +66 -60
  157. package/src/lib/services/{aws/lambda → lambda}/types.ts +1 -1
  158. package/src/lib/services/{aws/route53 → route53}/main.ts +32 -32
  159. package/src/lib/services/{aws/secrets-manager → secrets-manager}/main.ts +12 -16
  160. package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.ts +14 -14
  161. package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.ts +19 -19
  162. package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.ts +1 -1
  163. package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.ts +40 -40
  164. package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.ts +1 -1
  165. package/src/lib/services/{aws/step-function → step-function}/main.ts +78 -66
  166. package/src/lib/services/{aws/systems-manager → systems-manager}/main.ts +18 -13
  167. package/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/main.ts +17 -17
  168. package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.ts +9 -9
  169. package/src/lib/utils/aws/index.ts +8 -5
  170. package/dist/src/lib/services/aws/api-gateway/types.d.ts +0 -7
  171. package/dist/src/lib/services/aws/elastic-container-registry/main.js +0 -60
  172. package/dist/src/lib/services/aws/index.d.ts +0 -28
  173. package/dist/src/lib/services/aws/index.js +0 -44
  174. package/dist/src/lib/services/aws/virtual-private-cloud/main.js +0 -93
  175. package/src/lib/services/aws/api-gateway/types.ts +0 -8
  176. package/src/lib/services/aws/index.ts +0 -28
  177. /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/index.d.ts +0 -0
  178. /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/index.js +0 -0
  179. /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/types.js +0 -0
  180. /package/dist/src/lib/services/{aws/appconfig → appconfig}/constants.d.ts +0 -0
  181. /package/dist/src/lib/services/{aws/appconfig → appconfig}/constants.js +0 -0
  182. /package/dist/src/lib/services/{aws/appconfig → appconfig}/index.d.ts +0 -0
  183. /package/dist/src/lib/services/{aws/appconfig → appconfig}/index.js +0 -0
  184. /package/dist/src/lib/services/{aws/appconfig → appconfig}/types.d.ts +0 -0
  185. /package/dist/src/lib/services/{aws/appconfig → appconfig}/types.js +0 -0
  186. /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/index.d.ts +0 -0
  187. /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/index.js +0 -0
  188. /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/types.js +0 -0
  189. /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/index.d.ts +0 -0
  190. /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/index.js +0 -0
  191. /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/types.js +0 -0
  192. /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/index.d.ts +0 -0
  193. /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/index.js +0 -0
  194. /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/types.d.ts +0 -0
  195. /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/types.js +0 -0
  196. /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/index.d.ts +0 -0
  197. /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/index.js +0 -0
  198. /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/types.js +0 -0
  199. /package/dist/src/lib/services/{aws/codebuild → codebuild}/index.d.ts +0 -0
  200. /package/dist/src/lib/services/{aws/codebuild → codebuild}/index.js +0 -0
  201. /package/dist/src/lib/services/{aws/constants.d.ts → constants.d.ts} +0 -0
  202. /package/dist/src/lib/services/{aws/constants.js → constants.js} +0 -0
  203. /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/index.d.ts +0 -0
  204. /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/index.js +0 -0
  205. /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/types.js +0 -0
  206. /package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.d.ts +0 -0
  207. /package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.js +0 -0
  208. /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.d.ts +0 -0
  209. /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.js +0 -0
  210. /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.js +0 -0
  211. /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.d.ts +0 -0
  212. /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.js +0 -0
  213. /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.d.ts +0 -0
  214. /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.js +0 -0
  215. /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.d.ts +0 -0
  216. /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.js +0 -0
  217. /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.d.ts +0 -0
  218. /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.js +0 -0
  219. /package/dist/src/lib/services/{aws/elasticache → elasticache}/index.d.ts +0 -0
  220. /package/dist/src/lib/services/{aws/elasticache → elasticache}/index.js +0 -0
  221. /package/dist/src/lib/services/{aws/elasticache → elasticache}/types.d.ts +0 -0
  222. /package/dist/src/lib/services/{aws/elasticache → elasticache}/types.js +0 -0
  223. /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/index.d.ts +0 -0
  224. /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/index.js +0 -0
  225. /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/types.js +0 -0
  226. /package/dist/src/lib/services/{aws/evidently → evidently}/index.d.ts +0 -0
  227. /package/dist/src/lib/services/{aws/evidently → evidently}/index.js +0 -0
  228. /package/dist/src/lib/services/{aws/evidently → evidently}/types.d.ts +0 -0
  229. /package/dist/src/lib/services/{aws/evidently → evidently}/types.js +0 -0
  230. /package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/index.d.ts +0 -0
  231. /package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/index.js +0 -0
  232. /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/index.d.ts +0 -0
  233. /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/index.js +0 -0
  234. /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/types.d.ts +0 -0
  235. /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/types.js +0 -0
  236. /package/dist/src/lib/services/{aws/lambda → lambda}/index.d.ts +0 -0
  237. /package/dist/src/lib/services/{aws/lambda → lambda}/index.js +0 -0
  238. /package/dist/src/lib/services/{aws/lambda → lambda}/types.js +0 -0
  239. /package/dist/src/lib/services/{aws/route53 → route53}/index.d.ts +0 -0
  240. /package/dist/src/lib/services/{aws/route53 → route53}/index.js +0 -0
  241. /package/dist/src/lib/services/{aws/route53 → route53}/types.d.ts +0 -0
  242. /package/dist/src/lib/services/{aws/route53 → route53}/types.js +0 -0
  243. /package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/index.d.ts +0 -0
  244. /package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/index.js +0 -0
  245. /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.d.ts +0 -0
  246. /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.js +0 -0
  247. /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.d.ts +0 -0
  248. /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.js +0 -0
  249. /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.d.ts +0 -0
  250. /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.js +0 -0
  251. /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.js +0 -0
  252. /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.d.ts +0 -0
  253. /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.js +0 -0
  254. /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.js +0 -0
  255. /package/dist/src/lib/services/{aws/step-function → step-function}/index.d.ts +0 -0
  256. /package/dist/src/lib/services/{aws/step-function → step-function}/index.js +0 -0
  257. /package/dist/src/lib/services/{aws/step-function → step-function}/types.d.ts +0 -0
  258. /package/dist/src/lib/services/{aws/step-function → step-function}/types.js +0 -0
  259. /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/index.d.ts +0 -0
  260. /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/index.js +0 -0
  261. /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/types.d.ts +0 -0
  262. /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/types.js +0 -0
  263. /package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.d.ts +0 -0
  264. /package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.js +0 -0
  265. /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.d.ts +0 -0
  266. /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.js +0 -0
  267. /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.d.ts +0 -0
  268. /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.js +0 -0
  269. /package/src/lib/services/{aws/api-gateway → api-gateway}/index.ts +0 -0
  270. /package/src/lib/services/{aws/appconfig → appconfig}/constants.ts +0 -0
  271. /package/src/lib/services/{aws/appconfig → appconfig}/index.ts +0 -0
  272. /package/src/lib/services/{aws/appconfig → appconfig}/types.ts +0 -0
  273. /package/src/lib/services/{aws/certificate-manager → certificate-manager}/index.ts +0 -0
  274. /package/src/lib/services/{aws/cloudfront → cloudfront}/index.ts +0 -0
  275. /package/src/lib/services/{aws/cloudtrail → cloudtrail}/index.ts +0 -0
  276. /package/src/lib/services/{aws/cloudtrail → cloudtrail}/types.ts +0 -0
  277. /package/src/lib/services/{aws/cloudwatch → cloudwatch}/index.ts +0 -0
  278. /package/src/lib/services/{aws/codebuild → codebuild}/index.ts +0 -0
  279. /package/src/lib/services/{aws/constants.ts → constants.ts} +0 -0
  280. /package/src/lib/services/{aws/dynamodb → dynamodb}/index.ts +0 -0
  281. /package/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.ts +0 -0
  282. /package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.ts +0 -0
  283. /package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.ts +0 -0
  284. /package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.ts +0 -0
  285. /package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.ts +0 -0
  286. /package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.ts +0 -0
  287. /package/src/lib/services/{aws/elasticache → elasticache}/index.ts +0 -0
  288. /package/src/lib/services/{aws/elasticache → elasticache}/types.ts +0 -0
  289. /package/src/lib/services/{aws/eventbridge → eventbridge}/index.ts +0 -0
  290. /package/src/lib/services/{aws/evidently → evidently}/index.ts +0 -0
  291. /package/src/lib/services/{aws/evidently → evidently}/types.ts +0 -0
  292. /package/src/lib/services/{aws/identity-access-management → identity-access-management}/index.ts +0 -0
  293. /package/src/lib/services/{aws/key-management-service → key-management-service}/index.ts +0 -0
  294. /package/src/lib/services/{aws/key-management-service → key-management-service}/types.ts +0 -0
  295. /package/src/lib/services/{aws/lambda → lambda}/index.ts +0 -0
  296. /package/src/lib/services/{aws/route53 → route53}/index.ts +0 -0
  297. /package/src/lib/services/{aws/route53 → route53}/types.ts +0 -0
  298. /package/src/lib/services/{aws/secrets-manager → secrets-manager}/index.ts +0 -0
  299. /package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.ts +0 -0
  300. /package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.ts +0 -0
  301. /package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.ts +0 -0
  302. /package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.ts +0 -0
  303. /package/src/lib/services/{aws/step-function → step-function}/index.ts +0 -0
  304. /package/src/lib/services/{aws/step-function → step-function}/types.ts +0 -0
  305. /package/src/lib/services/{aws/systems-manager → systems-manager}/index.ts +0 -0
  306. /package/src/lib/services/{aws/systems-manager → systems-manager}/types.ts +0 -0
  307. /package/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.ts +0 -0
  308. /package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.ts +0 -0
  309. /package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.ts +0 -0
@@ -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.SecretsManager = void 0;
27
4
  const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
28
- const cdk = __importStar(require("aws-cdk-lib"));
29
- const secretsManager = __importStar(require("aws-cdk-lib/aws-secretsmanager"));
30
- const utils = __importStar(require("../../../utils"));
5
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
6
+ const aws_secretsmanager_1 = require("aws-cdk-lib/aws-secretsmanager");
7
+ const utils_1 = require("../../utils");
31
8
  /**
32
9
  * @classdesc Provides operations on AWS Secrets Manager.
33
10
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
@@ -36,10 +13,10 @@ const utils = __importStar(require("../../../utils"));
36
13
  * import { CommonConstruct } from '@gradientedge/cdk-utils'
37
14
  *
38
15
  * class CustomConstruct extends CommonConstruct {
39
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
16
+ * constructor(parent: Construct, id: string, props: common.CommonStackProps) {
40
17
  * super(parent, id, props)
41
18
  * this.props = props
42
- * this.secretsManager.loadSecret('MySecretName', 'eu-west-1')
19
+ * this.loadSecret('MySecretName', 'eu-west-1')
43
20
  * }
44
21
  * }
45
22
  * @see [CDK Secrets Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager-readme.html}
@@ -52,12 +29,12 @@ class SecretsManager {
52
29
  * @param props the secret properties
53
30
  */
54
31
  createSecret(id, scope, props) {
55
- const secret = new secretsManager.Secret(scope, `${id}`, {
32
+ const secret = new aws_secretsmanager_1.Secret(scope, `${id}`, {
56
33
  ...props,
57
34
  secretName: `${props.secretName}-${scope.props.stage}`,
58
35
  });
59
- utils.createCfnOutput(`${id}-secretName`, scope, secret.secretName);
60
- utils.createCfnOutput(`${id}-secretArn`, scope, secret.secretArn);
36
+ (0, utils_1.createCfnOutput)(`${id}-secretName`, scope, secret.secretName);
37
+ (0, utils_1.createCfnOutput)(`${id}-secretArn`, scope, secret.secretArn);
61
38
  return secret;
62
39
  }
63
40
  /**
@@ -68,7 +45,7 @@ class SecretsManager {
68
45
  * @param exportName
69
46
  */
70
47
  retrieveSecretFromSecretsManager(id, scope, stackName, exportName) {
71
- return secretsManager.Secret.fromSecretNameV2(scope, `${id}`, cdk.Fn.importValue(`${stackName}-${scope.props.stage}-${exportName}`));
48
+ return aws_secretsmanager_1.Secret.fromSecretNameV2(scope, `${id}`, aws_cdk_lib_1.Fn.importValue(`${stackName}-${scope.props.stage}-${exportName}`));
72
49
  }
73
50
  /**
74
51
  * @summary Method to resolve secret value from a secret using AWS SDK
@@ -78,7 +55,7 @@ class SecretsManager {
78
55
  */
79
56
  async resolveSecretValue(region, secretId, secretKey) {
80
57
  const client = new client_secrets_manager_1.SecretsManagerClient({
81
- credentials: utils.determineCredentials(),
58
+ credentials: (0, utils_1.determineCredentials)(),
82
59
  region: region,
83
60
  });
84
61
  const command = new client_secrets_manager_1.GetSecretValueCommand({
@@ -1,6 +1,6 @@
1
- import * as lambda from 'aws-cdk-lib/aws-lambda';
2
- import * as sns from 'aws-cdk-lib/aws-sns';
3
- import { CommonConstruct } from '../../../common';
1
+ import { IFunction } from 'aws-cdk-lib/aws-lambda';
2
+ import { Topic } from 'aws-cdk-lib/aws-sns';
3
+ import { CommonConstruct } from '../../common';
4
4
  import { SubscriptionProps } from './types';
5
5
  /**
6
6
  * @classdesc Provides operations on AWS Simple Notification Service.
@@ -26,7 +26,7 @@ export declare class SnsManager {
26
26
  * @param props
27
27
  * @param emails
28
28
  */
29
- createEmailNotificationService(id: string, scope: CommonConstruct, props: SubscriptionProps, emails: string[]): sns.Topic;
29
+ createEmailNotificationService(id: string, scope: CommonConstruct, props: SubscriptionProps, emails: string[]): Topic;
30
30
  /**
31
31
  * @summary Method to create a lambda notification service
32
32
  * @param id scoped id of the resource
@@ -34,5 +34,5 @@ export declare class SnsManager {
34
34
  * @param props
35
35
  * @param lambdaFunction
36
36
  */
37
- createLambdaNotificationService(id: string, scope: CommonConstruct, props: SubscriptionProps, lambdaFunction: lambda.IFunction): sns.Topic;
37
+ createLambdaNotificationService(id: string, scope: CommonConstruct, props: SubscriptionProps, lambdaFunction: IFunction): Topic;
38
38
  }
@@ -1,32 +1,9 @@
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.SnsManager = void 0;
27
- const sns = __importStar(require("aws-cdk-lib/aws-sns"));
28
- const subs = __importStar(require("aws-cdk-lib/aws-sns-subscriptions"));
29
- const utils = __importStar(require("../../../utils"));
4
+ const aws_sns_1 = require("aws-cdk-lib/aws-sns");
5
+ const aws_sns_subscriptions_1 = require("aws-cdk-lib/aws-sns-subscriptions");
6
+ const utils_1 = require("../../utils");
30
7
  /**
31
8
  * @classdesc Provides operations on AWS Simple Notification Service.
32
9
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
@@ -54,16 +31,16 @@ class SnsManager {
54
31
  createEmailNotificationService(id, scope, props, emails) {
55
32
  if (!props)
56
33
  throw `Subscription props undefined for ${id}`;
57
- const topic = new sns.Topic(scope, id, {
34
+ const topic = new aws_sns_1.Topic(scope, id, {
58
35
  displayName: `${props.topicName}-${scope.props.stage}`,
59
36
  fifo: props.fifo,
60
37
  topicName: `${props.topicName}-${scope.props.stage}`,
61
38
  });
62
39
  if (emails && emails.length > 0) {
63
- emails.forEach((email) => topic.addSubscription(new subs.EmailSubscription(email)));
40
+ emails.forEach((email) => topic.addSubscription(new aws_sns_subscriptions_1.EmailSubscription(email)));
64
41
  }
65
- utils.createCfnOutput(`${id}-subscriptionArn`, scope, topic.topicArn);
66
- utils.createCfnOutput(`${id}-subscriptionName`, scope, topic.topicName);
42
+ (0, utils_1.createCfnOutput)(`${id}-subscriptionArn`, scope, topic.topicArn);
43
+ (0, utils_1.createCfnOutput)(`${id}-subscriptionName`, scope, topic.topicName);
67
44
  return topic;
68
45
  }
69
46
  /**
@@ -76,14 +53,14 @@ class SnsManager {
76
53
  createLambdaNotificationService(id, scope, props, lambdaFunction) {
77
54
  if (!props)
78
55
  throw `Subscription props undefined for ${id}`;
79
- const topic = new sns.Topic(scope, id, {
56
+ const topic = new aws_sns_1.Topic(scope, id, {
80
57
  displayName: `${props.topicName}-${scope.props.stage}`,
81
58
  fifo: props.fifo,
82
59
  topicName: `${props.topicName}-${scope.props.stage}`,
83
60
  });
84
- topic.addSubscription(new subs.LambdaSubscription(lambdaFunction));
85
- utils.createCfnOutput(`${id}-subscriptionArn`, scope, topic.topicArn);
86
- utils.createCfnOutput(`${id}-subscriptionName`, scope, topic.topicName);
61
+ topic.addSubscription(new aws_sns_subscriptions_1.LambdaSubscription(lambdaFunction));
62
+ (0, utils_1.createCfnOutput)(`${id}-subscriptionArn`, scope, topic.topicArn);
63
+ (0, utils_1.createCfnOutput)(`${id}-subscriptionName`, scope, topic.topicName);
87
64
  return topic;
88
65
  }
89
66
  }
@@ -1,8 +1,7 @@
1
- import * as cdk from 'aws-cdk-lib';
2
- import * as sqs from 'aws-cdk-lib/aws-sqs';
3
- import { CommonConstruct } from '../../../common';
4
- import { QueueProps } from './types';
1
+ import { IQueue, Queue } from 'aws-cdk-lib/aws-sqs';
2
+ import { CommonConstruct } from '../../common';
5
3
  import { LambdaProps } from '../lambda';
4
+ import { QueueProps } from './types';
6
5
  /**
7
6
  * @classdesc Provides operations on AWS Simple Queue Service.
8
7
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
@@ -11,7 +10,7 @@ import { LambdaProps } from '../lambda';
11
10
  * import { CommonConstruct } from '@gradientedge/cdk-utils'
12
11
  *
13
12
  * class CustomConstruct extends CommonConstruct {
14
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
13
+ * constructor(parent: Construct, id: string, props: common.CommonStackProps) {
15
14
  * super(parent, id, props)
16
15
  * this.props = props
17
16
  * this.sqsManager.createQueue('MySqs', this, {...})
@@ -27,14 +26,14 @@ export declare class SqsManager {
27
26
  * @param props
28
27
  * @param deadLetterQueue
29
28
  */
30
- createQueue(id: string, scope: CommonConstruct, props: QueueProps, deadLetterQueue?: sqs.IQueue): cdk.aws_sqs.Queue;
29
+ createQueue(id: string, scope: CommonConstruct, props: QueueProps, deadLetterQueue?: IQueue): Queue;
31
30
  /**
32
31
  * @summary Method to create a redrive queue for a lambda function
33
32
  * @param id scoped id of the resource
34
33
  * @param scope scope in which this resource is defined
35
34
  * @param props the lambda properties
36
35
  */
37
- createRedriveQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps): cdk.aws_sqs.Queue;
36
+ createRedriveQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps): Queue;
38
37
  /**
39
38
  * @summary Method to create a dead letter queue for a lambda function
40
39
  * @param id scoped id of the resource
@@ -42,5 +41,5 @@ export declare class SqsManager {
42
41
  * @param props the lambda properties
43
42
  * @param deadLetterQueue
44
43
  */
45
- createDeadLetterQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps, deadLetterQueue: sqs.IQueue): cdk.aws_sqs.Queue;
44
+ createDeadLetterQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps, deadLetterQueue: IQueue): Queue;
46
45
  }
@@ -1,32 +1,9 @@
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.SqsManager = void 0;
27
- const cdk = __importStar(require("aws-cdk-lib"));
28
- const sqs = __importStar(require("aws-cdk-lib/aws-sqs"));
29
- const utils = __importStar(require("../../../utils"));
4
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
5
+ const aws_sqs_1 = require("aws-cdk-lib/aws-sqs");
6
+ const utils_1 = require("../../utils");
30
7
  /**
31
8
  * @classdesc Provides operations on AWS Simple Queue Service.
32
9
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
@@ -35,7 +12,7 @@ const utils = __importStar(require("../../../utils"));
35
12
  * import { CommonConstruct } from '@gradientedge/cdk-utils'
36
13
  *
37
14
  * class CustomConstruct extends CommonConstruct {
38
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
15
+ * constructor(parent: Construct, id: string, props: common.CommonStackProps) {
39
16
  * super(parent, id, props)
40
17
  * this.props = props
41
18
  * this.sqsManager.createQueue('MySqs', this, {...})
@@ -54,9 +31,9 @@ class SqsManager {
54
31
  createQueue(id, scope, props, deadLetterQueue) {
55
32
  if (!props)
56
33
  throw `Queue props undefined for ${id}`;
57
- const queue = new sqs.Queue(scope, id, {
34
+ const queue = new aws_sqs_1.Queue(scope, id, {
58
35
  contentBasedDeduplication: props.contentBasedDeduplication,
59
- dataKeyReuse: props.dataKeyReuseInSecs ? cdk.Duration.seconds(props.dataKeyReuseInSecs) : props.dataKeyReuse,
36
+ dataKeyReuse: props.dataKeyReuseInSecs ? aws_cdk_lib_1.Duration.seconds(props.dataKeyReuseInSecs) : props.dataKeyReuse,
60
37
  deadLetterQueue: !deadLetterQueue
61
38
  ? undefined
62
39
  : {
@@ -64,7 +41,7 @@ class SqsManager {
64
41
  queue: deadLetterQueue,
65
42
  },
66
43
  deduplicationScope: props.deduplicationScope,
67
- deliveryDelay: props.deliveryDelayInSecs ? cdk.Duration.seconds(props.deliveryDelayInSecs) : undefined,
44
+ deliveryDelay: props.deliveryDelayInSecs ? aws_cdk_lib_1.Duration.seconds(props.deliveryDelayInSecs) : undefined,
68
45
  encryption: props.encryption,
69
46
  encryptionMasterKey: props.encryptionMasterKey,
70
47
  fifo: props.fifo,
@@ -72,22 +49,22 @@ class SqsManager {
72
49
  maxMessageSizeBytes: props.maxMessageSizeBytes,
73
50
  queueName: props.queueName,
74
51
  receiveMessageWaitTime: props.receiveMessageWaitTimeInSecs
75
- ? cdk.Duration.seconds(props.receiveMessageWaitTimeInSecs)
52
+ ? aws_cdk_lib_1.Duration.seconds(props.receiveMessageWaitTimeInSecs)
76
53
  : props.receiveMessageWaitTime,
77
- removalPolicy: props.removalPolicy ?? cdk.RemovalPolicy.DESTROY,
78
- retentionPeriod: props.retentionInDays ? cdk.Duration.days(props.retentionInDays) : cdk.Duration.days(7),
54
+ removalPolicy: props.removalPolicy ?? aws_cdk_lib_1.RemovalPolicy.DESTROY,
55
+ retentionPeriod: props.retentionInDays ? aws_cdk_lib_1.Duration.days(props.retentionInDays) : aws_cdk_lib_1.Duration.days(7),
79
56
  visibilityTimeout: props.visibilityTimeoutInSecs
80
- ? cdk.Duration.seconds(props.visibilityTimeoutInSecs)
57
+ ? aws_cdk_lib_1.Duration.seconds(props.visibilityTimeoutInSecs)
81
58
  : props.visibilityTimeout,
82
59
  });
83
60
  if (props.tags && props.tags.length > 0) {
84
61
  props.tags.forEach(tag => {
85
- cdk.Tags.of(queue).add(tag.key, tag.value);
62
+ aws_cdk_lib_1.Tags.of(queue).add(tag.key, tag.value);
86
63
  });
87
64
  }
88
- utils.createCfnOutput(`${id}-queueArn`, scope, queue.queueArn);
89
- utils.createCfnOutput(`${id}-queueName`, scope, queue.queueName);
90
- utils.createCfnOutput(`${id}-queueUrl`, scope, queue.queueUrl);
65
+ (0, utils_1.createCfnOutput)(`${id}-queueArn`, scope, queue.queueArn);
66
+ (0, utils_1.createCfnOutput)(`${id}-queueName`, scope, queue.queueName);
67
+ (0, utils_1.createCfnOutput)(`${id}-queueUrl`, scope, queue.queueUrl);
91
68
  return queue;
92
69
  }
93
70
  /**
@@ -1,5 +1,5 @@
1
1
  import * as sqs from 'aws-cdk-lib/aws-sqs';
2
- import { TagProps } from '../../../types';
2
+ import { TagProps } from '../../types';
3
3
  /**
4
4
  */
5
5
  export interface QueueProps extends sqs.QueueProps {
@@ -1,18 +1,17 @@
1
- import * as cdk from 'aws-cdk-lib';
2
- import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
3
- import * as s3 from 'aws-cdk-lib/aws-s3';
4
- import * as s3deploy from 'aws-cdk-lib/aws-s3-deployment';
1
+ import { IDistribution } from 'aws-cdk-lib/aws-cloudfront';
2
+ import { CfnBucketPolicy, IBucket } from 'aws-cdk-lib/aws-s3';
3
+ import { ISource } from 'aws-cdk-lib/aws-s3-deployment';
4
+ import { CommonConstruct } from '../../common';
5
5
  import { LifecycleRule, S3BucketProps } from './types';
6
- import { CommonConstruct } from '../../../common';
7
6
  /**
8
- * @classdesc Provides operations on AWS S3.
7
+ * @classdesc Provides operations on AWS S3
9
8
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
10
9
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
11
10
  * @example
12
11
  * import { CommonConstruct } from '@gradientedge/cdk-utils'
13
12
  *
14
13
  * class CustomConstruct extends CommonConstruct {
15
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
14
+ * constructor(parent: Construct, id: string, props: common.CommonStackProps) {
16
15
  * super(parent, id, props)
17
16
  * this.props = props
18
17
  * this.s3Manager.createS3Bucket('MyBucket', this)
@@ -50,14 +49,14 @@ export declare class S3Manager {
50
49
  * @param scope scope in which this resource is defined
51
50
  * @param props bucket properties
52
51
  */
53
- createS3Bucket(id: string, scope: CommonConstruct, props: S3BucketProps): cdk.aws_s3.IBucket;
52
+ createS3Bucket(id: string, scope: CommonConstruct, props: S3BucketProps): IBucket;
54
53
  /**
55
54
  * @summary Method to create an iam bucket policy for cloudtrail
56
55
  * @param id scoped id of the resource
57
56
  * @param scope scope in which this resource is defined
58
57
  * @param bucket
59
58
  */
60
- createBucketPolicyForCloudTrail(id: string, scope: CommonConstruct, bucket: s3.IBucket): cdk.aws_s3.CfnBucketPolicy;
59
+ createBucketPolicyForCloudTrail(id: string, scope: CommonConstruct, bucket: IBucket): CfnBucketPolicy;
61
60
  /**
62
61
  * @summary Method to create a s3 bucket deployment
63
62
  * @param id scoped id of the resource
@@ -68,7 +67,7 @@ export declare class S3Manager {
68
67
  * @param prefix
69
68
  * @param prune
70
69
  */
71
- doBucketDeployment(id: string, scope: CommonConstruct, siteBucket: s3.IBucket, distribution: cloudfront.IDistribution, sources: s3deploy.ISource[], prefix: string, prune?: boolean): void;
70
+ doBucketDeployment(id: string, scope: CommonConstruct, siteBucket: IBucket, distribution: IDistribution, sources: ISource[], prefix: string, prune?: boolean): void;
72
71
  /**
73
72
  *
74
73
  * @param id scoped id of the resource
@@ -76,5 +75,5 @@ export declare class S3Manager {
76
75
  * @param bucket bucket to create the folders in
77
76
  * @param folders list of folder names to be created in the bucket
78
77
  */
79
- createBucketFolders(id: string, scope: CommonConstruct, bucket: s3.IBucket, folders: string[]): void;
78
+ createBucketFolders(id: string, scope: CommonConstruct, bucket: IBucket, folders: string[]): void;
80
79
  }
@@ -1,43 +1,20 @@
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.S3Manager = void 0;
27
- const cdk = __importStar(require("aws-cdk-lib"));
28
- const iam = __importStar(require("aws-cdk-lib/aws-iam"));
29
- const s3 = __importStar(require("aws-cdk-lib/aws-s3"));
30
- const s3deploy = __importStar(require("aws-cdk-lib/aws-s3-deployment"));
31
- const utils = __importStar(require("../../../utils"));
4
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
5
+ const aws_iam_1 = require("aws-cdk-lib/aws-iam");
6
+ const aws_s3_1 = require("aws-cdk-lib/aws-s3");
7
+ const aws_s3_deployment_1 = require("aws-cdk-lib/aws-s3-deployment");
8
+ const utils_1 = require("../../utils");
32
9
  /**
33
- * @classdesc Provides operations on AWS S3.
10
+ * @classdesc Provides operations on AWS S3
34
11
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
35
12
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
36
13
  * @example
37
14
  * import { CommonConstruct } from '@gradientedge/cdk-utils'
38
15
  *
39
16
  * class CustomConstruct extends CommonConstruct {
40
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
17
+ * constructor(parent: Construct, id: string, props: common.CommonStackProps) {
41
18
  * super(parent, id, props)
42
19
  * this.props = props
43
20
  * this.s3Manager.createS3Bucket('MyBucket', this)
@@ -58,12 +35,12 @@ class S3Manager {
58
35
  bucketLifecycleRules.push({
59
36
  abortIncompleteMultipartUploadAfter: lifecycleRule.abortIncompleteMultipartUploadAfter,
60
37
  enabled: lifecycleRule.enabled,
61
- expiration: lifecycleRule.expirationInDays ? cdk.Duration.days(lifecycleRule.expirationInDays) : undefined,
38
+ expiration: lifecycleRule.expirationInDays ? aws_cdk_lib_1.Duration.days(lifecycleRule.expirationInDays) : undefined,
62
39
  expirationDate: lifecycleRule.expirationDate,
63
40
  expiredObjectDeleteMarker: lifecycleRule.expiredObjectDeleteMarker,
64
41
  id: lifecycleRule.id,
65
42
  noncurrentVersionExpiration: lifecycleRule.noncurrentVersionExpirationInDays
66
- ? cdk.Duration.days(lifecycleRule.noncurrentVersionExpirationInDays)
43
+ ? aws_cdk_lib_1.Duration.days(lifecycleRule.noncurrentVersionExpirationInDays)
67
44
  : undefined,
68
45
  noncurrentVersionTransitions: lifecycleRule.noncurrentVersionTransitions,
69
46
  prefix: lifecycleRule.prefix,
@@ -79,7 +56,7 @@ class S3Manager {
79
56
  * @param bucketName the bucket name
80
57
  */
81
58
  static determineBucketNameByAccountAndRegion(scope, bucketName) {
82
- return `${bucketName}-${cdk.Stack.of(scope).account}-${scope.props.region}-${scope.props.stage}`;
59
+ return `${bucketName}-${aws_cdk_lib_1.Stack.of(scope).account}-${scope.props.region}-${scope.props.stage}`;
83
60
  }
84
61
  /**
85
62
  * @summary Method to determine the bucket name using domain name
@@ -113,27 +90,27 @@ class S3Manager {
113
90
  let bucket;
114
91
  const bucketName = S3Manager.determineBucketName(scope, props.bucketName);
115
92
  if (props.existingBucket && props.bucketName) {
116
- bucket = s3.Bucket.fromBucketName(scope, `${id}`, bucketName);
93
+ bucket = aws_s3_1.Bucket.fromBucketName(scope, `${id}`, bucketName);
117
94
  }
118
95
  else {
119
96
  let logBucket;
120
97
  if (props.logBucketName) {
121
98
  const logBucketName = S3Manager.determineBucketName(scope, props.logBucketName);
122
- logBucket = s3.Bucket.fromBucketName(scope, `${id}-logs`, logBucketName);
99
+ logBucket = aws_s3_1.Bucket.fromBucketName(scope, `${id}-logs`, logBucketName);
123
100
  }
124
- bucket = new s3.Bucket(scope, `${id}-bucket`, {
101
+ bucket = new aws_s3_1.Bucket(scope, `${id}-bucket`, {
125
102
  accessControl: props.accessControl,
126
103
  autoDeleteObjects: props.autoDeleteObjects,
127
- blockPublicAccess: props.blockPublicAccess || s3.BlockPublicAccess.BLOCK_ALL,
104
+ blockPublicAccess: props.blockPublicAccess || aws_s3_1.BlockPublicAccess.BLOCK_ALL,
128
105
  bucketName: bucketName,
129
106
  cors: props.cors,
130
- encryption: props.encryption || s3.BucketEncryption.S3_MANAGED,
107
+ encryption: props.encryption || aws_s3_1.BucketEncryption.S3_MANAGED,
131
108
  encryptionKey: props.encryptionKey,
132
109
  lifecycleRules: this.determineBucketLifecycleRules(props),
133
110
  metrics: props.metrics,
134
111
  objectOwnership: props.objectOwnership,
135
112
  publicReadAccess: props.publicReadAccess,
136
- removalPolicy: props.removalPolicy || cdk.RemovalPolicy.RETAIN,
113
+ removalPolicy: props.removalPolicy || aws_cdk_lib_1.RemovalPolicy.RETAIN,
137
114
  serverAccessLogsBucket: logBucket,
138
115
  serverAccessLogsPrefix: props.serverAccessLogsPrefix,
139
116
  versioned: props.versioned,
@@ -150,11 +127,11 @@ class S3Manager {
150
127
  }
151
128
  if (props.tags && props.tags.length > 0) {
152
129
  props.tags.forEach(tag => {
153
- cdk.Tags.of(bucket).add(tag.key, tag.value);
130
+ aws_cdk_lib_1.Tags.of(bucket).add(tag.key, tag.value);
154
131
  });
155
132
  }
156
- utils.createCfnOutput(`${id}-bucketName`, scope, bucket.bucketName);
157
- utils.createCfnOutput(`${id}-bucketArn`, scope, bucket.bucketArn);
133
+ (0, utils_1.createCfnOutput)(`${id}-bucketName`, scope, bucket.bucketName);
134
+ (0, utils_1.createCfnOutput)(`${id}-bucketArn`, scope, bucket.bucketArn);
158
135
  return bucket;
159
136
  }
160
137
  /**
@@ -164,25 +141,25 @@ class S3Manager {
164
141
  * @param bucket
165
142
  */
166
143
  createBucketPolicyForCloudTrail(id, scope, bucket) {
167
- const bucketPolicyDocument = new iam.PolicyDocument({
144
+ const bucketPolicyDocument = new aws_iam_1.PolicyDocument({
168
145
  statements: [
169
- new iam.PolicyStatement({
146
+ new aws_iam_1.PolicyStatement({
170
147
  actions: ['s3:GetBucketAcl'],
171
- effect: iam.Effect.ALLOW,
172
- principals: [new iam.ServicePrincipal('cloudtrail.amazonaws.com')],
148
+ effect: aws_iam_1.Effect.ALLOW,
149
+ principals: [new aws_iam_1.ServicePrincipal('cloudtrail.amazonaws.com')],
173
150
  resources: [bucket.bucketArn],
174
151
  sid: 'AWSCloudTrailAclCheck20150319',
175
152
  }),
176
- new iam.PolicyStatement({
153
+ new aws_iam_1.PolicyStatement({
177
154
  actions: ['s3:PutObject'],
178
- effect: iam.Effect.ALLOW,
179
- principals: [new iam.ServicePrincipal('cloudtrail.amazonaws.com')],
155
+ effect: aws_iam_1.Effect.ALLOW,
156
+ principals: [new aws_iam_1.ServicePrincipal('cloudtrail.amazonaws.com')],
180
157
  resources: [bucket.arnForObjects('*')],
181
158
  sid: 'AWSCloudTrailWrite20150319',
182
159
  }),
183
160
  ],
184
161
  });
185
- return new s3.CfnBucketPolicy(scope, `${id}`, {
162
+ return new aws_s3_1.CfnBucketPolicy(scope, `${id}`, {
186
163
  bucket: bucket.bucketName,
187
164
  policyDocument: bucketPolicyDocument,
188
165
  });
@@ -198,14 +175,14 @@ class S3Manager {
198
175
  * @param prune
199
176
  */
200
177
  doBucketDeployment(id, scope, siteBucket, distribution, sources, prefix, prune) {
201
- new s3deploy.BucketDeployment(scope, `${id}`, {
178
+ new aws_s3_deployment_1.BucketDeployment(scope, `${id}`, {
202
179
  destinationBucket: siteBucket,
203
180
  destinationKeyPrefix: prefix,
204
181
  distribution: distribution,
205
182
  distributionPaths: ['/*'],
206
183
  memoryLimit: 1024,
207
184
  prune: !!prune,
208
- serverSideEncryption: s3deploy.ServerSideEncryption.AES_256,
185
+ serverSideEncryption: aws_s3_deployment_1.ServerSideEncryption.AES_256,
209
186
  sources: sources,
210
187
  });
211
188
  }
@@ -221,11 +198,11 @@ class S3Manager {
221
198
  throw `Folder unspecified for ${id}`;
222
199
  }
223
200
  folders.forEach(folder => {
224
- new s3deploy.BucketDeployment(scope, `${id}-${folder}`, {
201
+ new aws_s3_deployment_1.BucketDeployment(scope, `${id}-${folder}`, {
225
202
  destinationBucket: bucket,
226
203
  destinationKeyPrefix: folder,
227
204
  prune: false,
228
- sources: [s3deploy.Source.data('README.md', `This is the ${folder} folder for ${id}`)],
205
+ sources: [aws_s3_deployment_1.Source.data('README.md', `This is the ${folder} folder for ${id}`)],
229
206
  });
230
207
  });
231
208
  }
@@ -1,4 +1,4 @@
1
- import { TagProps } from '../../../types';
1
+ import { TagProps } from '../../types';
2
2
  import * as s3 from 'aws-cdk-lib/aws-s3';
3
3
  import * as s3deploy from 'aws-cdk-lib/aws-s3-deployment';
4
4
  /**