@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
@@ -30,9 +30,6 @@ const s3 = __importStar(require("aws-cdk-lib/aws-s3"));
30
30
  const s3deploy = __importStar(require("aws-cdk-lib/aws-s3-deployment"));
31
31
  const utils = __importStar(require("../../../utils"));
32
32
  /**
33
- * @stability stable
34
- * @category cdk-utils.s3-manager
35
- * @subcategory Construct
36
33
  * @classdesc Provides operations on AWS S3.
37
34
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
38
35
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -46,14 +43,12 @@ const utils = __importStar(require("../../../utils"));
46
43
  * this.s3Manager.createS3Bucket('MyBucket', this)
47
44
  * }
48
45
  * }
49
- *
50
46
  * @see [CDK S3 Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3-readme.html}
51
47
  */
52
48
  class S3Manager {
53
49
  /**
54
50
  * @summary Method to determine S3 Bucket lifecycle properties
55
- * @param {S3BucketProps} props bucket properties
56
- * @private
51
+ * @param props bucket properties
57
52
  */
58
53
  determineBucketLifecycleRules(props) {
59
54
  if (!props.lifecycleRules)
@@ -61,37 +56,35 @@ class S3Manager {
61
56
  const bucketLifecycleRules = [];
62
57
  props.lifecycleRules.forEach(lifecycleRule => {
63
58
  bucketLifecycleRules.push({
64
- id: lifecycleRule.id,
65
- enabled: lifecycleRule.enabled,
66
59
  abortIncompleteMultipartUploadAfter: lifecycleRule.abortIncompleteMultipartUploadAfter,
67
- expirationDate: lifecycleRule.expirationDate,
60
+ enabled: lifecycleRule.enabled,
68
61
  expiration: lifecycleRule.expirationInDays ? cdk.Duration.days(lifecycleRule.expirationInDays) : undefined,
62
+ expirationDate: lifecycleRule.expirationDate,
63
+ expiredObjectDeleteMarker: lifecycleRule.expiredObjectDeleteMarker,
64
+ id: lifecycleRule.id,
69
65
  noncurrentVersionExpiration: lifecycleRule.noncurrentVersionExpirationInDays
70
66
  ? cdk.Duration.days(lifecycleRule.noncurrentVersionExpirationInDays)
71
67
  : undefined,
72
68
  noncurrentVersionTransitions: lifecycleRule.noncurrentVersionTransitions,
73
- transitions: lifecycleRule.transitions,
74
69
  prefix: lifecycleRule.prefix,
75
70
  tagFilters: lifecycleRule.tagFilters,
76
- expiredObjectDeleteMarker: lifecycleRule.expiredObjectDeleteMarker,
71
+ transitions: lifecycleRule.transitions,
77
72
  });
78
73
  });
79
74
  return bucketLifecycleRules;
80
75
  }
81
76
  /**
82
77
  * @summary Method to determine the bucket name using account and region
83
- * @param {CommonConstruct} scope scope in which this resource is defined
84
- * @param {string} bucketName the bucket name
85
- * @protected
78
+ * @param scope scope in which this resource is defined
79
+ * @param bucketName the bucket name
86
80
  */
87
81
  static determineBucketNameByAccountAndRegion(scope, bucketName) {
88
82
  return `${bucketName}-${cdk.Stack.of(scope).account}-${scope.props.region}-${scope.props.stage}`;
89
83
  }
90
84
  /**
91
85
  * @summary Method to determine the bucket name using domain name
92
- * @param {CommonConstruct} scope scope in which this resource is defined
93
- * @param {string} bucketName the bucket name
94
- * @protected
86
+ * @param scope scope in which this resource is defined
87
+ * @param bucketName the bucket name
95
88
  */
96
89
  static determineBucketNameByDomainName(scope, bucketName) {
97
90
  return scope.isProductionStage()
@@ -100,9 +93,8 @@ class S3Manager {
100
93
  }
101
94
  /**
102
95
  * @summary Method to determine the bucket name
103
- * @param {CommonConstruct} scope scope in which this resource is defined
104
- * @param {string} bucketName the bucket name
105
- * @private
96
+ * @param scope scope in which this resource is defined
97
+ * @param bucketName the bucket name
106
98
  */
107
99
  static determineBucketName(scope, bucketName) {
108
100
  return scope.props.excludeDomainNameForBuckets
@@ -111,9 +103,9 @@ class S3Manager {
111
103
  }
112
104
  /**
113
105
  * @summary Method to create a s3 bucket
114
- * @param {string} id scoped id of the resource
115
- * @param {CommonConstruct} scope scope in which this resource is defined
116
- * @param {S3BucketProps} props bucket properties
106
+ * @param id scoped id of the resource
107
+ * @param scope scope in which this resource is defined
108
+ * @param props bucket properties
117
109
  */
118
110
  createS3Bucket(id, scope, props) {
119
111
  if (!props)
@@ -144,10 +136,10 @@ class S3Manager {
144
136
  removalPolicy: props.removalPolicy || cdk.RemovalPolicy.RETAIN,
145
137
  serverAccessLogsBucket: logBucket,
146
138
  serverAccessLogsPrefix: props.serverAccessLogsPrefix,
147
- websiteIndexDocument: props.websiteIndexDocument,
139
+ versioned: props.versioned,
148
140
  websiteErrorDocument: props.websiteErrorDocument,
141
+ websiteIndexDocument: props.websiteIndexDocument,
149
142
  websiteRoutingRules: props.websiteRoutingRules,
150
- versioned: props.versioned,
151
143
  });
152
144
  const cfnBucket = bucket.node.defaultChild;
153
145
  cfnBucket.notificationConfiguration = {
@@ -167,9 +159,9 @@ class S3Manager {
167
159
  }
168
160
  /**
169
161
  * @summary Method to create an iam bucket policy for cloudtrail
170
- * @param {string} id scoped id of the resource
171
- * @param {CommonConstruct} scope scope in which this resource is defined
172
- * @param {s3.IBucket} bucket
162
+ * @param id scoped id of the resource
163
+ * @param scope scope in which this resource is defined
164
+ * @param bucket
173
165
  */
174
166
  createBucketPolicyForCloudTrail(id, scope, bucket) {
175
167
  const bucketPolicyDocument = new iam.PolicyDocument({
@@ -197,13 +189,13 @@ class S3Manager {
197
189
  }
198
190
  /**
199
191
  * @summary Method to create a s3 bucket deployment
200
- * @param {string} id scoped id of the resource
201
- * @param {CommonConstruct} scope scope in which this resource is defined
202
- * @param {s3.IBucket} siteBucket
203
- * @param {cloudfront.IDistribution} distribution
204
- * @param {s3deploy.ISource[]} sources
205
- * @param {string} prefix
206
- * @param {boolean} prune
192
+ * @param id scoped id of the resource
193
+ * @param scope scope in which this resource is defined
194
+ * @param siteBucket
195
+ * @param distribution
196
+ * @param sources
197
+ * @param prefix
198
+ * @param prune
207
199
  */
208
200
  doBucketDeployment(id, scope, siteBucket, distribution, sources, prefix, prune) {
209
201
  new s3deploy.BucketDeployment(scope, `${id}`, {
@@ -219,10 +211,10 @@ class S3Manager {
219
211
  }
220
212
  /**
221
213
  *
222
- * @param {string} id scoped id of the resource
223
- * @param {CommonConstruct} scope scope in which this resource is defined
224
- * @param {s3.IBucket} bucket bucket to create the folders in
225
- * @param {string[]} folders list of folder names to be created in the bucket
214
+ * @param id scoped id of the resource
215
+ * @param scope scope in which this resource is defined
216
+ * @param bucket bucket to create the folders in
217
+ * @param folders list of folder names to be created in the bucket
226
218
  */
227
219
  createBucketFolders(id, scope, bucket, folders) {
228
220
  if (!folders || folders.length == 0) {
@@ -232,8 +224,8 @@ class S3Manager {
232
224
  new s3deploy.BucketDeployment(scope, `${id}-${folder}`, {
233
225
  destinationBucket: bucket,
234
226
  destinationKeyPrefix: folder,
235
- sources: [s3deploy.Source.data('README.md', `This is the ${folder} folder for ${id}`)],
236
227
  prune: false,
228
+ sources: [s3deploy.Source.data('README.md', `This is the ${folder} folder for ${id}`)],
237
229
  });
238
230
  });
239
231
  }
@@ -2,30 +2,24 @@ import { TagProps } from '../../../types';
2
2
  import * as s3 from 'aws-cdk-lib/aws-s3';
3
3
  import * as s3deploy from 'aws-cdk-lib/aws-s3-deployment';
4
4
  /**
5
- * @category cdk-utils.s3-manager
6
- * @subcategory Properties
7
5
  */
8
6
  export interface LifecycleRule extends s3.LifecycleRule {
9
7
  expirationInDays?: number;
10
8
  noncurrentVersionExpirationInDays?: number;
11
9
  }
12
10
  /**
13
- * @category cdk-utils.s3-manager
14
- * @subcategory Properties
15
11
  */
16
12
  export interface BucketDeploymentProps extends s3deploy.BucketDeploymentProps {
17
13
  expirationInDays?: number;
18
14
  noncurrentVersionExpirationInDays?: number;
19
15
  }
20
16
  /**
21
- * @category cdk-utils.s3-manager
22
- * @subcategory Properties
23
17
  */
24
18
  export interface S3BucketProps extends s3.BucketProps {
19
+ bucketName: string;
25
20
  enableEventBridge?: boolean;
21
+ existingBucket?: boolean;
26
22
  lifecycleRules?: LifecycleRule[];
27
- bucketName: string;
28
23
  logBucketName?: string;
29
- existingBucket?: boolean;
30
24
  tags?: TagProps[];
31
25
  }
@@ -10,9 +10,6 @@ import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks';
10
10
  import { CommonConstruct } from '../../../common';
11
11
  import { SfnCallApiGatewayRestApiEndpointProps, SfnChoiceProps, SfnDynamoDeleteItemProps, SfnDynamoGetItemProps, SfnDynamoPutItemProps, SfnFailProps, SfnLambdaInvokeProps, SfnMapProps, SfnParallelProps, SfnPassProps, SfnSqsSendMessageProps, SfnStartExecutionProps, SfnStateMachineProps, SfnSucceedProps, SfnWaitProps } from './types';
12
12
  /**
13
- * @stability stable
14
- * @category cdk-utils.step-functions-manager
15
- * @subcategory Construct
16
13
  * @classdesc Provides operations on AWS Step Functions Service.
17
14
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
18
15
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -26,58 +23,57 @@ import { SfnCallApiGatewayRestApiEndpointProps, SfnChoiceProps, SfnDynamoDeleteI
26
23
  * this.sfnManager.createSuccessStep('MyStep', this, myStepProps)
27
24
  * }
28
25
  * }
29
- *
30
26
  * @see [CDK Step Functions Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions-readme.html}
31
27
  */
32
28
  export declare class SfnManager {
33
29
  /**
34
30
  * @summary Method to create a success step
35
- * @param {string} id scoped id of the resource
36
- * @param {CommonConstruct} scope scope in which this resource is defined
37
- * @param {SfnSucceedProps} props
31
+ * @param id scoped id of the resource
32
+ * @param scope scope in which this resource is defined
33
+ * @param props
38
34
  */
39
35
  createSuccessStep(id: string, scope: CommonConstruct, props: SfnSucceedProps): cdk.aws_stepfunctions.Succeed;
40
36
  /**
41
37
  * @summary Method to create a failure step
42
- * @param {string} id scoped id of the resource
43
- * @param {CommonConstruct} scope scope in which this resource is defined
44
- * @param {SfnFailProps} props
38
+ * @param id scoped id of the resource
39
+ * @param scope scope in which this resource is defined
40
+ * @param props
45
41
  */
46
42
  createFailStep(id: string, scope: CommonConstruct, props: SfnFailProps): cdk.aws_stepfunctions.Fail;
47
43
  /**
48
44
  * @summary Method to create a pass step
49
- * @param {string} id scoped id of the resource
50
- * @param {CommonConstruct} scope scope in which this resource is defined
51
- * @param {SfnPassProps} props
45
+ * @param id scoped id of the resource
46
+ * @param scope scope in which this resource is defined
47
+ * @param props
52
48
  */
53
49
  createPassStep(id: string, scope: CommonConstruct, props: SfnPassProps): cdk.aws_stepfunctions.Pass;
54
50
  /**
55
51
  * @summary Method to create a parallel step
56
- * @param {string} id scoped id of the resource
57
- * @param {CommonConstruct} scope scope in which this resource is defined
58
- * @param {SfnParallelProps} props
52
+ * @param id scoped id of the resource
53
+ * @param scope scope in which this resource is defined
54
+ * @param props
59
55
  */
60
56
  createParallelStep(id: string, scope: CommonConstruct, props: SfnParallelProps): cdk.aws_stepfunctions.Parallel;
61
57
  /**
62
58
  * @summary Method to create a choice step
63
- * @param {string} id scoped id of the resource
64
- * @param {CommonConstruct} scope scope in which this resource is defined
65
- * @param {SfnChoiceProps} props
59
+ * @param id scoped id of the resource
60
+ * @param scope scope in which this resource is defined
61
+ * @param props
66
62
  */
67
63
  createChoiceStep(id: string, scope: CommonConstruct, props: SfnChoiceProps): cdk.aws_stepfunctions.Choice;
68
64
  /**
69
65
  * @summary Method to create a wait step
70
- * @param {string} id scoped id of the resource
71
- * @param {CommonConstruct} scope scope in which this resource is defined
72
- * @param {SfnWaitProps} props
66
+ * @param id scoped id of the resource
67
+ * @param scope scope in which this resource is defined
68
+ * @param props
73
69
  */
74
70
  createWaitStep(id: string, scope: CommonConstruct, props: SfnWaitProps): cdk.aws_stepfunctions.Wait;
75
71
  /**
76
72
  * @summary Method to create a DynamoDB get item step
77
- * @param {string} id scoped id of the resource
78
- * @param {CommonConstruct} scope scope in which this resource is defined
79
- * @param {SfnDynamoGetItemProps} props
80
- * @param {dynamodb.ITable} table The table to get the item from
73
+ * @param id scoped id of the resource
74
+ * @param scope scope in which this resource is defined
75
+ * @param props
76
+ * @param table The table to get the item from
81
77
  * @param tableKey The table key for query/scan
82
78
  */
83
79
  createDynamoDbGetItemStep(id: string, scope: CommonConstruct, props: SfnDynamoGetItemProps, table: dynamodb.ITable, tableKey: {
@@ -85,10 +81,10 @@ export declare class SfnManager {
85
81
  }): cdk.aws_stepfunctions_tasks.DynamoGetItem;
86
82
  /**
87
83
  * @summary Method to create a DynamoDB put item step
88
- * @param {string} id scoped id of the resource
89
- * @param {CommonConstruct} scope scope in which this resource is defined
90
- * @param {SfnDynamoPutItemProps} props
91
- * @param {dynamodb.ITable} table The table to put the item in
84
+ * @param id scoped id of the resource
85
+ * @param scope scope in which this resource is defined
86
+ * @param props
87
+ * @param table The table to put the item in
92
88
  * @param tableItem The item to add to the table
93
89
  */
94
90
  createDynamoDbPutItemStep(id: string, scope: CommonConstruct, props: SfnDynamoPutItemProps, table: dynamodb.ITable, tableItem: {
@@ -96,10 +92,10 @@ export declare class SfnManager {
96
92
  }): cdk.aws_stepfunctions_tasks.DynamoPutItem;
97
93
  /**
98
94
  * @summary Method to create a DynamoDB delete item step
99
- * @param {string} id scoped id of the resource
100
- * @param {CommonConstruct} scope scope in which this resource is defined
101
- * @param {SfnDynamoDeleteItemProps} props
102
- * @param {dynamodb.ITable} table The table to put the item in
95
+ * @param id scoped id of the resource
96
+ * @param scope scope in which this resource is defined
97
+ * @param props
98
+ * @param table The table to put the item in
103
99
  * @param tableKey The table key for query/scan
104
100
  */
105
101
  createDynamoDbDeleteItemStep(id: string, scope: CommonConstruct, props: SfnDynamoDeleteItemProps, table: dynamodb.ITable, tableKey: {
@@ -107,51 +103,51 @@ export declare class SfnManager {
107
103
  }): cdk.aws_stepfunctions_tasks.DynamoDeleteItem;
108
104
  /**
109
105
  * @summary Method to send a message to SQS step
110
- * @param {string} id scoped id of the resource
111
- * @param {CommonConstruct} scope scope in which this resource is defined
112
- * @param {SfnSqsSendMessageProps} props
113
- * @param {sqs.IQueue} queue The queue to send the message to
106
+ * @param id scoped id of the resource
107
+ * @param scope scope in which this resource is defined
108
+ * @param props
109
+ * @param queue The queue to send the message to
114
110
  */
115
111
  createSendSqsMessageStep(id: string, scope: CommonConstruct, props: SfnSqsSendMessageProps, queue: sqs.IQueue): cdk.aws_stepfunctions_tasks.SqsSendMessage;
116
112
  /**
117
113
  * @summary Method to create a lambda invoke step
118
- * @param {string} id scoped id of the resource
119
- * @param {CommonConstruct} scope scope in which this resource is defined
120
- * @param {SfnLambdaInvokeProps} props
121
- * @param {lambda.IFunction} lambdaFunction
114
+ * @param id scoped id of the resource
115
+ * @param scope scope in which this resource is defined
116
+ * @param props
117
+ * @param lambdaFunction
122
118
  */
123
119
  createLambdaStep(id: string, scope: CommonConstruct, props: SfnLambdaInvokeProps, lambdaFunction: lambda.IFunction): cdk.aws_stepfunctions_tasks.LambdaInvoke;
124
120
  /**
125
121
  * @summary Method to create a API Gateway invoke step
126
- * @param {string} id scoped id of the resource
127
- * @param {CommonConstruct} scope scope in which this resource is defined
128
- * @param {SfnLambdaInvokeProps} props
129
- * @param {apig.IRestApi} api
122
+ * @param id scoped id of the resource
123
+ * @param scope scope in which this resource is defined
124
+ * @param props
125
+ * @param api
130
126
  */
131
127
  createApiStep(id: string, scope: CommonConstruct, props: SfnCallApiGatewayRestApiEndpointProps, api: apig.IRestApi): cdk.aws_stepfunctions_tasks.CallApiGatewayRestApiEndpoint;
132
128
  /**
133
129
  * @summary Method to create a step function execution step
134
- * @param {string} id scoped id of the resource
135
- * @param {CommonConstruct} scope scope in which this resource is defined
136
- * @param {SfnStartExecutionProps} props props for the step
137
- * @param {sfn.IStateMachine} stateMachine the state machine to execute
130
+ * @param id scoped id of the resource
131
+ * @param scope scope in which this resource is defined
132
+ * @param props props for the step
133
+ * @param stateMachine the state machine to execute
138
134
  */
139
135
  createSfnExecutionStep(id: string, scope: CommonConstruct, props: SfnStartExecutionProps, stateMachine: sfn.IStateMachine): cdk.aws_stepfunctions_tasks.StepFunctionsStartExecution;
140
136
  /**
141
137
  * @summary Method to create a step function map state
142
- * @param {string} id scoped id of the resource
143
- * @param {CommonConstruct} scope scope in which this resource is defined
144
- * @param {SfnMapProps} props props for the map state
138
+ * @param id scoped id of the resource
139
+ * @param scope scope in which this resource is defined
140
+ * @param props props for the map state
145
141
  */
146
142
  createMapState(id: string, scope: CommonConstruct, props: SfnMapProps): cdk.aws_stepfunctions.Map;
147
143
  /**
148
144
  * @summary Method to create a state machine
149
- * @param {string} id scoped id of the resource
150
- * @param {CommonConstruct} scope scope in which this resource is defined
151
- * @param {SfnStateMachineProps} props
152
- * @param {sfn.IChainable} definition
153
- * @param {logs.ILogGroup} logGroup
154
- * @param {iam.IRole} role
145
+ * @param id scoped id of the resource
146
+ * @param scope scope in which this resource is defined
147
+ * @param props
148
+ * @param definition
149
+ * @param logGroup
150
+ * @param role
155
151
  */
156
152
  createStateMachine(id: string, scope: CommonConstruct, props: SfnStateMachineProps, definition: sfn.IChainable, logGroup: logs.ILogGroup, role?: iam.IRole): cdk.aws_stepfunctions.StateMachine;
157
153
  }