@gradientedge/cdk-utils 4.4.6 → 4.5.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 (325) hide show
  1. package/app/api-destined-function/node_modules/.yarn-integrity +1 -1
  2. package/app/api-destined-function/node_modules/minimatch/README.md +1 -1
  3. package/app/api-destined-function/node_modules/minimatch/minimatch.js +74 -45
  4. package/app/api-destined-function/node_modules/minimatch/package.json +3 -3
  5. package/app/api-destined-function/node_modules/uuid/dist/bin/uuid +2 -0
  6. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/index.js +9 -0
  7. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/md5.js +215 -0
  8. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  9. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/parse.js +35 -0
  10. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  11. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/rng.js +19 -0
  12. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
  13. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
  14. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v1.js +95 -0
  15. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  16. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v35.js +64 -0
  17. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v4.js +24 -0
  18. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  19. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/validate.js +7 -0
  20. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/version.js +11 -0
  21. package/app/api-destined-function/node_modules/uuid/dist/esm-node/index.js +9 -0
  22. package/app/api-destined-function/node_modules/uuid/dist/esm-node/md5.js +13 -0
  23. package/app/api-destined-function/node_modules/uuid/dist/esm-node/nil.js +1 -0
  24. package/app/api-destined-function/node_modules/uuid/dist/esm-node/parse.js +35 -0
  25. package/app/api-destined-function/node_modules/uuid/dist/esm-node/regex.js +1 -0
  26. package/app/api-destined-function/node_modules/uuid/dist/esm-node/rng.js +12 -0
  27. package/app/api-destined-function/node_modules/uuid/dist/esm-node/sha1.js +13 -0
  28. package/app/api-destined-function/node_modules/uuid/dist/esm-node/stringify.js +29 -0
  29. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v1.js +95 -0
  30. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v3.js +4 -0
  31. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v35.js +64 -0
  32. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v4.js +24 -0
  33. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v5.js +4 -0
  34. package/app/api-destined-function/node_modules/uuid/dist/esm-node/validate.js +7 -0
  35. package/app/api-destined-function/node_modules/uuid/dist/esm-node/version.js +11 -0
  36. package/app/api-destined-function/node_modules/uuid/dist/index.js +79 -0
  37. package/app/api-destined-function/node_modules/uuid/dist/md5-browser.js +223 -0
  38. package/app/api-destined-function/node_modules/uuid/dist/md5.js +23 -0
  39. package/app/api-destined-function/node_modules/uuid/dist/nil.js +8 -0
  40. package/app/api-destined-function/node_modules/uuid/dist/parse.js +45 -0
  41. package/app/api-destined-function/node_modules/uuid/dist/regex.js +8 -0
  42. package/app/api-destined-function/node_modules/uuid/dist/rng-browser.js +26 -0
  43. package/app/api-destined-function/node_modules/uuid/dist/rng.js +24 -0
  44. package/app/api-destined-function/node_modules/uuid/dist/sha1-browser.js +104 -0
  45. package/app/api-destined-function/node_modules/uuid/dist/sha1.js +23 -0
  46. package/app/api-destined-function/node_modules/uuid/dist/stringify.js +39 -0
  47. package/app/api-destined-function/node_modules/uuid/dist/umd/uuid.min.js +1 -0
  48. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
  49. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
  50. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
  51. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
  52. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
  53. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
  54. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
  55. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
  56. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
  57. package/app/api-destined-function/node_modules/uuid/dist/uuid-bin.js +85 -0
  58. package/app/api-destined-function/node_modules/uuid/dist/v1.js +107 -0
  59. package/app/api-destined-function/node_modules/uuid/dist/v3.js +16 -0
  60. package/app/api-destined-function/node_modules/uuid/dist/v35.js +78 -0
  61. package/app/api-destined-function/node_modules/uuid/dist/v4.js +37 -0
  62. package/app/api-destined-function/node_modules/uuid/dist/v5.js +16 -0
  63. package/app/api-destined-function/node_modules/uuid/dist/validate.js +17 -0
  64. package/app/api-destined-function/node_modules/uuid/dist/version.js +21 -0
  65. package/app/api-destined-function/package.json +2 -1
  66. package/dist/app/api-destined-function/layers/nodejs/node_modules/.bin/uuid +2 -0
  67. package/dist/app/api-destined-function/layers/nodejs/node_modules/.yarn-integrity +109 -0
  68. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/LICENSE +21 -0
  69. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/README.md +16 -0
  70. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.mts +10 -0
  71. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.ts +80 -0
  72. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/package.json +54 -0
  73. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/LICENSE.md +9 -0
  74. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/README.md +505 -0
  75. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/bin/uuid +2 -0
  76. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/index.js +9 -0
  77. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/md5.js +215 -0
  78. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  79. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/parse.js +35 -0
  80. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  81. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/rng.js +19 -0
  82. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
  83. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
  84. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v1.js +95 -0
  85. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  86. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v35.js +64 -0
  87. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v4.js +24 -0
  88. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  89. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/validate.js +7 -0
  90. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/version.js +11 -0
  91. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/index.js +9 -0
  92. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/md5.js +13 -0
  93. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/nil.js +1 -0
  94. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/parse.js +35 -0
  95. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/regex.js +1 -0
  96. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/rng.js +12 -0
  97. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/sha1.js +13 -0
  98. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/stringify.js +29 -0
  99. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v1.js +95 -0
  100. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v3.js +4 -0
  101. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v35.js +64 -0
  102. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v4.js +24 -0
  103. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v5.js +4 -0
  104. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/validate.js +7 -0
  105. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/version.js +11 -0
  106. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/index.js +79 -0
  107. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5-browser.js +223 -0
  108. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5.js +23 -0
  109. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/nil.js +8 -0
  110. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/parse.js +45 -0
  111. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/regex.js +8 -0
  112. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng-browser.js +26 -0
  113. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng.js +24 -0
  114. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1-browser.js +104 -0
  115. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1.js +23 -0
  116. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/stringify.js +39 -0
  117. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuid.min.js +1 -0
  118. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
  119. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
  120. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
  121. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
  122. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
  123. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
  124. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
  125. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
  126. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
  127. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/uuid-bin.js +85 -0
  128. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v1.js +107 -0
  129. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v3.js +16 -0
  130. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v35.js +78 -0
  131. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v4.js +37 -0
  132. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v5.js +16 -0
  133. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/validate.js +17 -0
  134. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/version.js +21 -0
  135. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/package.json +135 -0
  136. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/wrapper.mjs +10 -0
  137. package/dist/app/api-destined-function/layers/nodejs/package.json +30 -0
  138. package/dist/app/api-destined-function/src/lib/lambda.d.ts +19 -0
  139. package/dist/app/api-destined-function/src/lib/lambda.d.ts.map +1 -0
  140. package/dist/app/api-destined-function/src/lib/lambda.js +34 -0
  141. package/dist/app/api-destined-function/src/lib/lambda.js.map +1 -0
  142. package/dist/index.d.ts +6 -0
  143. package/dist/index.d.ts.map +1 -0
  144. package/dist/index.js.map +1 -0
  145. package/dist/src/lib/common/construct.d.ts +81 -0
  146. package/dist/src/lib/common/construct.d.ts.map +1 -0
  147. package/dist/src/lib/common/construct.js +136 -0
  148. package/dist/src/lib/common/construct.js.map +1 -0
  149. package/dist/src/lib/common/index.d.ts +3 -0
  150. package/dist/src/lib/common/index.d.ts.map +1 -0
  151. package/dist/src/lib/common/index.js +15 -0
  152. package/dist/src/lib/common/index.js.map +1 -0
  153. package/dist/src/lib/common/stack.d.ts +55 -0
  154. package/dist/src/lib/common/stack.d.ts.map +1 -0
  155. package/dist/src/lib/common/stack.js +148 -0
  156. package/dist/src/lib/common/stack.js.map +1 -0
  157. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts +17 -0
  158. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts.map +1 -0
  159. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js +18 -0
  160. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js.map +1 -0
  161. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts +20 -0
  162. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts.map +1 -0
  163. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js +20 -0
  164. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js.map +1 -0
  165. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts +36 -0
  166. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts.map +1 -0
  167. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js +30 -0
  168. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js.map +1 -0
  169. package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts +5 -0
  170. package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts.map +1 -0
  171. package/dist/src/lib/construct/api-to-eventbridge-target/index.js +17 -0
  172. package/dist/src/lib/construct/api-to-eventbridge-target/index.js.map +1 -0
  173. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +135 -0
  174. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts.map +1 -0
  175. package/dist/src/lib/construct/api-to-eventbridge-target/main.js +488 -0
  176. package/dist/src/lib/construct/api-to-eventbridge-target/main.js.map +1 -0
  177. package/dist/src/lib/construct/graphql-api-lambda/index.d.ts +2 -0
  178. package/dist/src/lib/construct/graphql-api-lambda/index.d.ts.map +1 -0
  179. package/dist/src/lib/construct/graphql-api-lambda/index.js +14 -0
  180. package/dist/src/lib/construct/graphql-api-lambda/index.js.map +1 -0
  181. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +113 -0
  182. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts.map +1 -0
  183. package/dist/src/lib/construct/graphql-api-lambda/main.js +202 -0
  184. package/dist/src/lib/construct/graphql-api-lambda/main.js.map +1 -0
  185. package/dist/src/lib/construct/index.d.ts +5 -0
  186. package/dist/src/lib/construct/index.d.ts.map +1 -0
  187. package/dist/src/lib/construct/index.js +17 -0
  188. package/dist/src/lib/construct/index.js.map +1 -0
  189. package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts +2 -0
  190. package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts.map +1 -0
  191. package/dist/src/lib/construct/site-with-ecs-backend/index.js +14 -0
  192. package/dist/src/lib/construct/site-with-ecs-backend/index.js.map +1 -0
  193. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +168 -0
  194. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts.map +1 -0
  195. package/dist/src/lib/construct/site-with-ecs-backend/main.js +328 -0
  196. package/dist/src/lib/construct/site-with-ecs-backend/main.js.map +1 -0
  197. package/dist/src/lib/construct/static-site/index.d.ts +2 -0
  198. package/dist/src/lib/construct/static-site/index.d.ts.map +1 -0
  199. package/dist/src/lib/construct/static-site/index.js +14 -0
  200. package/dist/src/lib/construct/static-site/index.js.map +1 -0
  201. package/dist/src/lib/construct/static-site/main.d.ts +95 -0
  202. package/dist/src/lib/construct/static-site/main.d.ts.map +1 -0
  203. package/dist/src/lib/construct/static-site/main.js +169 -0
  204. package/dist/src/lib/construct/static-site/main.js.map +1 -0
  205. package/dist/src/lib/manager/aws/acm-manager.d.ts +47 -0
  206. package/dist/src/lib/manager/aws/acm-manager.d.ts.map +1 -0
  207. package/dist/src/lib/manager/aws/acm-manager.js +91 -0
  208. package/dist/src/lib/manager/aws/acm-manager.js.map +1 -0
  209. package/dist/src/lib/manager/aws/api-manager.d.ts +44 -0
  210. package/dist/src/lib/manager/aws/api-manager.d.ts.map +1 -0
  211. package/dist/src/lib/manager/aws/api-manager.js +112 -0
  212. package/dist/src/lib/manager/aws/api-manager.js.map +1 -0
  213. package/dist/src/lib/manager/aws/app-config-manager.d.ts +66 -0
  214. package/dist/src/lib/manager/aws/app-config-manager.d.ts.map +1 -0
  215. package/dist/src/lib/manager/aws/app-config-manager.js +149 -0
  216. package/dist/src/lib/manager/aws/app-config-manager.js.map +1 -0
  217. package/dist/src/lib/manager/aws/cloudfront-manager.d.ts +113 -0
  218. package/dist/src/lib/manager/aws/cloudfront-manager.d.ts.map +1 -0
  219. package/dist/src/lib/manager/aws/cloudfront-manager.js +283 -0
  220. package/dist/src/lib/manager/aws/cloudfront-manager.js.map +1 -0
  221. package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts +49 -0
  222. package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts.map +1 -0
  223. package/dist/src/lib/manager/aws/cloudtrail-manager.js +100 -0
  224. package/dist/src/lib/manager/aws/cloudtrail-manager.js.map +1 -0
  225. package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts +122 -0
  226. package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts.map +1 -0
  227. package/dist/src/lib/manager/aws/cloudwatch-manager.js +353 -0
  228. package/dist/src/lib/manager/aws/cloudwatch-manager.js.map +1 -0
  229. package/dist/src/lib/manager/aws/codebuild-manager.d.ts +41 -0
  230. package/dist/src/lib/manager/aws/codebuild-manager.d.ts.map +1 -0
  231. package/dist/src/lib/manager/aws/codebuild-manager.js +95 -0
  232. package/dist/src/lib/manager/aws/codebuild-manager.js.map +1 -0
  233. package/dist/src/lib/manager/aws/dynamodb-manager.d.ts +33 -0
  234. package/dist/src/lib/manager/aws/dynamodb-manager.d.ts.map +1 -0
  235. package/dist/src/lib/manager/aws/dynamodb-manager.js +80 -0
  236. package/dist/src/lib/manager/aws/dynamodb-manager.js.map +1 -0
  237. package/dist/src/lib/manager/aws/ecr-manager.d.ts +32 -0
  238. package/dist/src/lib/manager/aws/ecr-manager.d.ts.map +1 -0
  239. package/dist/src/lib/manager/aws/ecr-manager.js +61 -0
  240. package/dist/src/lib/manager/aws/ecr-manager.js.map +1 -0
  241. package/dist/src/lib/manager/aws/ecs-manager.d.ts +49 -0
  242. package/dist/src/lib/manager/aws/ecs-manager.d.ts.map +1 -0
  243. package/dist/src/lib/manager/aws/ecs-manager.js +104 -0
  244. package/dist/src/lib/manager/aws/ecs-manager.js.map +1 -0
  245. package/dist/src/lib/manager/aws/eks-manager.d.ts +37 -0
  246. package/dist/src/lib/manager/aws/eks-manager.d.ts.map +1 -0
  247. package/dist/src/lib/manager/aws/eks-manager.js +110 -0
  248. package/dist/src/lib/manager/aws/eks-manager.js.map +1 -0
  249. package/dist/src/lib/manager/aws/elasticache-manager.d.ts +43 -0
  250. package/dist/src/lib/manager/aws/elasticache-manager.d.ts.map +1 -0
  251. package/dist/src/lib/manager/aws/elasticache-manager.js +103 -0
  252. package/dist/src/lib/manager/aws/elasticache-manager.js.map +1 -0
  253. package/dist/src/lib/manager/aws/event-manager.d.ts +68 -0
  254. package/dist/src/lib/manager/aws/event-manager.d.ts.map +1 -0
  255. package/dist/src/lib/manager/aws/event-manager.js +163 -0
  256. package/dist/src/lib/manager/aws/event-manager.js.map +1 -0
  257. package/dist/src/lib/manager/aws/iam-manager.d.ts +155 -0
  258. package/dist/src/lib/manager/aws/iam-manager.d.ts.map +1 -0
  259. package/dist/src/lib/manager/aws/iam-manager.js +381 -0
  260. package/dist/src/lib/manager/aws/iam-manager.js.map +1 -0
  261. package/dist/src/lib/manager/aws/index.d.ts +24 -0
  262. package/dist/src/lib/manager/aws/index.d.ts.map +1 -0
  263. package/dist/src/lib/manager/aws/index.js +36 -0
  264. package/dist/src/lib/manager/aws/index.js.map +1 -0
  265. package/dist/src/lib/manager/aws/lambda-manager.d.ts +95 -0
  266. package/dist/src/lib/manager/aws/lambda-manager.d.ts.map +1 -0
  267. package/dist/src/lib/manager/aws/lambda-manager.js +197 -0
  268. package/dist/src/lib/manager/aws/lambda-manager.js.map +1 -0
  269. package/dist/src/lib/manager/aws/log-manager.d.ts +52 -0
  270. package/dist/src/lib/manager/aws/log-manager.d.ts.map +1 -0
  271. package/dist/src/lib/manager/aws/log-manager.js +109 -0
  272. package/dist/src/lib/manager/aws/log-manager.js.map +1 -0
  273. package/dist/src/lib/manager/aws/route53-manager.d.ts +69 -0
  274. package/dist/src/lib/manager/aws/route53-manager.d.ts.map +1 -0
  275. package/dist/src/lib/manager/aws/route53-manager.js +159 -0
  276. package/dist/src/lib/manager/aws/route53-manager.js.map +1 -0
  277. package/dist/src/lib/manager/aws/s3-manager.d.ts +74 -0
  278. package/dist/src/lib/manager/aws/s3-manager.d.ts.map +1 -0
  279. package/dist/src/lib/manager/aws/s3-manager.js +203 -0
  280. package/dist/src/lib/manager/aws/s3-manager.js.map +1 -0
  281. package/dist/src/lib/manager/aws/secrets-manager.d.ts +58 -0
  282. package/dist/src/lib/manager/aws/secrets-manager.d.ts.map +1 -0
  283. package/dist/src/lib/manager/aws/secrets-manager.js +117 -0
  284. package/dist/src/lib/manager/aws/secrets-manager.js.map +1 -0
  285. package/dist/src/lib/manager/aws/sns-manager.d.ts +43 -0
  286. package/dist/src/lib/manager/aws/sns-manager.d.ts.map +1 -0
  287. package/dist/src/lib/manager/aws/sns-manager.js +91 -0
  288. package/dist/src/lib/manager/aws/sns-manager.js.map +1 -0
  289. package/dist/src/lib/manager/aws/ssm-manager.d.ts +61 -0
  290. package/dist/src/lib/manager/aws/ssm-manager.d.ts.map +1 -0
  291. package/dist/src/lib/manager/aws/ssm-manager.js +125 -0
  292. package/dist/src/lib/manager/aws/ssm-manager.js.map +1 -0
  293. package/dist/src/lib/manager/aws/vpc-manager.d.ts +46 -0
  294. package/dist/src/lib/manager/aws/vpc-manager.d.ts.map +1 -0
  295. package/dist/src/lib/manager/aws/vpc-manager.js +95 -0
  296. package/dist/src/lib/manager/aws/vpc-manager.js.map +1 -0
  297. package/dist/src/lib/manager/aws/waf-manager.d.ts +40 -0
  298. package/dist/src/lib/manager/aws/waf-manager.d.ts.map +1 -0
  299. package/dist/src/lib/manager/aws/waf-manager.js +90 -0
  300. package/dist/src/lib/manager/aws/waf-manager.js.map +1 -0
  301. package/dist/src/lib/manager/index.d.ts +2 -0
  302. package/dist/src/lib/manager/index.d.ts.map +1 -0
  303. package/dist/src/lib/manager/index.js +14 -0
  304. package/dist/src/lib/manager/index.js.map +1 -0
  305. package/dist/src/lib/types/aws/index.d.ts +487 -0
  306. package/dist/src/lib/types/aws/index.d.ts.map +1 -0
  307. package/dist/src/lib/types/aws/index.js +3 -0
  308. package/dist/src/lib/types/aws/index.js.map +1 -0
  309. package/dist/src/lib/types/index.d.ts +2 -0
  310. package/dist/src/lib/types/index.d.ts.map +1 -0
  311. package/dist/src/lib/types/index.js +14 -0
  312. package/dist/src/lib/types/index.js.map +1 -0
  313. package/dist/src/lib/utils/aws/index.d.ts +16 -0
  314. package/dist/src/lib/utils/aws/index.d.ts.map +1 -0
  315. package/dist/src/lib/utils/aws/index.js +50 -0
  316. package/dist/src/lib/utils/aws/index.js.map +1 -0
  317. package/dist/src/lib/utils/index.d.ts +63 -0
  318. package/dist/src/lib/utils/index.d.ts.map +1 -0
  319. package/dist/src/lib/utils/index.js +85 -0
  320. package/dist/src/lib/utils/index.js.map +1 -0
  321. package/package.json +8 -7
  322. package/src/lib/common/construct.ts +2 -0
  323. package/src/lib/manager/aws/elasticache-manager.ts +98 -0
  324. package/src/lib/manager/aws/index.ts +1 -0
  325. package/src/lib/types/aws/index.ts +7 -0
@@ -0,0 +1,353 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.CloudWatchManager = void 0;
23
+ const cdk = __importStar(require("aws-cdk-lib"));
24
+ const watch = __importStar(require("aws-cdk-lib/aws-cloudwatch"));
25
+ const utils = __importStar(require("../../utils"));
26
+ /**
27
+ * @category cdk-utils.cloudwatch-manager
28
+ * @subcategory Construct
29
+ */
30
+ var CloudWatchWidgetType;
31
+ (function (CloudWatchWidgetType) {
32
+ CloudWatchWidgetType["Text"] = "Text";
33
+ CloudWatchWidgetType["SingleValue"] = "SingleValue";
34
+ CloudWatchWidgetType["Graph"] = "Graph";
35
+ CloudWatchWidgetType["AlarmStatus"] = "AlarmStatus";
36
+ CloudWatchWidgetType["LogQuery"] = "LogQuery";
37
+ })(CloudWatchWidgetType || (CloudWatchWidgetType = {}));
38
+ /**
39
+ * @stability stable
40
+ * @category cdk-utils.cloudwatch-manager
41
+ * @subcategory Construct
42
+ * @classdesc Provides operations on AWS CloudWatch.
43
+ * - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
44
+ * - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
45
+ * @example
46
+ * import * as common from '@gradientedge/cdk-utils'
47
+ *
48
+ * class CustomConstruct extends common.common.CommonConstruct {
49
+ * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
50
+ * super(parent, id, props)
51
+ * this.props = props
52
+ * this.cloudWatchManager.createAlarmForMetric('MyAlarm', this, metric)
53
+ * }
54
+ * }
55
+ *
56
+ * @see [CDK CloudWatch Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch-readme.html}
57
+ */
58
+ class CloudWatchManager {
59
+ /**
60
+ * @summary Method to create a cloudwatch alarm for a given expression
61
+ * @param {string} id scoped id of the resource
62
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
63
+ * @param {types.AlarmProps} props
64
+ */
65
+ createAlarmForExpression(id, scope, props) {
66
+ if (!props)
67
+ throw `Alarm props undefined`;
68
+ if (!props.expression)
69
+ throw `Could not find expression for Alarm props for id:${id}`;
70
+ if (!props.metricProps)
71
+ throw `Could not find metricProps for Alarm props for id:${id}`;
72
+ const metrics = {};
73
+ this.determineMetrics(scope, props.metricProps).map((metric, index) => (metrics[`m${index}`] = metric));
74
+ const expression = new watch.MathExpression({
75
+ expression: props.expression,
76
+ usingMetrics: metrics,
77
+ period: props.periodInSecs ? cdk.Duration.seconds(props.periodInSecs) : cdk.Duration.minutes(5),
78
+ });
79
+ const alarm = expression.createAlarm(scope, `${id}`, {
80
+ alarmName: props.alarmName,
81
+ alarmDescription: props.alarmDescription,
82
+ threshold: props.threshold,
83
+ evaluationPeriods: props.evaluationPeriods,
84
+ comparisonOperator: props.comparisonOperator,
85
+ treatMissingData: props.treatMissingData,
86
+ datapointsToAlarm: props.datapointsToAlarm,
87
+ });
88
+ utils.createCfnOutput(`${id}-alarmArn`, scope, alarm.alarmArn);
89
+ utils.createCfnOutput(`${id}-alarmName`, scope, alarm.alarmName);
90
+ return alarm;
91
+ }
92
+ /**
93
+ * @summary Method to create a cloudwatch alarm for a given metric
94
+ * @param {string} id scoped id of the resource
95
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
96
+ * @param {types.AlarmProps} props
97
+ * @param metric
98
+ */
99
+ createAlarmForMetric(id, scope, props, metric) {
100
+ if (!props)
101
+ throw `Alarm props undefined`;
102
+ const alarm = metric.createAlarm(scope, `${id}`, {
103
+ alarmName: props.alarmName,
104
+ alarmDescription: props.alarmDescription,
105
+ threshold: props.threshold,
106
+ evaluationPeriods: props.evaluationPeriods,
107
+ comparisonOperator: props.comparisonOperator,
108
+ treatMissingData: props.treatMissingData,
109
+ datapointsToAlarm: props.datapointsToAlarm,
110
+ });
111
+ utils.createCfnOutput(`${id}-alarmArn`, scope, alarm.alarmArn);
112
+ utils.createCfnOutput(`${id}-alarmName`, scope, alarm.alarmName);
113
+ return alarm;
114
+ }
115
+ /**
116
+ * @summary Method to create a cloudwatch dashboard
117
+ * @param {string} id scoped id of the resource
118
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
119
+ * @param {types.DashboardProps} props
120
+ * @param widgets
121
+ */
122
+ createDashboard(id, scope, props, widgets) {
123
+ if (!props)
124
+ throw `Dashboard props undefined`;
125
+ const dashboard = new watch.Dashboard(scope, `${id}`, {
126
+ dashboardName: props.dashboardName,
127
+ periodOverride: props.periodOverride,
128
+ start: CloudWatchManager.determineTimeRange(props.start),
129
+ end: CloudWatchManager.determineTimeRange(props.end),
130
+ widgets: widgets,
131
+ });
132
+ utils.createCfnOutput(`${id}-dashboardName`, scope, props.dashboardName);
133
+ return dashboard;
134
+ }
135
+ /**
136
+ * @summary Method to create cloudwatch widgets
137
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
138
+ * @param props
139
+ */
140
+ createWidgets(scope, props) {
141
+ if (!props || props.length == 0)
142
+ throw `Widget props undefined`;
143
+ const widgets = [];
144
+ props.forEach((widgetProps) => widgets.push(this.createWidget(widgetProps.id, scope, widgetProps)));
145
+ return widgets;
146
+ }
147
+ /**
148
+ * @summary Method to create a cloudwatch widget
149
+ * @param {string} id scoped id of the resource
150
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
151
+ * @param props
152
+ */
153
+ createWidget(id, scope, props) {
154
+ if (!props)
155
+ throw `Widget props undefined`;
156
+ const metrics = this.determineMetrics(scope, props.metricProps);
157
+ let alarms, logGroupNames = [];
158
+ switch (props.type) {
159
+ case CloudWatchWidgetType.Text:
160
+ return this.createTextWidget(id, scope, props);
161
+ case CloudWatchWidgetType.SingleValue:
162
+ return this.createSingleValueWidget(id, scope, props, metrics);
163
+ case CloudWatchWidgetType.Graph:
164
+ return this.createGraphWidget(id, scope, props, metrics);
165
+ case CloudWatchWidgetType.AlarmStatus:
166
+ alarms = this.determineAlarms(id, scope, props.alarmProps);
167
+ return this.createAlarmStatusWidget(id, scope, props, alarms);
168
+ case CloudWatchWidgetType.LogQuery:
169
+ logGroupNames = props.logGroupNames.map((name) => `${name}-${scope.props.stage}`);
170
+ return this.createLogQueryWidget(id, scope, props, logGroupNames);
171
+ default:
172
+ throw 'Unsupported widget type';
173
+ }
174
+ }
175
+ /**
176
+ * @summary Method to create a cloudwatch text widget
177
+ * @param {string} id scoped id of the resource
178
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
179
+ * @param {types.TextWidgetProps} props
180
+ */
181
+ createTextWidget(id, scope, props) {
182
+ const widget = new watch.TextWidget({
183
+ markdown: props.markdown,
184
+ width: props.width,
185
+ height: props.height,
186
+ });
187
+ if (props.positionX && props.positionY)
188
+ widget.position(props.positionX, props.positionY);
189
+ return widget;
190
+ }
191
+ /**
192
+ * @summary Method to create a cloudwatch numeric widget
193
+ * @param {string} id scoped id of the resource
194
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
195
+ * @param {types.NumericWidgetProps} props
196
+ * @param metrics
197
+ */
198
+ createSingleValueWidget(id, scope, props, metrics) {
199
+ const widget = new watch.SingleValueWidget({
200
+ metrics: metrics,
201
+ setPeriodToTimeRange: props.setPeriodToTimeRange,
202
+ fullPrecision: props.fullPrecision,
203
+ title: props.title,
204
+ width: props.width,
205
+ height: props.height,
206
+ });
207
+ if (props.positionX && props.positionY)
208
+ widget.position(props.positionX, props.positionY);
209
+ return widget;
210
+ }
211
+ /**
212
+ * @summary Method to create a cloudwatch graph widget
213
+ * @param {string} id scoped id of the resource
214
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
215
+ * @param {types.GraphWidgetProps} props
216
+ * @param leftYMetrics
217
+ * @param rightYMetrics
218
+ */
219
+ createGraphWidget(id, scope, props, leftYMetrics, rightYMetrics) {
220
+ const widget = new watch.GraphWidget({
221
+ left: leftYMetrics,
222
+ right: rightYMetrics,
223
+ leftAnnotations: props.leftAnnotations,
224
+ rightAnnotations: props.rightAnnotations,
225
+ stacked: props.stacked,
226
+ leftYAxis: props.leftYAxis,
227
+ rightYAxis: props.rightYAxis,
228
+ legendPosition: props.legendPosition,
229
+ liveData: props.liveData,
230
+ view: props.view,
231
+ title: props.title,
232
+ width: props.width,
233
+ height: props.height,
234
+ });
235
+ if (props.positionX && props.positionY)
236
+ widget.position(props.positionX, props.positionY);
237
+ return widget;
238
+ }
239
+ /**
240
+ * @summary Method to create a cloudwatch alarm status widget
241
+ * @param {string} id scoped id of the resource
242
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
243
+ * @param {types.AlarmStatusWidgetProps} props
244
+ * @param {watch.IAlarm[]} alarms
245
+ */
246
+ createAlarmStatusWidget(id, scope, props, alarms) {
247
+ const widget = new watch.AlarmStatusWidget({
248
+ alarms: alarms,
249
+ title: props.title,
250
+ width: props.width,
251
+ height: props.height,
252
+ });
253
+ if (props.positionX && props.positionY)
254
+ widget.position(props.positionX, props.positionY);
255
+ return widget;
256
+ }
257
+ /**
258
+ * @summary Method to create a cloudwatch log query widget
259
+ * @param {string} id scoped id of the resource
260
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
261
+ * @param {types.LogQueryWidgetProps} props
262
+ * @param {string[]} logGroupNames
263
+ */
264
+ createLogQueryWidget(id, scope, props, logGroupNames) {
265
+ const widget = new watch.LogQueryWidget({
266
+ logGroupNames: logGroupNames,
267
+ queryString: props.queryString,
268
+ queryLines: props.queryLines,
269
+ view: props.view,
270
+ title: props.title,
271
+ width: props.width,
272
+ height: props.height,
273
+ });
274
+ if (props.positionX && props.positionY)
275
+ widget.position(props.positionX, props.positionY);
276
+ return widget;
277
+ }
278
+ /**
279
+ * @summary Utility method to determine the metrics and dimensions
280
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
281
+ * @param {types.MetricProps[]} metricProps
282
+ */
283
+ determineMetrics(scope, metricProps) {
284
+ const metrics = [];
285
+ if (metricProps) {
286
+ metricProps.forEach((metricProp) => {
287
+ let metricDimensions = metricProp.dimensionsMap || {};
288
+ if (metricProp.functionName) {
289
+ metricDimensions = {
290
+ ...metricProp.dimensionsMap,
291
+ ...{
292
+ FunctionName: `${metricProp.functionName}-${scope.props.stage}`,
293
+ },
294
+ };
295
+ }
296
+ if (metricProp.dbClusterIdentifier) {
297
+ metricDimensions = {
298
+ ...metricProp.dimensionsMap,
299
+ ...{
300
+ DBClusterIdentifier: `${metricProp.dbClusterIdentifier}-${scope.props.stage}`,
301
+ },
302
+ };
303
+ }
304
+ const metric = new watch.Metric({
305
+ namespace: metricProp.stageSuffix ? `${metricProp.namespace}-${scope.props.stage}` : metricProp.namespace,
306
+ metricName: metricProp.stageSuffix ? `${metricProp.metricName}-${scope.props.stage}` : metricProp.metricName,
307
+ dimensionsMap: metricDimensions,
308
+ statistic: metricProp.statistic,
309
+ region: metricProp.region,
310
+ period: metricProp.periodInSecs ? cdk.Duration.seconds(metricProp.periodInSecs) : cdk.Duration.minutes(5),
311
+ });
312
+ metrics.push(metric);
313
+ });
314
+ }
315
+ return metrics;
316
+ }
317
+ /**
318
+ * @summary Utility method to determine the time range
319
+ * @param {string?} range
320
+ */
321
+ static determineTimeRange(range) {
322
+ const moment = require('moment');
323
+ switch (range) {
324
+ case 'START_TODAY':
325
+ return moment().startOf('day').format();
326
+ case 'END_TODAY':
327
+ return moment().endOf('day').format();
328
+ default:
329
+ return range;
330
+ }
331
+ }
332
+ /**
333
+ * @summary Utility method to determine the configured alarms
334
+ * @param {string} id scoped id of the resource
335
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
336
+ * @param {watch.AlarmProps[]} alarmProps
337
+ */
338
+ determineAlarms(id, scope, alarmProps) {
339
+ const alarms = [];
340
+ if (alarmProps) {
341
+ alarmProps.forEach((alarmProp) => {
342
+ if (!alarmProp.alarmName)
343
+ throw `Alarm name undefined for ${id}`;
344
+ const alarmArn = `arn:aws:cloudwatch:${cdk.Stack.of(scope).region}:${cdk.Stack.of(scope).account}:alarm:${alarmProp.alarmName}`;
345
+ const alarm = watch.Alarm.fromAlarmArn(scope, `${alarmProp.alarmName}`, alarmArn);
346
+ alarms.push(alarm);
347
+ });
348
+ }
349
+ return alarms;
350
+ }
351
+ }
352
+ exports.CloudWatchManager = CloudWatchManager;
353
+ //# sourceMappingURL=cloudwatch-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudwatch-manager.js","sourceRoot":"","sources":["../../../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,UAC9F,SAAS,CAAC,SACZ,EAAE,CAAA;gBACF,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,SAAS,CAAC,SAAS,EAAE,EAAE,QAAQ,CAAC,CAAA;gBACjF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACpB,CAAC,CAAC,CAAA;SACH;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAnWD,8CAmWC"}
@@ -0,0 +1,41 @@
1
+ import * as cdk from 'aws-cdk-lib';
2
+ import * as common from '../../common';
3
+ /**
4
+ * @stability stable
5
+ * @category cdk-utils.codebuild-manager
6
+ * @subcategory Construct
7
+ * @classdesc Provides operations on AWS Code Build.
8
+ * - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
9
+ * - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
10
+ * @example
11
+ * import { common.CommonConstruct } from '@gradientedge/cdk-utils'
12
+ *
13
+ * class CustomConstruct extends common.CommonConstruct {
14
+ * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
15
+ * super(parent, id, props)
16
+ * this.props = props
17
+ * this.codeBuildManager.createImageForCloudfrontInvalidation('MyInvalidation', this, './docker ')
18
+ * }
19
+ * }
20
+ *
21
+ * @see [CDK Codebuild Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild-readme.html}
22
+ */
23
+ export declare class CodeBuildManager {
24
+ /**
25
+ *
26
+ * @param id
27
+ * @param scope
28
+ * @param dockerfilePath
29
+ */
30
+ createImageForCloudfrontInvalidation(id: string, scope: common.CommonConstruct, dockerfilePath: string): cdk.aws_ecr_assets.DockerImageAsset;
31
+ /**
32
+ *
33
+ * @param id
34
+ * @param scope
35
+ * @param dockerFilepath
36
+ * @param distributionId
37
+ * @param paths
38
+ */
39
+ createProjectForCloudfrontInvalidation(id: string, scope: common.CommonConstruct, dockerFilepath: string, distributionId: string, paths?: string): cdk.aws_codebuild.Project;
40
+ }
41
+ //# sourceMappingURL=codebuild-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codebuild-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/codebuild-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAA;AAElC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AAEtC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,gBAAgB;IAC3B;;;;;OAKG;IACI,oCAAoC,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,cAAc,EAAE,MAAM;IAI7G;;;;;;;OAOG;IACI,sCAAsC,CAC3C,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,MAAM,EACtB,KAAK,CAAC,EAAE,MAAM;CAiCjB"}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.CodeBuildManager = void 0;
23
+ const cdk = __importStar(require("aws-cdk-lib"));
24
+ const codebuild = __importStar(require("aws-cdk-lib/aws-codebuild"));
25
+ /**
26
+ * @stability stable
27
+ * @category cdk-utils.codebuild-manager
28
+ * @subcategory Construct
29
+ * @classdesc Provides operations on AWS Code Build.
30
+ * - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
31
+ * - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
32
+ * @example
33
+ * import { common.CommonConstruct } from '@gradientedge/cdk-utils'
34
+ *
35
+ * class CustomConstruct extends common.CommonConstruct {
36
+ * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
37
+ * super(parent, id, props)
38
+ * this.props = props
39
+ * this.codeBuildManager.createImageForCloudfrontInvalidation('MyInvalidation', this, './docker ')
40
+ * }
41
+ * }
42
+ *
43
+ * @see [CDK Codebuild Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild-readme.html}
44
+ */
45
+ class CodeBuildManager {
46
+ /**
47
+ *
48
+ * @param id
49
+ * @param scope
50
+ * @param dockerfilePath
51
+ */
52
+ createImageForCloudfrontInvalidation(id, scope, dockerfilePath) {
53
+ return scope.ecrManager.createDockerImage(`${id}-build-image`, scope, dockerfilePath);
54
+ }
55
+ /**
56
+ *
57
+ * @param id
58
+ * @param scope
59
+ * @param dockerFilepath
60
+ * @param distributionId
61
+ * @param paths
62
+ */
63
+ createProjectForCloudfrontInvalidation(id, scope, dockerFilepath, distributionId, paths) {
64
+ const invalidationPaths = paths ?? '/*';
65
+ return new codebuild.Project(scope, `${id}-install-deps-project`, {
66
+ role: scope.iamManager.roleForCloudfrontInvalidation(id, scope),
67
+ buildSpec: codebuild.BuildSpec.fromObject({
68
+ version: '0.1',
69
+ phases: {
70
+ build: {
71
+ commands: [
72
+ `aws cloudfront create-invalidation --distribution-id ${distributionId} --paths "${invalidationPaths}"`,
73
+ ],
74
+ },
75
+ },
76
+ }),
77
+ environment: {
78
+ buildImage: codebuild.LinuxBuildImage.fromDockerRegistry(this.createImageForCloudfrontInvalidation(id, scope, dockerFilepath).imageUri),
79
+ computeType: codebuild.ComputeType.SMALL,
80
+ privileged: true,
81
+ },
82
+ logging: {
83
+ cloudWatch: {
84
+ logGroup: scope.logManager.createLogGroup(`${id}-project-log-group`, scope, {
85
+ logGroupName: 'cloudfront-invalidation',
86
+ }),
87
+ enabled: true,
88
+ },
89
+ },
90
+ timeout: cdk.Duration.minutes(5),
91
+ });
92
+ }
93
+ }
94
+ exports.CodeBuildManager = CodeBuildManager;
95
+ //# sourceMappingURL=codebuild-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codebuild-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/codebuild-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAkC;AAClC,qEAAsD;AAGtD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,gBAAgB;IAC3B;;;;;OAKG;IACI,oCAAoC,CAAC,EAAU,EAAE,KAA6B,EAAE,cAAsB;QAC3G,OAAO,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,CAAC,CAAA;IACvF,CAAC;IAED;;;;;;;OAOG;IACI,sCAAsC,CAC3C,EAAU,EACV,KAA6B,EAC7B,cAAsB,EACtB,cAAsB,EACtB,KAAc;QAEd,MAAM,iBAAiB,GAAG,KAAK,IAAI,IAAI,CAAA;QACvC,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,uBAAuB,EAAE;YAChE,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,6BAA6B,CAAC,EAAE,EAAE,KAAK,CAAC;YAC/D,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC;gBACxC,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE;oBACN,KAAK,EAAE;wBACL,QAAQ,EAAE;4BACR,wDAAwD,cAAc,aAAa,iBAAiB,GAAG;yBACxG;qBACF;iBACF;aACF,CAAC;YACF,WAAW,EAAE;gBACX,UAAU,EAAE,SAAS,CAAC,eAAe,CAAC,kBAAkB,CACtD,IAAI,CAAC,oCAAoC,CAAC,EAAE,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,QAAQ,CAC9E;gBACD,WAAW,EAAE,SAAS,CAAC,WAAW,CAAC,KAAK;gBACxC,UAAU,EAAE,IAAI;aACjB;YACD,OAAO,EAAE;gBACP,UAAU,EAAE;oBACV,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE;wBAC1E,YAAY,EAAE,yBAAyB;qBACxC,CAAC;oBACF,OAAO,EAAE,IAAI;iBACd;aACF;YACD,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;SACjC,CAAC,CAAA;IACJ,CAAC;CACF;AAzDD,4CAyDC"}
@@ -0,0 +1,33 @@
1
+ import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
2
+ import * as common from '../../common';
3
+ import * as types from '../../types';
4
+ /**
5
+ * @stability stable
6
+ * @category cdk-utils.dynamodb-manager
7
+ * @subcategory Construct
8
+ * @classdesc Provides operations on AWS DynamoDB.
9
+ * - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
10
+ * - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
11
+ * @example
12
+ * import { CommonConstruct } from '@gradientedge/cdk-utils'
13
+ *
14
+ * class CustomConstruct extends CommonConstruct {
15
+ * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
16
+ * super(parent, id, props)
17
+ * this.props = props
18
+ * this.dynamodbManager.createTable('MyTable', this, tableProps)
19
+ * }
20
+ * }
21
+ *
22
+ * @see [CDK Certificate Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb-readme.html}
23
+ */
24
+ export declare class DynamodbManager {
25
+ /**
26
+ * @summary Method to create a table
27
+ * @param {string} id scoped id of the resource
28
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
29
+ * @param {types.TableProps} props table props
30
+ */
31
+ createTable(id: string, scope: common.CommonConstruct, props: types.TableProps): dynamodb.Table;
32
+ }
33
+ //# sourceMappingURL=dynamodb-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamodb-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/dynamodb-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AAGpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,eAAe;IAC1B;;;;;OAKG;IACI,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU;CA4BtF"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.DynamodbManager = void 0;
23
+ const dynamodb = __importStar(require("aws-cdk-lib/aws-dynamodb"));
24
+ const utils = __importStar(require("../../utils"));
25
+ /**
26
+ * @stability stable
27
+ * @category cdk-utils.dynamodb-manager
28
+ * @subcategory Construct
29
+ * @classdesc Provides operations on AWS DynamoDB.
30
+ * - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
31
+ * - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
32
+ * @example
33
+ * import { CommonConstruct } from '@gradientedge/cdk-utils'
34
+ *
35
+ * class CustomConstruct extends CommonConstruct {
36
+ * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
37
+ * super(parent, id, props)
38
+ * this.props = props
39
+ * this.dynamodbManager.createTable('MyTable', this, tableProps)
40
+ * }
41
+ * }
42
+ *
43
+ * @see [CDK Certificate Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb-readme.html}
44
+ */
45
+ class DynamodbManager {
46
+ /**
47
+ * @summary Method to create a table
48
+ * @param {string} id scoped id of the resource
49
+ * @param {common.CommonConstruct} scope scope in which this resource is defined
50
+ * @param {types.TableProps} props table props
51
+ */
52
+ createTable(id, scope, props) {
53
+ if (!props)
54
+ throw `Table props undefined`;
55
+ const table = new dynamodb.Table(scope, `${id}`, {
56
+ tableName: `${props.tableName}-${scope.props.stage}`,
57
+ partitionKey: props.partitionKey,
58
+ sortKey: props.sortKey,
59
+ kinesisStream: props.kinesisStream,
60
+ readCapacity: props.readCapacity,
61
+ writeCapacity: props.writeCapacity,
62
+ billingMode: props.billingMode,
63
+ pointInTimeRecovery: props.pointInTimeRecovery,
64
+ encryption: props.encryption,
65
+ encryptionKey: props.encryptionKey,
66
+ timeToLiveAttribute: props.timeToLiveAttribute,
67
+ stream: props.stream,
68
+ removalPolicy: props.removalPolicy,
69
+ replicationRegions: props.replicationRegions,
70
+ replicationTimeout: props.replicationTimeout,
71
+ waitForReplicationToFinish: props.waitForReplicationToFinish,
72
+ contributorInsightsEnabled: props.contributorInsightsEnabled,
73
+ });
74
+ utils.createCfnOutput(`${id}-tableName`, scope, table.tableName);
75
+ utils.createCfnOutput(`${id}-tableArn`, scope, table.tableArn);
76
+ return table;
77
+ }
78
+ }
79
+ exports.DynamodbManager = DynamodbManager;
80
+ //# sourceMappingURL=dynamodb-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamodb-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/dynamodb-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,mEAAoD;AAGpD,mDAAoC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,eAAe;IAC1B;;;;;OAKG;IACI,WAAW,CAAC,EAAU,EAAE,KAA6B,EAAE,KAAuB;QACnF,IAAI,CAAC,KAAK;YAAE,MAAM,uBAAuB,CAAA;QAEzC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YAC/C,SAAS,EAAE,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE;YACpD,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;YAC9C,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;YAC9C,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,kBAAkB,EAAE,KAAK,CAAC,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