@gradientedge/cdk-utils 8.91.0 → 8.92.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 (223) hide show
  1. package/.eslintrc.json +40 -0
  2. package/app/api-destined-function/src/lib/lambda.ts +6 -6
  3. package/dist/app/api-destined-function/src/lib/lambda.d.ts +6 -6
  4. package/dist/app/api-destined-function/src/lib/lambda.js +6 -6
  5. package/dist/lib/lambda.d.ts +6 -6
  6. package/dist/lib/lambda.js +6 -6
  7. package/dist/lib/lambda.js.map +1 -1
  8. package/dist/src/lib/common/construct.d.ts +4 -7
  9. package/dist/src/lib/common/construct.js +4 -7
  10. package/dist/src/lib/common/stack.d.ts +9 -13
  11. package/dist/src/lib/common/stack.js +9 -13
  12. package/dist/src/lib/common/types.d.ts +0 -2
  13. package/dist/src/lib/construct/api-to-eventbridge-target/api.d.ts +0 -3
  14. package/dist/src/lib/construct/api-to-eventbridge-target/api.js +0 -3
  15. package/dist/src/lib/construct/api-to-eventbridge-target/event.d.ts +0 -3
  16. package/dist/src/lib/construct/api-to-eventbridge-target/event.js +0 -3
  17. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +0 -27
  18. package/dist/src/lib/construct/api-to-eventbridge-target/main.js +41 -68
  19. package/dist/src/lib/construct/api-to-eventbridge-target/types.d.ts +13 -25
  20. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +0 -3
  21. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.js +0 -3
  22. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +0 -37
  23. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +44 -81
  24. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/types.d.ts +1 -5
  25. package/dist/src/lib/construct/api-to-lambda-target/api.d.ts +0 -3
  26. package/dist/src/lib/construct/api-to-lambda-target/api.js +0 -3
  27. package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +0 -14
  28. package/dist/src/lib/construct/api-to-lambda-target/main.js +7 -21
  29. package/dist/src/lib/construct/api-to-lambda-target/types.d.ts +7 -13
  30. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +0 -18
  31. package/dist/src/lib/construct/graphql-api-lambda/main.js +1 -19
  32. package/dist/src/lib/construct/graphql-api-lambda/types.d.ts +4 -8
  33. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +0 -11
  34. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +1 -12
  35. package/dist/src/lib/construct/graphql-api-lambda-with-cache/types.d.ts +1 -3
  36. package/dist/src/lib/construct/lambda-with-iam-access/main.d.ts +0 -12
  37. package/dist/src/lib/construct/lambda-with-iam-access/main.js +2 -14
  38. package/dist/src/lib/construct/rest-api-lambda/main.d.ts +0 -18
  39. package/dist/src/lib/construct/rest-api-lambda/main.js +1 -19
  40. package/dist/src/lib/construct/rest-api-lambda/types.d.ts +6 -10
  41. package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +0 -11
  42. package/dist/src/lib/construct/rest-api-lambda-with-cache/main.js +3 -14
  43. package/dist/src/lib/construct/rest-api-lambda-with-cache/types.d.ts +1 -3
  44. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +0 -25
  45. package/dist/src/lib/construct/site-with-ecs-backend/main.js +32 -52
  46. package/dist/src/lib/construct/site-with-ecs-backend/types.d.ts +10 -11
  47. package/dist/src/lib/construct/static-asset-deployment/main.d.ts +0 -8
  48. package/dist/src/lib/construct/static-asset-deployment/main.js +0 -8
  49. package/dist/src/lib/construct/static-asset-deployment/types.d.ts +1 -1
  50. package/dist/src/lib/construct/static-site/main.d.ts +0 -17
  51. package/dist/src/lib/construct/static-site/main.js +1 -18
  52. package/dist/src/lib/construct/static-site/types.d.ts +9 -11
  53. package/dist/src/lib/services/aws/api-gateway/main.d.ts +21 -25
  54. package/dist/src/lib/services/aws/api-gateway/main.js +42 -46
  55. package/dist/src/lib/services/aws/api-gateway/types.d.ts +0 -2
  56. package/dist/src/lib/services/aws/appconfig/constants.d.ts +0 -6
  57. package/dist/src/lib/services/aws/appconfig/constants.js +26 -32
  58. package/dist/src/lib/services/aws/appconfig/main.d.ts +16 -19
  59. package/dist/src/lib/services/aws/appconfig/main.js +19 -22
  60. package/dist/src/lib/services/aws/appconfig/types.d.ts +1 -3
  61. package/dist/src/lib/services/aws/certificate-manager/main.d.ts +5 -10
  62. package/dist/src/lib/services/aws/certificate-manager/main.js +5 -10
  63. package/dist/src/lib/services/aws/certificate-manager/types.d.ts +3 -5
  64. package/dist/src/lib/services/aws/cloudfront/main.d.ts +41 -47
  65. package/dist/src/lib/services/aws/cloudfront/main.js +56 -62
  66. package/dist/src/lib/services/aws/cloudfront/types.d.ts +1 -7
  67. package/dist/src/lib/services/aws/cloudtrail/main.d.ts +8 -12
  68. package/dist/src/lib/services/aws/cloudtrail/main.js +8 -12
  69. package/dist/src/lib/services/aws/cloudtrail/types.d.ts +0 -2
  70. package/dist/src/lib/services/aws/cloudwatch/logs.d.ts +11 -15
  71. package/dist/src/lib/services/aws/cloudwatch/logs.js +15 -19
  72. package/dist/src/lib/services/aws/cloudwatch/main.d.ts +80 -84
  73. package/dist/src/lib/services/aws/cloudwatch/main.js +116 -122
  74. package/dist/src/lib/services/aws/cloudwatch/types.d.ts +20 -42
  75. package/dist/src/lib/services/aws/codebuild/main.d.ts +0 -4
  76. package/dist/src/lib/services/aws/codebuild/main.js +3 -7
  77. package/dist/src/lib/services/aws/dynamodb/main.d.ts +3 -7
  78. package/dist/src/lib/services/aws/dynamodb/main.js +13 -17
  79. package/dist/src/lib/services/aws/dynamodb/types.d.ts +0 -2
  80. package/dist/src/lib/services/aws/elastic-container-registry/main.d.ts +3 -7
  81. package/dist/src/lib/services/aws/elastic-container-registry/main.js +3 -7
  82. package/dist/src/lib/services/aws/elastic-container-service/main.d.ts +19 -23
  83. package/dist/src/lib/services/aws/elastic-container-service/main.js +35 -39
  84. package/dist/src/lib/services/aws/elastic-container-service/types.d.ts +1 -9
  85. package/dist/src/lib/services/aws/elastic-file-system/main.d.ts +9 -13
  86. package/dist/src/lib/services/aws/elastic-file-system/main.js +14 -18
  87. package/dist/src/lib/services/aws/elastic-file-system/types.d.ts +1 -5
  88. package/dist/src/lib/services/aws/elastic-kubernetes-service/main.d.ts +5 -9
  89. package/dist/src/lib/services/aws/elastic-kubernetes-service/main.js +8 -12
  90. package/dist/src/lib/services/aws/elastic-kubernetes-service/types.d.ts +1 -3
  91. package/dist/src/lib/services/aws/elasticache/main.d.ts +14 -18
  92. package/dist/src/lib/services/aws/elasticache/main.js +35 -39
  93. package/dist/src/lib/services/aws/elasticache/types.d.ts +0 -4
  94. package/dist/src/lib/services/aws/eventbridge/main.d.ts +25 -29
  95. package/dist/src/lib/services/aws/eventbridge/main.js +34 -38
  96. package/dist/src/lib/services/aws/eventbridge/target.d.ts +6 -9
  97. package/dist/src/lib/services/aws/eventbridge/target.js +8 -10
  98. package/dist/src/lib/services/aws/eventbridge/types.d.ts +2 -10
  99. package/dist/src/lib/services/aws/evidently/main.d.ts +15 -19
  100. package/dist/src/lib/services/aws/evidently/main.js +19 -23
  101. package/dist/src/lib/services/aws/evidently/types.d.ts +0 -10
  102. package/dist/src/lib/services/aws/identity-access-management/main.d.ts +66 -70
  103. package/dist/src/lib/services/aws/identity-access-management/main.js +97 -101
  104. package/dist/src/lib/services/aws/key-management-service/main.d.ts +3 -7
  105. package/dist/src/lib/services/aws/key-management-service/main.js +6 -10
  106. package/dist/src/lib/services/aws/key-management-service/types.d.ts +0 -2
  107. package/dist/src/lib/services/aws/lambda/main.d.ts +42 -47
  108. package/dist/src/lib/services/aws/lambda/main.js +64 -69
  109. package/dist/src/lib/services/aws/lambda/types.d.ts +6 -16
  110. package/dist/src/lib/services/aws/route53/main.d.ts +17 -21
  111. package/dist/src/lib/services/aws/route53/main.js +19 -23
  112. package/dist/src/lib/services/aws/route53/types.d.ts +0 -2
  113. package/dist/src/lib/services/aws/secrets-manager/main.d.ts +6 -19
  114. package/dist/src/lib/services/aws/secrets-manager/main.js +6 -25
  115. package/dist/src/lib/services/aws/simple-notification-service/main.d.ts +8 -12
  116. package/dist/src/lib/services/aws/simple-notification-service/main.js +10 -14
  117. package/dist/src/lib/services/aws/simple-notification-service/types.d.ts +0 -2
  118. package/dist/src/lib/services/aws/simple-queue-service/main.d.ts +11 -15
  119. package/dist/src/lib/services/aws/simple-queue-service/main.js +19 -23
  120. package/dist/src/lib/services/aws/simple-queue-service/types.d.ts +4 -6
  121. package/dist/src/lib/services/aws/simple-storage-service/main.d.ts +24 -32
  122. package/dist/src/lib/services/aws/simple-storage-service/main.js +32 -40
  123. package/dist/src/lib/services/aws/simple-storage-service/types.d.ts +2 -8
  124. package/dist/src/lib/services/aws/step-function/main.d.ts +55 -59
  125. package/dist/src/lib/services/aws/step-function/main.js +91 -95
  126. package/dist/src/lib/services/aws/step-function/types.d.ts +0 -32
  127. package/dist/src/lib/services/aws/systems-manager/main.d.ts +10 -16
  128. package/dist/src/lib/services/aws/systems-manager/main.js +13 -19
  129. package/dist/src/lib/services/aws/systems-manager/types.d.ts +0 -2
  130. package/dist/src/lib/services/aws/virtual-private-cloud/main.d.ts +9 -12
  131. package/dist/src/lib/services/aws/virtual-private-cloud/main.js +10 -16
  132. package/dist/src/lib/services/aws/web-application-firewall/main.d.ts +6 -10
  133. package/dist/src/lib/services/aws/web-application-firewall/main.js +12 -16
  134. package/dist/src/lib/services/aws/web-application-firewall/types.d.ts +0 -4
  135. package/dist/src/lib/types/aws/index.d.ts +0 -2
  136. package/dist/src/lib/utils/aws/index.d.ts +6 -9
  137. package/dist/src/lib/utils/aws/index.js +7 -10
  138. package/dist/src/lib/utils/index.d.ts +6 -13
  139. package/dist/src/lib/utils/index.js +4 -12
  140. package/package.json +1 -1
  141. package/src/lib/common/construct.ts +4 -7
  142. package/src/lib/common/stack.ts +9 -13
  143. package/src/lib/common/types.ts +0 -2
  144. package/src/lib/construct/api-to-eventbridge-target/api.ts +0 -3
  145. package/src/lib/construct/api-to-eventbridge-target/event.ts +0 -3
  146. package/src/lib/construct/api-to-eventbridge-target/main.ts +41 -68
  147. package/src/lib/construct/api-to-eventbridge-target/types.ts +13 -25
  148. package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +0 -3
  149. package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +44 -81
  150. package/src/lib/construct/api-to-eventbridge-target-with-sns/types.ts +1 -5
  151. package/src/lib/construct/api-to-lambda-target/api.ts +0 -3
  152. package/src/lib/construct/api-to-lambda-target/main.ts +7 -21
  153. package/src/lib/construct/api-to-lambda-target/types.ts +7 -13
  154. package/src/lib/construct/graphql-api-lambda/main.ts +1 -19
  155. package/src/lib/construct/graphql-api-lambda/types.ts +4 -8
  156. package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +1 -12
  157. package/src/lib/construct/graphql-api-lambda-with-cache/types.ts +1 -3
  158. package/src/lib/construct/lambda-with-iam-access/main.ts +2 -14
  159. package/src/lib/construct/rest-api-lambda/main.ts +1 -19
  160. package/src/lib/construct/rest-api-lambda/types.ts +6 -10
  161. package/src/lib/construct/rest-api-lambda-with-cache/main.ts +3 -14
  162. package/src/lib/construct/rest-api-lambda-with-cache/types.ts +1 -3
  163. package/src/lib/construct/site-with-ecs-backend/main.ts +31 -52
  164. package/src/lib/construct/site-with-ecs-backend/types.ts +10 -11
  165. package/src/lib/construct/static-asset-deployment/main.ts +0 -8
  166. package/src/lib/construct/static-asset-deployment/types.ts +1 -1
  167. package/src/lib/construct/static-site/main.ts +1 -18
  168. package/src/lib/construct/static-site/types.ts +9 -11
  169. package/src/lib/services/aws/api-gateway/main.ts +43 -47
  170. package/src/lib/services/aws/api-gateway/types.ts +0 -2
  171. package/src/lib/services/aws/appconfig/constants.ts +26 -32
  172. package/src/lib/services/aws/appconfig/main.ts +19 -22
  173. package/src/lib/services/aws/appconfig/types.ts +1 -3
  174. package/src/lib/services/aws/certificate-manager/main.ts +5 -10
  175. package/src/lib/services/aws/certificate-manager/types.ts +3 -5
  176. package/src/lib/services/aws/cloudfront/main.ts +56 -62
  177. package/src/lib/services/aws/cloudfront/types.ts +1 -7
  178. package/src/lib/services/aws/cloudtrail/main.ts +8 -12
  179. package/src/lib/services/aws/cloudtrail/types.ts +0 -2
  180. package/src/lib/services/aws/cloudwatch/logs.ts +15 -19
  181. package/src/lib/services/aws/cloudwatch/main.ts +116 -122
  182. package/src/lib/services/aws/cloudwatch/types.ts +20 -42
  183. package/src/lib/services/aws/codebuild/main.ts +3 -7
  184. package/src/lib/services/aws/dynamodb/main.ts +13 -17
  185. package/src/lib/services/aws/dynamodb/types.ts +0 -2
  186. package/src/lib/services/aws/elastic-container-registry/main.ts +3 -7
  187. package/src/lib/services/aws/elastic-container-service/main.ts +35 -39
  188. package/src/lib/services/aws/elastic-container-service/types.ts +1 -9
  189. package/src/lib/services/aws/elastic-file-system/main.ts +14 -18
  190. package/src/lib/services/aws/elastic-file-system/types.ts +1 -5
  191. package/src/lib/services/aws/elastic-kubernetes-service/main.ts +8 -12
  192. package/src/lib/services/aws/elastic-kubernetes-service/types.ts +1 -3
  193. package/src/lib/services/aws/elasticache/main.ts +35 -39
  194. package/src/lib/services/aws/elasticache/types.ts +0 -4
  195. package/src/lib/services/aws/eventbridge/main.ts +34 -38
  196. package/src/lib/services/aws/eventbridge/target.ts +8 -11
  197. package/src/lib/services/aws/eventbridge/types.ts +2 -10
  198. package/src/lib/services/aws/evidently/main.ts +19 -23
  199. package/src/lib/services/aws/evidently/types.ts +0 -10
  200. package/src/lib/services/aws/identity-access-management/main.ts +97 -101
  201. package/src/lib/services/aws/key-management-service/main.ts +6 -10
  202. package/src/lib/services/aws/key-management-service/types.ts +0 -2
  203. package/src/lib/services/aws/lambda/main.ts +64 -69
  204. package/src/lib/services/aws/lambda/types.ts +6 -16
  205. package/src/lib/services/aws/route53/main.ts +19 -23
  206. package/src/lib/services/aws/route53/types.ts +0 -2
  207. package/src/lib/services/aws/secrets-manager/main.ts +6 -28
  208. package/src/lib/services/aws/simple-notification-service/main.ts +10 -14
  209. package/src/lib/services/aws/simple-notification-service/types.ts +0 -2
  210. package/src/lib/services/aws/simple-queue-service/main.ts +19 -23
  211. package/src/lib/services/aws/simple-queue-service/types.ts +4 -6
  212. package/src/lib/services/aws/simple-storage-service/main.ts +32 -40
  213. package/src/lib/services/aws/simple-storage-service/types.ts +2 -8
  214. package/src/lib/services/aws/step-function/main.ts +91 -95
  215. package/src/lib/services/aws/step-function/types.ts +0 -32
  216. package/src/lib/services/aws/systems-manager/main.ts +13 -19
  217. package/src/lib/services/aws/systems-manager/types.ts +0 -2
  218. package/src/lib/services/aws/virtual-private-cloud/main.ts +10 -16
  219. package/src/lib/services/aws/web-application-firewall/main.ts +12 -16
  220. package/src/lib/services/aws/web-application-firewall/types.ts +0 -4
  221. package/src/lib/types/aws/index.ts +0 -2
  222. package/src/lib/utils/aws/index.ts +7 -10
  223. package/src/lib/utils/index.ts +4 -12
@@ -3,9 +3,6 @@ import * as cdk from 'aws-cdk-lib';
3
3
  import * as secretsManager from 'aws-cdk-lib/aws-secretsmanager';
4
4
  import { CommonConstruct } from '../../../common';
5
5
  /**
6
- * @stability experimental
7
- * @category cdk-utils.secrets-manager
8
- * @subcategory Construct
9
6
  * @classdesc Provides operations on AWS Secrets Manager.
10
7
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
11
8
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -19,31 +16,21 @@ import { CommonConstruct } from '../../../common';
19
16
  * this.secretsManager.loadSecret('MySecretName', 'eu-west-1')
20
17
  * }
21
18
  * }
22
- *
23
19
  * @see [CDK Secrets Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager-readme.html}
24
20
  */
25
21
  export declare class SecretsManager {
26
22
  /**
27
23
  *
28
- * @param {string} region
24
+ * @param region
29
25
  */
30
26
  getAwsSecretsManager(region: string): SM;
31
27
  /**
32
- * @stability experimental
33
28
  * @summary Method to load a secret from secrets manager
34
- * @param {string} secretName
35
- * @param {string} region
29
+ * @param secretName
30
+ * @param region
36
31
  */
37
32
  loadSecret(secretName: string, region: string): Promise<any>;
38
33
  /**
39
- * @stability experimental
40
- * @summary Method to load secrets from secrets manager
41
- * @param {string} secretNames
42
- * @param {string} region
43
- */
44
- loadSecrets(secretNames: string, region: string): Promise<{}>;
45
- /**
46
- * @stability stable
47
34
  * @summary Method to retrieve a secret from secrets manager with a cloudformation export
48
35
  * @param id
49
36
  * @param scope
@@ -53,9 +40,9 @@ export declare class SecretsManager {
53
40
  retrieveSecretFromSecretsManager(id: string, scope: CommonConstruct, stackName: string, exportName: string): cdk.aws_secretsmanager.ISecret;
54
41
  /**
55
42
  * @summary Method to create a secret
56
- * @param {string} id scoped id of the resource
57
- * @param {CommonConstruct} scope scope in which this resource is defined
58
- * @param {secretsManager.SecretProps} props the secret properties
43
+ * @param id scoped id of the resource
44
+ * @param scope scope in which this resource is defined
45
+ * @param props the secret properties
59
46
  */
60
47
  createSecret(id: string, scope: CommonConstruct, props: secretsManager.SecretProps): cdk.aws_secretsmanager.Secret;
61
48
  }
@@ -29,9 +29,6 @@ const cdk = __importStar(require("aws-cdk-lib"));
29
29
  const secretsManager = __importStar(require("aws-cdk-lib/aws-secretsmanager"));
30
30
  const utils = __importStar(require("../../../utils"));
31
31
  /**
32
- * @stability experimental
33
- * @category cdk-utils.secrets-manager
34
- * @subcategory Construct
35
32
  * @classdesc Provides operations on AWS Secrets Manager.
36
33
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
37
34
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -45,22 +42,20 @@ const utils = __importStar(require("../../../utils"));
45
42
  * this.secretsManager.loadSecret('MySecretName', 'eu-west-1')
46
43
  * }
47
44
  * }
48
- *
49
45
  * @see [CDK Secrets Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager-readme.html}
50
46
  */
51
47
  class SecretsManager {
52
48
  /**
53
49
  *
54
- * @param {string} region
50
+ * @param region
55
51
  */
56
52
  getAwsSecretsManager(region) {
57
53
  return new client_secrets_manager_1.SecretsManager({ region: region });
58
54
  }
59
55
  /**
60
- * @stability experimental
61
56
  * @summary Method to load a secret from secrets manager
62
- * @param {string} secretName
63
- * @param {string} region
57
+ * @param secretName
58
+ * @param region
64
59
  */
65
60
  async loadSecret(secretName, region) {
66
61
  const secretsManager = this.getAwsSecretsManager(region);
@@ -68,20 +63,6 @@ class SecretsManager {
68
63
  return secret ? JSON.parse(secret[0].SecretString) : {};
69
64
  }
70
65
  /**
71
- * @stability experimental
72
- * @summary Method to load secrets from secrets manager
73
- * @param {string} secretNames
74
- * @param {string} region
75
- */
76
- async loadSecrets(secretNames, region) {
77
- let secrets = {};
78
- for (const secretName of secretNames.split(',')) {
79
- secrets = { ...secrets, ...(await this.loadSecret(secretName, region)) };
80
- }
81
- return secrets;
82
- }
83
- /**
84
- * @stability stable
85
66
  * @summary Method to retrieve a secret from secrets manager with a cloudformation export
86
67
  * @param id
87
68
  * @param scope
@@ -93,9 +74,9 @@ class SecretsManager {
93
74
  }
94
75
  /**
95
76
  * @summary Method to create a secret
96
- * @param {string} id scoped id of the resource
97
- * @param {CommonConstruct} scope scope in which this resource is defined
98
- * @param {secretsManager.SecretProps} props the secret properties
77
+ * @param id scoped id of the resource
78
+ * @param scope scope in which this resource is defined
79
+ * @param props the secret properties
99
80
  */
100
81
  createSecret(id, scope, props) {
101
82
  const secret = new secretsManager.Secret(scope, `${id}`, {
@@ -3,9 +3,6 @@ import * as sns from 'aws-cdk-lib/aws-sns';
3
3
  import { CommonConstruct } from '../../../common';
4
4
  import { SubscriptionProps } from './types';
5
5
  /**
6
- * @stability stable
7
- * @category cdk-utils.sns-manager
8
- * @subcategory Construct
9
6
  * @classdesc Provides operations on AWS Simple Notification Service.
10
7
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
11
8
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -19,24 +16,23 @@ import { SubscriptionProps } from './types';
19
16
  * this.snsManager.createEmailNotificationService('MySns', 'eu-west-1', ["test@example.com"])
20
17
  * }
21
18
  * }
22
- *
23
19
  * @see [CDK Simple Notification Service Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sns-readme.html}
24
20
  */
25
21
  export declare class SnsManager {
26
22
  /**
27
23
  * @summary Method to create an email notification service
28
- * @param {string} id scoped id of the resource
29
- * @param {CommonConstruct} scope scope in which this resource is defined
30
- * @param {SubscriptionProps} props
31
- * @param {string[]} emails
24
+ * @param id scoped id of the resource
25
+ * @param scope scope in which this resource is defined
26
+ * @param props
27
+ * @param emails
32
28
  */
33
29
  createEmailNotificationService(id: string, scope: CommonConstruct, props: SubscriptionProps, emails: string[]): sns.Topic;
34
30
  /**
35
31
  * @summary Method to create a lambda notification service
36
- * @param {string} id scoped id of the resource
37
- * @param {CommonConstruct} scope scope in which this resource is defined
38
- * @param {SubscriptionProps} props
39
- * @param {lambda.IFunction} lambdaFunction
32
+ * @param id scoped id of the resource
33
+ * @param scope scope in which this resource is defined
34
+ * @param props
35
+ * @param lambdaFunction
40
36
  */
41
37
  createLambdaNotificationService(id: string, scope: CommonConstruct, props: SubscriptionProps, lambdaFunction: lambda.IFunction): sns.Topic;
42
38
  }
@@ -28,9 +28,6 @@ const sns = __importStar(require("aws-cdk-lib/aws-sns"));
28
28
  const subs = __importStar(require("aws-cdk-lib/aws-sns-subscriptions"));
29
29
  const utils = __importStar(require("../../../utils"));
30
30
  /**
31
- * @stability stable
32
- * @category cdk-utils.sns-manager
33
- * @subcategory Construct
34
31
  * @classdesc Provides operations on AWS Simple Notification Service.
35
32
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
36
33
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -44,24 +41,23 @@ const utils = __importStar(require("../../../utils"));
44
41
  * this.snsManager.createEmailNotificationService('MySns', 'eu-west-1', ["test@example.com"])
45
42
  * }
46
43
  * }
47
- *
48
44
  * @see [CDK Simple Notification Service Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sns-readme.html}
49
45
  */
50
46
  class SnsManager {
51
47
  /**
52
48
  * @summary Method to create an email notification service
53
- * @param {string} id scoped id of the resource
54
- * @param {CommonConstruct} scope scope in which this resource is defined
55
- * @param {SubscriptionProps} props
56
- * @param {string[]} emails
49
+ * @param id scoped id of the resource
50
+ * @param scope scope in which this resource is defined
51
+ * @param props
52
+ * @param emails
57
53
  */
58
54
  createEmailNotificationService(id, scope, props, emails) {
59
55
  if (!props)
60
56
  throw `Subscription props undefined for ${id}`;
61
57
  const topic = new sns.Topic(scope, id, {
62
58
  displayName: `${props.topicName}-${scope.props.stage}`,
63
- topicName: `${props.topicName}-${scope.props.stage}`,
64
59
  fifo: props.fifo,
60
+ topicName: `${props.topicName}-${scope.props.stage}`,
65
61
  });
66
62
  if (emails && emails.length > 0) {
67
63
  emails.forEach((email) => topic.addSubscription(new subs.EmailSubscription(email)));
@@ -72,18 +68,18 @@ class SnsManager {
72
68
  }
73
69
  /**
74
70
  * @summary Method to create a lambda notification service
75
- * @param {string} id scoped id of the resource
76
- * @param {CommonConstruct} scope scope in which this resource is defined
77
- * @param {SubscriptionProps} props
78
- * @param {lambda.IFunction} lambdaFunction
71
+ * @param id scoped id of the resource
72
+ * @param scope scope in which this resource is defined
73
+ * @param props
74
+ * @param lambdaFunction
79
75
  */
80
76
  createLambdaNotificationService(id, scope, props, lambdaFunction) {
81
77
  if (!props)
82
78
  throw `Subscription props undefined for ${id}`;
83
79
  const topic = new sns.Topic(scope, id, {
84
80
  displayName: `${props.topicName}-${scope.props.stage}`,
85
- topicName: `${props.topicName}-${scope.props.stage}`,
86
81
  fifo: props.fifo,
82
+ topicName: `${props.topicName}-${scope.props.stage}`,
87
83
  });
88
84
  topic.addSubscription(new subs.LambdaSubscription(lambdaFunction));
89
85
  utils.createCfnOutput(`${id}-subscriptionArn`, scope, topic.topicArn);
@@ -1,7 +1,5 @@
1
1
  import { TopicProps } from 'aws-cdk-lib/aws-sns';
2
2
  /**
3
- * @category cdk-utils.sns-manager
4
- * @subcategory Properties
5
3
  */
6
4
  export interface SubscriptionProps extends TopicProps {
7
5
  }
@@ -4,9 +4,6 @@ import { CommonConstruct } from '../../../common';
4
4
  import { QueueProps } from './types';
5
5
  import { LambdaProps } from '../lambda';
6
6
  /**
7
- * @stability stable
8
- * @category cdk-utils.sqs-manager
9
- * @subcategory Construct
10
7
  * @classdesc Provides operations on AWS Simple Queue Service.
11
8
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
12
9
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -20,31 +17,30 @@ import { LambdaProps } from '../lambda';
20
17
  * this.sqsManager.createQueue('MySqs', this, {...})
21
18
  * }
22
19
  * }
23
- *
24
20
  * @see [CDK Simple Queue Service Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs-readme.html}
25
21
  */
26
22
  export declare class SqsManager {
27
23
  /**
28
24
  * @summary Method to create a lambda queue service
29
- * @param {string} id scoped id of the resource
30
- * @param {CommonConstruct} scope scope in which this resource is defined
31
- * @param {QueueProps} props
32
- * @param {sqs.IQueue} deadLetterQueue
25
+ * @param id scoped id of the resource
26
+ * @param scope scope in which this resource is defined
27
+ * @param props
28
+ * @param deadLetterQueue
33
29
  */
34
30
  createQueue(id: string, scope: CommonConstruct, props: QueueProps, deadLetterQueue?: sqs.IQueue): cdk.aws_sqs.Queue;
35
31
  /**
36
32
  * @summary Method to create a redrive queue for a lambda function
37
- * @param {string} id scoped id of the resource
38
- * @param {CommonConstruct} scope scope in which this resource is defined
39
- * @param {LambdaProps} props the lambda properties
33
+ * @param id scoped id of the resource
34
+ * @param scope scope in which this resource is defined
35
+ * @param props the lambda properties
40
36
  */
41
37
  createRedriveQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps): cdk.aws_sqs.Queue;
42
38
  /**
43
39
  * @summary Method to create a dead letter queue for a lambda function
44
- * @param {string} id scoped id of the resource
45
- * @param {CommonConstruct} scope scope in which this resource is defined
46
- * @param {LambdaProps} props the lambda properties
47
- * @param {sqs.IQueue} deadLetterQueue
40
+ * @param id scoped id of the resource
41
+ * @param scope scope in which this resource is defined
42
+ * @param props the lambda properties
43
+ * @param deadLetterQueue
48
44
  */
49
45
  createDeadLetterQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps, deadLetterQueue: sqs.IQueue): cdk.aws_sqs.Queue;
50
46
  }
@@ -28,9 +28,6 @@ const cdk = __importStar(require("aws-cdk-lib"));
28
28
  const sqs = __importStar(require("aws-cdk-lib/aws-sqs"));
29
29
  const utils = __importStar(require("../../../utils"));
30
30
  /**
31
- * @stability stable
32
- * @category cdk-utils.sqs-manager
33
- * @subcategory Construct
34
31
  * @classdesc Provides operations on AWS Simple Queue Service.
35
32
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
36
33
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -44,35 +41,27 @@ const utils = __importStar(require("../../../utils"));
44
41
  * this.sqsManager.createQueue('MySqs', this, {...})
45
42
  * }
46
43
  * }
47
- *
48
44
  * @see [CDK Simple Queue Service Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs-readme.html}
49
45
  */
50
46
  class SqsManager {
51
47
  /**
52
48
  * @summary Method to create a lambda queue service
53
- * @param {string} id scoped id of the resource
54
- * @param {CommonConstruct} scope scope in which this resource is defined
55
- * @param {QueueProps} props
56
- * @param {sqs.IQueue} deadLetterQueue
49
+ * @param id scoped id of the resource
50
+ * @param scope scope in which this resource is defined
51
+ * @param props
52
+ * @param deadLetterQueue
57
53
  */
58
54
  createQueue(id, scope, props, deadLetterQueue) {
59
55
  if (!props)
60
56
  throw `Queue props undefined for ${id}`;
61
57
  const queue = new sqs.Queue(scope, id, {
62
- queueName: props.queueName,
63
- visibilityTimeout: props.visibilityTimeoutInSecs
64
- ? cdk.Duration.seconds(props.visibilityTimeoutInSecs)
65
- : props.visibilityTimeout,
66
- receiveMessageWaitTime: props.receiveMessageWaitTimeInSecs
67
- ? cdk.Duration.seconds(props.receiveMessageWaitTimeInSecs)
68
- : props.receiveMessageWaitTime,
69
58
  contentBasedDeduplication: props.contentBasedDeduplication,
70
59
  dataKeyReuse: props.dataKeyReuseInSecs ? cdk.Duration.seconds(props.dataKeyReuseInSecs) : props.dataKeyReuse,
71
60
  deadLetterQueue: !deadLetterQueue
72
61
  ? undefined
73
62
  : {
74
- queue: deadLetterQueue,
75
63
  maxReceiveCount: props.maxReceiveCount ?? 5,
64
+ queue: deadLetterQueue,
76
65
  },
77
66
  deduplicationScope: props.deduplicationScope,
78
67
  deliveryDelay: props.deliveryDelayInSecs ? cdk.Duration.seconds(props.deliveryDelayInSecs) : undefined,
@@ -81,8 +70,15 @@ class SqsManager {
81
70
  fifo: props.fifo,
82
71
  fifoThroughputLimit: props.fifoThroughputLimit,
83
72
  maxMessageSizeBytes: props.maxMessageSizeBytes,
73
+ queueName: props.queueName,
74
+ receiveMessageWaitTime: props.receiveMessageWaitTimeInSecs
75
+ ? cdk.Duration.seconds(props.receiveMessageWaitTimeInSecs)
76
+ : props.receiveMessageWaitTime,
84
77
  removalPolicy: props.removalPolicy ?? cdk.RemovalPolicy.DESTROY,
85
78
  retentionPeriod: props.retentionInDays ? cdk.Duration.days(props.retentionInDays) : cdk.Duration.days(7),
79
+ visibilityTimeout: props.visibilityTimeoutInSecs
80
+ ? cdk.Duration.seconds(props.visibilityTimeoutInSecs)
81
+ : props.visibilityTimeout,
86
82
  });
87
83
  if (props.tags && props.tags.length > 0) {
88
84
  props.tags.forEach(tag => {
@@ -96,9 +92,9 @@ class SqsManager {
96
92
  }
97
93
  /**
98
94
  * @summary Method to create a redrive queue for a lambda function
99
- * @param {string} id scoped id of the resource
100
- * @param {CommonConstruct} scope scope in which this resource is defined
101
- * @param {LambdaProps} props the lambda properties
95
+ * @param id scoped id of the resource
96
+ * @param scope scope in which this resource is defined
97
+ * @param props the lambda properties
102
98
  */
103
99
  createRedriveQueueForLambda(id, scope, props) {
104
100
  return this.createQueue(`${id}`, scope, {
@@ -110,10 +106,10 @@ class SqsManager {
110
106
  }
111
107
  /**
112
108
  * @summary Method to create a dead letter queue for a lambda function
113
- * @param {string} id scoped id of the resource
114
- * @param {CommonConstruct} scope scope in which this resource is defined
115
- * @param {LambdaProps} props the lambda properties
116
- * @param {sqs.IQueue} deadLetterQueue
109
+ * @param id scoped id of the resource
110
+ * @param scope scope in which this resource is defined
111
+ * @param props the lambda properties
112
+ * @param deadLetterQueue
117
113
  */
118
114
  createDeadLetterQueueForLambda(id, scope, props, deadLetterQueue) {
119
115
  let queueProps;
@@ -1,17 +1,15 @@
1
1
  import * as sqs from 'aws-cdk-lib/aws-sqs';
2
2
  import { TagProps } from '../../../types';
3
3
  /**
4
- * @category cdk-utils.sqs-manager
5
- * @subcategory Properties
6
4
  */
7
5
  export interface QueueProps extends sqs.QueueProps {
8
- maxReceiveCount?: number;
9
- visibilityTimeoutInSecs?: number;
10
- receiveMessageWaitTimeInSecs?: number;
11
6
  dataKeyReuseInSecs?: number;
12
7
  deliveryDelayInSecs?: number;
8
+ maxReceiveCount?: number;
9
+ receiveMessageWaitTimeInSecs?: number;
13
10
  retentionInDays?: number;
14
- tags?: TagProps[];
15
11
  retriesEnabled?: boolean;
16
12
  retryBatchSize?: number;
13
+ tags?: TagProps[];
14
+ visibilityTimeoutInSecs?: number;
17
15
  }
@@ -5,9 +5,6 @@ import * as s3deploy from 'aws-cdk-lib/aws-s3-deployment';
5
5
  import { LifecycleRule, S3BucketProps } from './types';
6
6
  import { CommonConstruct } from '../../../common';
7
7
  /**
8
- * @stability stable
9
- * @category cdk-utils.s3-manager
10
- * @subcategory Construct
11
8
  * @classdesc Provides operations on AWS S3.
12
9
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
13
10
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -21,68 +18,63 @@ import { CommonConstruct } from '../../../common';
21
18
  * this.s3Manager.createS3Bucket('MyBucket', this)
22
19
  * }
23
20
  * }
24
- *
25
21
  * @see [CDK S3 Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3-readme.html}
26
22
  */
27
23
  export declare class S3Manager {
28
24
  /**
29
25
  * @summary Method to determine S3 Bucket lifecycle properties
30
- * @param {S3BucketProps} props bucket properties
31
- * @private
26
+ * @param props bucket properties
32
27
  */
33
28
  protected determineBucketLifecycleRules(props: S3BucketProps): LifecycleRule[] | undefined;
34
29
  /**
35
30
  * @summary Method to determine the bucket name using account and region
36
- * @param {CommonConstruct} scope scope in which this resource is defined
37
- * @param {string} bucketName the bucket name
38
- * @protected
31
+ * @param scope scope in which this resource is defined
32
+ * @param bucketName the bucket name
39
33
  */
40
34
  protected static determineBucketNameByAccountAndRegion(scope: CommonConstruct, bucketName: string): string;
41
35
  /**
42
36
  * @summary Method to determine the bucket name using domain name
43
- * @param {CommonConstruct} scope scope in which this resource is defined
44
- * @param {string} bucketName the bucket name
45
- * @protected
37
+ * @param scope scope in which this resource is defined
38
+ * @param bucketName the bucket name
46
39
  */
47
40
  protected static determineBucketNameByDomainName(scope: CommonConstruct, bucketName: string): string;
48
41
  /**
49
42
  * @summary Method to determine the bucket name
50
- * @param {CommonConstruct} scope scope in which this resource is defined
51
- * @param {string} bucketName the bucket name
52
- * @private
43
+ * @param scope scope in which this resource is defined
44
+ * @param bucketName the bucket name
53
45
  */
54
46
  static determineBucketName(scope: CommonConstruct, bucketName: string): string;
55
47
  /**
56
48
  * @summary Method to create a s3 bucket
57
- * @param {string} id scoped id of the resource
58
- * @param {CommonConstruct} scope scope in which this resource is defined
59
- * @param {S3BucketProps} props bucket properties
49
+ * @param id scoped id of the resource
50
+ * @param scope scope in which this resource is defined
51
+ * @param props bucket properties
60
52
  */
61
53
  createS3Bucket(id: string, scope: CommonConstruct, props: S3BucketProps): cdk.aws_s3.IBucket;
62
54
  /**
63
55
  * @summary Method to create an iam bucket policy for cloudtrail
64
- * @param {string} id scoped id of the resource
65
- * @param {CommonConstruct} scope scope in which this resource is defined
66
- * @param {s3.IBucket} bucket
56
+ * @param id scoped id of the resource
57
+ * @param scope scope in which this resource is defined
58
+ * @param bucket
67
59
  */
68
60
  createBucketPolicyForCloudTrail(id: string, scope: CommonConstruct, bucket: s3.IBucket): cdk.aws_s3.CfnBucketPolicy;
69
61
  /**
70
62
  * @summary Method to create a s3 bucket deployment
71
- * @param {string} id scoped id of the resource
72
- * @param {CommonConstruct} scope scope in which this resource is defined
73
- * @param {s3.IBucket} siteBucket
74
- * @param {cloudfront.IDistribution} distribution
75
- * @param {s3deploy.ISource[]} sources
76
- * @param {string} prefix
77
- * @param {boolean} prune
63
+ * @param id scoped id of the resource
64
+ * @param scope scope in which this resource is defined
65
+ * @param siteBucket
66
+ * @param distribution
67
+ * @param sources
68
+ * @param prefix
69
+ * @param prune
78
70
  */
79
71
  doBucketDeployment(id: string, scope: CommonConstruct, siteBucket: s3.IBucket, distribution: cloudfront.IDistribution, sources: s3deploy.ISource[], prefix: string, prune?: boolean): void;
80
72
  /**
81
73
  *
82
- * @param {string} id scoped id of the resource
83
- * @param {CommonConstruct} scope scope in which this resource is defined
84
- * @param {s3.IBucket} bucket bucket to create the folders in
85
- * @param {string[]} folders list of folder names to be created in the bucket
74
+ * @param id scoped id of the resource
75
+ * @param scope scope in which this resource is defined
76
+ * @param bucket bucket to create the folders in
77
+ * @param folders list of folder names to be created in the bucket
86
78
  */
87
79
  createBucketFolders(id: string, scope: CommonConstruct, bucket: s3.IBucket, folders: string[]): void;
88
80
  }