@gradientedge/cdk-utils 4.4.2 → 4.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (449) hide show
  1. package/app/api-destined-function/package.json +1 -2
  2. package/lerna.json +6 -0
  3. package/package.json +7 -8
  4. package/api-docs/AcmManager.html +0 -622
  5. package/api-docs/AcmProps.html +0 -238
  6. package/api-docs/AlarmProps.html +0 -238
  7. package/api-docs/AlarmStatusWidgetProps.html +0 -238
  8. package/api-docs/ApiDestinationEvent.html +0 -297
  9. package/api-docs/ApiDestinationEventType.html +0 -238
  10. package/api-docs/ApiDestinedLambda.html +0 -297
  11. package/api-docs/ApiDestinedLambdaEnvironment.html +0 -238
  12. package/api-docs/ApiDestinedLambdaType.html +0 -238
  13. package/api-docs/ApiDestinedRestApi.html +0 -297
  14. package/api-docs/ApiDestinedRestApiType.html +0 -238
  15. package/api-docs/ApiManager.html +0 -766
  16. package/api-docs/ApiToEventBridgeTarget.html +0 -1877
  17. package/api-docs/ApiToEventBridgeTarget.jpg +0 -0
  18. package/api-docs/ApiToEventBridgeTargetEventProps.html +0 -238
  19. package/api-docs/ApiToEventBridgeTargetLambdaProps.html +0 -238
  20. package/api-docs/ApiToEventBridgeTargetProps.html +0 -238
  21. package/api-docs/ApiToEventBridgeTargetRestApiProps.html +0 -238
  22. package/api-docs/AppConfigManager.html +0 -1203
  23. package/api-docs/AppConfigProps.html +0 -238
  24. package/api-docs/CloudFrontManager.html +0 -2402
  25. package/api-docs/CloudFrontProps.html +0 -238
  26. package/api-docs/CloudTrailManager.html +0 -637
  27. package/api-docs/CloudTrailProps.html +0 -238
  28. package/api-docs/CloudWatchManager.html +0 -2986
  29. package/api-docs/CloudfrontFunctionProps.html +0 -238
  30. package/api-docs/CodeBuildManager.html +0 -736
  31. package/api-docs/CommonConstruct.html +0 -1299
  32. package/api-docs/CommonStack.html +0 -813
  33. package/api-docs/CommonStackProps.html +0 -238
  34. package/api-docs/DashboardProps.html +0 -238
  35. package/api-docs/DistributionProps.html +0 -238
  36. package/api-docs/DynamodbManager.html +0 -530
  37. package/api-docs/EcrManager.html +0 -530
  38. package/api-docs/EcsClusterProps.html +0 -238
  39. package/api-docs/EcsManager.html +0 -880
  40. package/api-docs/EcsTaskProps.html +0 -238
  41. package/api-docs/EksClusterProps.html +0 -238
  42. package/api-docs/EksManager.html +0 -580
  43. package/api-docs/EventBusProps.html +0 -238
  44. package/api-docs/EventManager.html +0 -1454
  45. package/api-docs/EventRuleProps.html +0 -238
  46. package/api-docs/GraphQLApiLambda.html +0 -1671
  47. package/api-docs/GraphQLApiLambda.jpg +0 -0
  48. package/api-docs/GraphQlApiLambdaEnvironment.html +0 -238
  49. package/api-docs/GraphQlApiLambdaProps.html +0 -238
  50. package/api-docs/GraphWidgetProps.html +0 -238
  51. package/api-docs/HealthCheck.html +0 -238
  52. package/api-docs/IamManager.html +0 -3821
  53. package/api-docs/LambdaEdgeProps.html +0 -238
  54. package/api-docs/LambdaEnvironment.html +0 -238
  55. package/api-docs/LambdaManager.html +0 -2378
  56. package/api-docs/LambdaProps.html +0 -238
  57. package/api-docs/LifecycleRule.html +0 -238
  58. package/api-docs/LogManager.html +0 -955
  59. package/api-docs/LogProps.html +0 -238
  60. package/api-docs/LogQueryWidgetProps.html +0 -238
  61. package/api-docs/MetricFilterProps.html +0 -238
  62. package/api-docs/MetricProps.html +0 -238
  63. package/api-docs/NumericWidgetProps.html +0 -238
  64. package/api-docs/Route53Manager.html +0 -1460
  65. package/api-docs/Route53Props.html +0 -238
  66. package/api-docs/RuleProps.html +0 -238
  67. package/api-docs/S3BucketProps.html +0 -238
  68. package/api-docs/S3Manager.html +0 -1546
  69. package/api-docs/SSMParameterReader.html +0 -431
  70. package/api-docs/SSMParameterReaderProps.html +0 -238
  71. package/api-docs/SecretsManager.html +0 -1140
  72. package/api-docs/SiteWithEcsBackend.html +0 -2391
  73. package/api-docs/SiteWithEcsBackendProps.html +0 -238
  74. package/api-docs/SnsManager.html +0 -780
  75. package/api-docs/SsmManager.html +0 -955
  76. package/api-docs/StaticSite.html +0 -1358
  77. package/api-docs/StaticSiteProps.html +0 -238
  78. package/api-docs/SubscriptionProps.html +0 -238
  79. package/api-docs/TableProps.html +0 -238
  80. package/api-docs/TextWidgetProps.html +0 -238
  81. package/api-docs/VpcManager.html +0 -986
  82. package/api-docs/WafIPSetProps.html +0 -238
  83. package/api-docs/WafManager.html +0 -730
  84. package/api-docs/WafWebACLProps.html +0 -238
  85. package/api-docs/common_construct.ts.html +0 -279
  86. package/api-docs/common_stack.ts.html +0 -303
  87. package/api-docs/construct_api-to-eventbridge-target_api-destination-event.ts.html +0 -175
  88. package/api-docs/construct_api-to-eventbridge-target_api-destined-lambda.ts.html +0 -178
  89. package/api-docs/construct_api-to-eventbridge-target_api-destined-rest-api.ts.html +0 -190
  90. package/api-docs/construct_api-to-eventbridge-target_main.ts.html +0 -751
  91. package/api-docs/construct_graphql-api-lambda_main.ts.html +0 -408
  92. package/api-docs/construct_site-with-ecs-backend_main.ts.html +0 -544
  93. package/api-docs/construct_static-site_main.ts.html +0 -374
  94. package/api-docs/global.html +0 -1530
  95. package/api-docs/index.html +0 -208
  96. package/api-docs/logo.png +0 -0
  97. package/api-docs/manager_aws_acm-manager.ts.html +0 -236
  98. package/api-docs/manager_aws_api-manager.ts.html +0 -260
  99. package/api-docs/manager_aws_app-config-manager.ts.html +0 -310
  100. package/api-docs/manager_aws_cloudfront-manager.ts.html +0 -491
  101. package/api-docs/manager_aws_cloudtrail-manager.ts.html +0 -251
  102. package/api-docs/manager_aws_cloudwatch-manager.ts.html +0 -553
  103. package/api-docs/manager_aws_codebuild-manager.ts.html +0 -240
  104. package/api-docs/manager_aws_dynamodb-manager.ts.html +0 -219
  105. package/api-docs/manager_aws_ecr-manager.ts.html +0 -199
  106. package/api-docs/manager_aws_ecs-manager.ts.html +0 -259
  107. package/api-docs/manager_aws_eks-manager.ts.html +0 -260
  108. package/api-docs/manager_aws_event-manager.ts.html +0 -336
  109. package/api-docs/manager_aws_iam-manager.ts.html +0 -573
  110. package/api-docs/manager_aws_lambda-manager.ts.html +0 -400
  111. package/api-docs/manager_aws_log-manager.ts.html +0 -259
  112. package/api-docs/manager_aws_route53-manager.ts.html +0 -333
  113. package/api-docs/manager_aws_s3-manager.ts.html +0 -361
  114. package/api-docs/manager_aws_secrets-manager.ts.html +0 -274
  115. package/api-docs/manager_aws_sns-manager.ts.html +0 -246
  116. package/api-docs/manager_aws_ssm-manager.ts.html +0 -273
  117. package/api-docs/manager_aws_vpc-manager.ts.html +0 -244
  118. package/api-docs/manager_aws_waf-manager.ts.html +0 -232
  119. package/api-docs/scripts/app.min.js +0 -1
  120. package/api-docs/scripts/linenumber.js +0 -26
  121. package/api-docs/scripts/search.js +0 -39
  122. package/api-docs/styles/app.min.css +0 -1
  123. package/api-docs/styles/iframe.css +0 -13
  124. package/api-docs/styles/prettify-jsdoc.css +0 -111
  125. package/api-docs/styles/prettify-tomorrow.css +0 -132
  126. package/api-docs/styles/reset.css +0 -44
  127. package/api-docs/styles.css +0 -113
  128. package/api-docs/tutorial-Architecture.html +0 -151
  129. package/api-docs/tutorial-Build.html +0 -150
  130. package/api-docs/tutorial-CI-CD.html +0 -154
  131. package/api-docs/tutorial-Development.html +0 -227
  132. package/api-docs/types_aws_index.ts.html +0 -665
  133. package/api-docs/utils_aws_index.ts.html +0 -192
  134. package/api-docs/utils_index.ts.html +0 -227
  135. package/app/api-destined-function/node_modules/uuid/dist/bin/uuid +0 -2
  136. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/index.js +0 -9
  137. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/md5.js +0 -215
  138. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/nil.js +0 -1
  139. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/parse.js +0 -35
  140. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/regex.js +0 -1
  141. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/rng.js +0 -19
  142. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
  143. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/stringify.js +0 -30
  144. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v1.js +0 -95
  145. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v3.js +0 -4
  146. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v35.js +0 -64
  147. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v4.js +0 -24
  148. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v5.js +0 -4
  149. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/validate.js +0 -7
  150. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/version.js +0 -11
  151. package/app/api-destined-function/node_modules/uuid/dist/esm-node/index.js +0 -9
  152. package/app/api-destined-function/node_modules/uuid/dist/esm-node/md5.js +0 -13
  153. package/app/api-destined-function/node_modules/uuid/dist/esm-node/nil.js +0 -1
  154. package/app/api-destined-function/node_modules/uuid/dist/esm-node/parse.js +0 -35
  155. package/app/api-destined-function/node_modules/uuid/dist/esm-node/regex.js +0 -1
  156. package/app/api-destined-function/node_modules/uuid/dist/esm-node/rng.js +0 -12
  157. package/app/api-destined-function/node_modules/uuid/dist/esm-node/sha1.js +0 -13
  158. package/app/api-destined-function/node_modules/uuid/dist/esm-node/stringify.js +0 -29
  159. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v1.js +0 -95
  160. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v3.js +0 -4
  161. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v35.js +0 -64
  162. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v4.js +0 -24
  163. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v5.js +0 -4
  164. package/app/api-destined-function/node_modules/uuid/dist/esm-node/validate.js +0 -7
  165. package/app/api-destined-function/node_modules/uuid/dist/esm-node/version.js +0 -11
  166. package/app/api-destined-function/node_modules/uuid/dist/index.js +0 -79
  167. package/app/api-destined-function/node_modules/uuid/dist/md5-browser.js +0 -223
  168. package/app/api-destined-function/node_modules/uuid/dist/md5.js +0 -23
  169. package/app/api-destined-function/node_modules/uuid/dist/nil.js +0 -8
  170. package/app/api-destined-function/node_modules/uuid/dist/parse.js +0 -45
  171. package/app/api-destined-function/node_modules/uuid/dist/regex.js +0 -8
  172. package/app/api-destined-function/node_modules/uuid/dist/rng-browser.js +0 -26
  173. package/app/api-destined-function/node_modules/uuid/dist/rng.js +0 -24
  174. package/app/api-destined-function/node_modules/uuid/dist/sha1-browser.js +0 -104
  175. package/app/api-destined-function/node_modules/uuid/dist/sha1.js +0 -23
  176. package/app/api-destined-function/node_modules/uuid/dist/stringify.js +0 -39
  177. package/app/api-destined-function/node_modules/uuid/dist/umd/uuid.min.js +0 -1
  178. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
  179. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
  180. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
  181. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
  182. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
  183. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
  184. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
  185. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
  186. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
  187. package/app/api-destined-function/node_modules/uuid/dist/uuid-bin.js +0 -85
  188. package/app/api-destined-function/node_modules/uuid/dist/v1.js +0 -107
  189. package/app/api-destined-function/node_modules/uuid/dist/v3.js +0 -16
  190. package/app/api-destined-function/node_modules/uuid/dist/v35.js +0 -78
  191. package/app/api-destined-function/node_modules/uuid/dist/v4.js +0 -37
  192. package/app/api-destined-function/node_modules/uuid/dist/v5.js +0 -16
  193. package/app/api-destined-function/node_modules/uuid/dist/validate.js +0 -17
  194. package/app/api-destined-function/node_modules/uuid/dist/version.js +0 -21
  195. package/dist/app/api-destined-function/layers/nodejs/node_modules/.bin/uuid +0 -2
  196. package/dist/app/api-destined-function/layers/nodejs/node_modules/.yarn-integrity +0 -109
  197. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/LICENSE +0 -21
  198. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/README.md +0 -16
  199. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.mts +0 -10
  200. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.ts +0 -80
  201. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/package.json +0 -54
  202. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/LICENSE.md +0 -9
  203. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/README.md +0 -505
  204. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/bin/uuid +0 -2
  205. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/index.js +0 -9
  206. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/md5.js +0 -215
  207. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/nil.js +0 -1
  208. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/parse.js +0 -35
  209. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/regex.js +0 -1
  210. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/rng.js +0 -19
  211. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
  212. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/stringify.js +0 -30
  213. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v1.js +0 -95
  214. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v3.js +0 -4
  215. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v35.js +0 -64
  216. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v4.js +0 -24
  217. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v5.js +0 -4
  218. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/validate.js +0 -7
  219. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/version.js +0 -11
  220. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/index.js +0 -9
  221. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/md5.js +0 -13
  222. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/nil.js +0 -1
  223. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/parse.js +0 -35
  224. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/regex.js +0 -1
  225. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/rng.js +0 -12
  226. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/sha1.js +0 -13
  227. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/stringify.js +0 -29
  228. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v1.js +0 -95
  229. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v3.js +0 -4
  230. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v35.js +0 -64
  231. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v4.js +0 -24
  232. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v5.js +0 -4
  233. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/validate.js +0 -7
  234. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/version.js +0 -11
  235. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/index.js +0 -79
  236. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5-browser.js +0 -223
  237. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5.js +0 -23
  238. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/nil.js +0 -8
  239. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/parse.js +0 -45
  240. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/regex.js +0 -8
  241. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng-browser.js +0 -26
  242. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng.js +0 -24
  243. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1-browser.js +0 -104
  244. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1.js +0 -23
  245. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/stringify.js +0 -39
  246. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuid.min.js +0 -1
  247. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
  248. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
  249. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
  250. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
  251. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
  252. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
  253. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
  254. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
  255. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
  256. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/uuid-bin.js +0 -85
  257. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v1.js +0 -107
  258. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v3.js +0 -16
  259. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v35.js +0 -78
  260. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v4.js +0 -37
  261. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v5.js +0 -16
  262. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/validate.js +0 -17
  263. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/version.js +0 -21
  264. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/package.json +0 -135
  265. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/wrapper.mjs +0 -10
  266. package/dist/app/api-destined-function/layers/nodejs/package.json +0 -30
  267. package/dist/app/api-destined-function/src/lib/lambda.d.ts +0 -19
  268. package/dist/app/api-destined-function/src/lib/lambda.d.ts.map +0 -1
  269. package/dist/app/api-destined-function/src/lib/lambda.js +0 -34
  270. package/dist/app/api-destined-function/src/lib/lambda.js.map +0 -1
  271. package/dist/index.d.ts +0 -6
  272. package/dist/index.d.ts.map +0 -1
  273. package/dist/index.js.map +0 -1
  274. package/dist/src/lib/common/construct.d.ts +0 -80
  275. package/dist/src/lib/common/construct.d.ts.map +0 -1
  276. package/dist/src/lib/common/construct.js +0 -134
  277. package/dist/src/lib/common/construct.js.map +0 -1
  278. package/dist/src/lib/common/index.d.ts +0 -3
  279. package/dist/src/lib/common/index.d.ts.map +0 -1
  280. package/dist/src/lib/common/index.js +0 -15
  281. package/dist/src/lib/common/index.js.map +0 -1
  282. package/dist/src/lib/common/stack.d.ts +0 -55
  283. package/dist/src/lib/common/stack.d.ts.map +0 -1
  284. package/dist/src/lib/common/stack.js +0 -148
  285. package/dist/src/lib/common/stack.js.map +0 -1
  286. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts +0 -17
  287. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts.map +0 -1
  288. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js +0 -18
  289. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js.map +0 -1
  290. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts +0 -20
  291. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts.map +0 -1
  292. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js +0 -20
  293. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js.map +0 -1
  294. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts +0 -36
  295. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts.map +0 -1
  296. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js +0 -30
  297. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js.map +0 -1
  298. package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts +0 -5
  299. package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts.map +0 -1
  300. package/dist/src/lib/construct/api-to-eventbridge-target/index.js +0 -17
  301. package/dist/src/lib/construct/api-to-eventbridge-target/index.js.map +0 -1
  302. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +0 -135
  303. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts.map +0 -1
  304. package/dist/src/lib/construct/api-to-eventbridge-target/main.js +0 -488
  305. package/dist/src/lib/construct/api-to-eventbridge-target/main.js.map +0 -1
  306. package/dist/src/lib/construct/graphql-api-lambda/index.d.ts +0 -2
  307. package/dist/src/lib/construct/graphql-api-lambda/index.d.ts.map +0 -1
  308. package/dist/src/lib/construct/graphql-api-lambda/index.js +0 -14
  309. package/dist/src/lib/construct/graphql-api-lambda/index.js.map +0 -1
  310. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +0 -113
  311. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts.map +0 -1
  312. package/dist/src/lib/construct/graphql-api-lambda/main.js +0 -202
  313. package/dist/src/lib/construct/graphql-api-lambda/main.js.map +0 -1
  314. package/dist/src/lib/construct/index.d.ts +0 -5
  315. package/dist/src/lib/construct/index.d.ts.map +0 -1
  316. package/dist/src/lib/construct/index.js +0 -17
  317. package/dist/src/lib/construct/index.js.map +0 -1
  318. package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts +0 -2
  319. package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts.map +0 -1
  320. package/dist/src/lib/construct/site-with-ecs-backend/index.js +0 -14
  321. package/dist/src/lib/construct/site-with-ecs-backend/index.js.map +0 -1
  322. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +0 -168
  323. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts.map +0 -1
  324. package/dist/src/lib/construct/site-with-ecs-backend/main.js +0 -328
  325. package/dist/src/lib/construct/site-with-ecs-backend/main.js.map +0 -1
  326. package/dist/src/lib/construct/static-site/index.d.ts +0 -2
  327. package/dist/src/lib/construct/static-site/index.d.ts.map +0 -1
  328. package/dist/src/lib/construct/static-site/index.js +0 -14
  329. package/dist/src/lib/construct/static-site/index.js.map +0 -1
  330. package/dist/src/lib/construct/static-site/main.d.ts +0 -95
  331. package/dist/src/lib/construct/static-site/main.d.ts.map +0 -1
  332. package/dist/src/lib/construct/static-site/main.js +0 -169
  333. package/dist/src/lib/construct/static-site/main.js.map +0 -1
  334. package/dist/src/lib/manager/aws/acm-manager.d.ts +0 -47
  335. package/dist/src/lib/manager/aws/acm-manager.d.ts.map +0 -1
  336. package/dist/src/lib/manager/aws/acm-manager.js +0 -91
  337. package/dist/src/lib/manager/aws/acm-manager.js.map +0 -1
  338. package/dist/src/lib/manager/aws/api-manager.d.ts +0 -44
  339. package/dist/src/lib/manager/aws/api-manager.d.ts.map +0 -1
  340. package/dist/src/lib/manager/aws/api-manager.js +0 -112
  341. package/dist/src/lib/manager/aws/api-manager.js.map +0 -1
  342. package/dist/src/lib/manager/aws/app-config-manager.d.ts +0 -66
  343. package/dist/src/lib/manager/aws/app-config-manager.d.ts.map +0 -1
  344. package/dist/src/lib/manager/aws/app-config-manager.js +0 -149
  345. package/dist/src/lib/manager/aws/app-config-manager.js.map +0 -1
  346. package/dist/src/lib/manager/aws/cloudfront-manager.d.ts +0 -113
  347. package/dist/src/lib/manager/aws/cloudfront-manager.d.ts.map +0 -1
  348. package/dist/src/lib/manager/aws/cloudfront-manager.js +0 -283
  349. package/dist/src/lib/manager/aws/cloudfront-manager.js.map +0 -1
  350. package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts +0 -49
  351. package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts.map +0 -1
  352. package/dist/src/lib/manager/aws/cloudtrail-manager.js +0 -100
  353. package/dist/src/lib/manager/aws/cloudtrail-manager.js.map +0 -1
  354. package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts +0 -122
  355. package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts.map +0 -1
  356. package/dist/src/lib/manager/aws/cloudwatch-manager.js +0 -353
  357. package/dist/src/lib/manager/aws/cloudwatch-manager.js.map +0 -1
  358. package/dist/src/lib/manager/aws/codebuild-manager.d.ts +0 -41
  359. package/dist/src/lib/manager/aws/codebuild-manager.d.ts.map +0 -1
  360. package/dist/src/lib/manager/aws/codebuild-manager.js +0 -95
  361. package/dist/src/lib/manager/aws/codebuild-manager.js.map +0 -1
  362. package/dist/src/lib/manager/aws/dynamodb-manager.d.ts +0 -33
  363. package/dist/src/lib/manager/aws/dynamodb-manager.d.ts.map +0 -1
  364. package/dist/src/lib/manager/aws/dynamodb-manager.js +0 -80
  365. package/dist/src/lib/manager/aws/dynamodb-manager.js.map +0 -1
  366. package/dist/src/lib/manager/aws/ecr-manager.d.ts +0 -32
  367. package/dist/src/lib/manager/aws/ecr-manager.d.ts.map +0 -1
  368. package/dist/src/lib/manager/aws/ecr-manager.js +0 -61
  369. package/dist/src/lib/manager/aws/ecr-manager.js.map +0 -1
  370. package/dist/src/lib/manager/aws/ecs-manager.d.ts +0 -49
  371. package/dist/src/lib/manager/aws/ecs-manager.d.ts.map +0 -1
  372. package/dist/src/lib/manager/aws/ecs-manager.js +0 -104
  373. package/dist/src/lib/manager/aws/ecs-manager.js.map +0 -1
  374. package/dist/src/lib/manager/aws/eks-manager.d.ts +0 -37
  375. package/dist/src/lib/manager/aws/eks-manager.d.ts.map +0 -1
  376. package/dist/src/lib/manager/aws/eks-manager.js +0 -110
  377. package/dist/src/lib/manager/aws/eks-manager.js.map +0 -1
  378. package/dist/src/lib/manager/aws/event-manager.d.ts +0 -68
  379. package/dist/src/lib/manager/aws/event-manager.d.ts.map +0 -1
  380. package/dist/src/lib/manager/aws/event-manager.js +0 -163
  381. package/dist/src/lib/manager/aws/event-manager.js.map +0 -1
  382. package/dist/src/lib/manager/aws/iam-manager.d.ts +0 -155
  383. package/dist/src/lib/manager/aws/iam-manager.d.ts.map +0 -1
  384. package/dist/src/lib/manager/aws/iam-manager.js +0 -381
  385. package/dist/src/lib/manager/aws/iam-manager.js.map +0 -1
  386. package/dist/src/lib/manager/aws/index.d.ts +0 -23
  387. package/dist/src/lib/manager/aws/index.d.ts.map +0 -1
  388. package/dist/src/lib/manager/aws/index.js +0 -35
  389. package/dist/src/lib/manager/aws/index.js.map +0 -1
  390. package/dist/src/lib/manager/aws/lambda-manager.d.ts +0 -95
  391. package/dist/src/lib/manager/aws/lambda-manager.d.ts.map +0 -1
  392. package/dist/src/lib/manager/aws/lambda-manager.js +0 -197
  393. package/dist/src/lib/manager/aws/lambda-manager.js.map +0 -1
  394. package/dist/src/lib/manager/aws/log-manager.d.ts +0 -52
  395. package/dist/src/lib/manager/aws/log-manager.d.ts.map +0 -1
  396. package/dist/src/lib/manager/aws/log-manager.js +0 -109
  397. package/dist/src/lib/manager/aws/log-manager.js.map +0 -1
  398. package/dist/src/lib/manager/aws/route53-manager.d.ts +0 -69
  399. package/dist/src/lib/manager/aws/route53-manager.d.ts.map +0 -1
  400. package/dist/src/lib/manager/aws/route53-manager.js +0 -159
  401. package/dist/src/lib/manager/aws/route53-manager.js.map +0 -1
  402. package/dist/src/lib/manager/aws/s3-manager.d.ts +0 -74
  403. package/dist/src/lib/manager/aws/s3-manager.d.ts.map +0 -1
  404. package/dist/src/lib/manager/aws/s3-manager.js +0 -203
  405. package/dist/src/lib/manager/aws/s3-manager.js.map +0 -1
  406. package/dist/src/lib/manager/aws/secrets-manager.d.ts +0 -58
  407. package/dist/src/lib/manager/aws/secrets-manager.d.ts.map +0 -1
  408. package/dist/src/lib/manager/aws/secrets-manager.js +0 -117
  409. package/dist/src/lib/manager/aws/secrets-manager.js.map +0 -1
  410. package/dist/src/lib/manager/aws/sns-manager.d.ts +0 -43
  411. package/dist/src/lib/manager/aws/sns-manager.d.ts.map +0 -1
  412. package/dist/src/lib/manager/aws/sns-manager.js +0 -91
  413. package/dist/src/lib/manager/aws/sns-manager.js.map +0 -1
  414. package/dist/src/lib/manager/aws/ssm-manager.d.ts +0 -61
  415. package/dist/src/lib/manager/aws/ssm-manager.d.ts.map +0 -1
  416. package/dist/src/lib/manager/aws/ssm-manager.js +0 -125
  417. package/dist/src/lib/manager/aws/ssm-manager.js.map +0 -1
  418. package/dist/src/lib/manager/aws/vpc-manager.d.ts +0 -46
  419. package/dist/src/lib/manager/aws/vpc-manager.d.ts.map +0 -1
  420. package/dist/src/lib/manager/aws/vpc-manager.js +0 -95
  421. package/dist/src/lib/manager/aws/vpc-manager.js.map +0 -1
  422. package/dist/src/lib/manager/aws/waf-manager.d.ts +0 -40
  423. package/dist/src/lib/manager/aws/waf-manager.d.ts.map +0 -1
  424. package/dist/src/lib/manager/aws/waf-manager.js +0 -90
  425. package/dist/src/lib/manager/aws/waf-manager.js.map +0 -1
  426. package/dist/src/lib/manager/index.d.ts +0 -2
  427. package/dist/src/lib/manager/index.d.ts.map +0 -1
  428. package/dist/src/lib/manager/index.js +0 -14
  429. package/dist/src/lib/manager/index.js.map +0 -1
  430. package/dist/src/lib/types/aws/index.d.ts +0 -480
  431. package/dist/src/lib/types/aws/index.d.ts.map +0 -1
  432. package/dist/src/lib/types/aws/index.js +0 -3
  433. package/dist/src/lib/types/aws/index.js.map +0 -1
  434. package/dist/src/lib/types/index.d.ts +0 -2
  435. package/dist/src/lib/types/index.d.ts.map +0 -1
  436. package/dist/src/lib/types/index.js +0 -14
  437. package/dist/src/lib/types/index.js.map +0 -1
  438. package/dist/src/lib/utils/aws/index.d.ts +0 -16
  439. package/dist/src/lib/utils/aws/index.d.ts.map +0 -1
  440. package/dist/src/lib/utils/aws/index.js +0 -50
  441. package/dist/src/lib/utils/aws/index.js.map +0 -1
  442. package/dist/src/lib/utils/index.d.ts +0 -63
  443. package/dist/src/lib/utils/index.d.ts.map +0 -1
  444. package/dist/src/lib/utils/index.js +0 -85
  445. package/dist/src/lib/utils/index.js.map +0 -1
  446. package/img/ApiToEventBridgeTarget.jpg +0 -0
  447. package/img/GraphQLApiLambda.jpg +0 -0
  448. package/img/logo.png +0 -0
  449. package/theme/styles.css +0 -113
@@ -1,353 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloudwatch-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/cloudwatch-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;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AG,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"}
@@ -1,41 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,95 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,33 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,80 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamodb-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/dynamodb-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;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