@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
@@ -31,16 +31,13 @@ const utils = __importStar(require("../../../utils"));
31
31
  const uuid_1 = require("uuid");
32
32
  const DEFAULT_RETRY_CONFIG = [
33
33
  {
34
+ backoffRate: 2,
34
35
  errors: ['States.ALL'],
35
36
  intervalInSecs: 30,
36
37
  maxAttempts: 6,
37
- backoffRate: 2,
38
38
  },
39
39
  ];
40
40
  /**
41
- * @stability stable
42
- * @category cdk-utils.step-functions-manager
43
- * @subcategory Construct
44
41
  * @classdesc Provides operations on AWS Step Functions Service.
45
42
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
46
43
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -54,15 +51,14 @@ const DEFAULT_RETRY_CONFIG = [
54
51
  * this.sfnManager.createSuccessStep('MyStep', this, myStepProps)
55
52
  * }
56
53
  * }
57
- *
58
54
  * @see [CDK Step Functions Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions-readme.html}
59
55
  */
60
56
  class SfnManager {
61
57
  /**
62
58
  * @summary Method to create a success step
63
- * @param {string} id scoped id of the resource
64
- * @param {CommonConstruct} scope scope in which this resource is defined
65
- * @param {SfnSucceedProps} 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
  createSuccessStep(id, scope, props) {
68
64
  if (!props)
@@ -76,9 +72,9 @@ class SfnManager {
76
72
  }
77
73
  /**
78
74
  * @summary Method to create a failure step
79
- * @param {string} id scoped id of the resource
80
- * @param {CommonConstruct} scope scope in which this resource is defined
81
- * @param {SfnFailProps} props
75
+ * @param id scoped id of the resource
76
+ * @param scope scope in which this resource is defined
77
+ * @param props
82
78
  */
83
79
  createFailStep(id, scope, props) {
84
80
  if (!props)
@@ -92,9 +88,9 @@ class SfnManager {
92
88
  }
93
89
  /**
94
90
  * @summary Method to create a pass step
95
- * @param {string} id scoped id of the resource
96
- * @param {CommonConstruct} scope scope in which this resource is defined
97
- * @param {SfnPassProps} props
91
+ * @param id scoped id of the resource
92
+ * @param scope scope in which this resource is defined
93
+ * @param props
98
94
  */
99
95
  createPassStep(id, scope, props) {
100
96
  if (!props)
@@ -108,9 +104,9 @@ class SfnManager {
108
104
  }
109
105
  /**
110
106
  * @summary Method to create a parallel step
111
- * @param {string} id scoped id of the resource
112
- * @param {CommonConstruct} scope scope in which this resource is defined
113
- * @param {SfnParallelProps} props
107
+ * @param id scoped id of the resource
108
+ * @param scope scope in which this resource is defined
109
+ * @param props
114
110
  */
115
111
  createParallelStep(id, scope, props) {
116
112
  if (!props)
@@ -133,9 +129,9 @@ class SfnManager {
133
129
  }
134
130
  /**
135
131
  * @summary Method to create a choice step
136
- * @param {string} id scoped id of the resource
137
- * @param {CommonConstruct} scope scope in which this resource is defined
138
- * @param {SfnChoiceProps} props
132
+ * @param id scoped id of the resource
133
+ * @param scope scope in which this resource is defined
134
+ * @param props
139
135
  */
140
136
  createChoiceStep(id, scope, props) {
141
137
  if (!props)
@@ -149,9 +145,9 @@ class SfnManager {
149
145
  }
150
146
  /**
151
147
  * @summary Method to create a wait step
152
- * @param {string} id scoped id of the resource
153
- * @param {CommonConstruct} scope scope in which this resource is defined
154
- * @param {SfnWaitProps} props
148
+ * @param id scoped id of the resource
149
+ * @param scope scope in which this resource is defined
150
+ * @param props
155
151
  */
156
152
  createWaitStep(id, scope, props) {
157
153
  return new sfn.Wait(scope, `${props.name}`, {
@@ -164,10 +160,10 @@ class SfnManager {
164
160
  }
165
161
  /**
166
162
  * @summary Method to create a DynamoDB get item step
167
- * @param {string} id scoped id of the resource
168
- * @param {CommonConstruct} scope scope in which this resource is defined
169
- * @param {SfnDynamoGetItemProps} props
170
- * @param {dynamodb.ITable} table The table to get the item from
163
+ * @param id scoped id of the resource
164
+ * @param scope scope in which this resource is defined
165
+ * @param props
166
+ * @param table The table to get the item from
171
167
  * @param tableKey The table key for query/scan
172
168
  */
173
169
  createDynamoDbGetItemStep(id, scope, props, table, tableKey) {
@@ -176,20 +172,20 @@ class SfnManager {
176
172
  const step = new tasks.DynamoGetItem(scope, `${props.name}`, {
177
173
  ...props,
178
174
  ...{
179
- table: table,
180
- key: tableKey,
175
+ comment: `DynamoDB GetItem step for ${props.name} - ${scope.props.stage} stage`,
181
176
  consistentRead: props.consistentRead,
177
+ expressionAttributeNames: props.expressionAttributeNames,
178
+ heartbeatTimeout: props.heartbeatTimeout,
182
179
  inputPath: props.inputPath,
180
+ integrationPattern: props.integrationPattern,
181
+ key: tableKey,
183
182
  outputPath: props.outputPath,
183
+ projectionExpression: props.projectionExpression,
184
184
  resultPath: props.resultPath,
185
185
  resultSelector: props.resultSelector,
186
- taskTimeout: props.taskTimeout,
187
- heartbeatTimeout: props.heartbeatTimeout,
188
- integrationPattern: props.integrationPattern,
189
- expressionAttributeNames: props.expressionAttributeNames,
190
- projectionExpression: props.projectionExpression,
191
186
  returnConsumedCapacity: props.returnConsumedCapacity,
192
- comment: `DynamoDB GetItem step for ${props.name} - ${scope.props.stage} stage`,
187
+ table: table,
188
+ taskTimeout: props.taskTimeout,
193
189
  },
194
190
  });
195
191
  let retries = props.retries;
@@ -204,10 +200,10 @@ class SfnManager {
204
200
  }
205
201
  /**
206
202
  * @summary Method to create a DynamoDB put item step
207
- * @param {string} id scoped id of the resource
208
- * @param {CommonConstruct} scope scope in which this resource is defined
209
- * @param {SfnDynamoPutItemProps} props
210
- * @param {dynamodb.ITable} table The table to put the item in
203
+ * @param id scoped id of the resource
204
+ * @param scope scope in which this resource is defined
205
+ * @param props
206
+ * @param table The table to put the item in
211
207
  * @param tableItem The item to add to the table
212
208
  */
213
209
  createDynamoDbPutItemStep(id, scope, props, table, tableItem) {
@@ -216,22 +212,22 @@ class SfnManager {
216
212
  const step = new tasks.DynamoPutItem(scope, `${props.name}`, {
217
213
  ...props,
218
214
  ...{
219
- table: table,
220
- item: tableItem,
215
+ comment: `DynamoDB PutItem step for ${props.name} - ${scope.props.stage} stage`,
216
+ conditionExpression: props.conditionExpression,
217
+ expressionAttributeNames: props.expressionAttributeNames,
218
+ expressionAttributeValues: props.expressionAttributeValues,
219
+ heartbeatTimeout: props.heartbeatTimeout,
221
220
  inputPath: props.inputPath,
221
+ integrationPattern: props.integrationPattern,
222
+ item: tableItem,
222
223
  outputPath: props.outputPath,
223
224
  resultPath: props.resultPath,
224
225
  resultSelector: props.resultSelector,
225
- taskTimeout: props.taskTimeout,
226
- heartbeatTimeout: props.heartbeatTimeout,
227
- integrationPattern: props.integrationPattern,
228
- conditionExpression: props.conditionExpression,
229
- expressionAttributeNames: props.expressionAttributeNames,
230
- expressionAttributeValues: props.expressionAttributeValues,
231
226
  returnConsumedCapacity: props.returnConsumedCapacity,
232
227
  returnItemCollectionMetrics: props.returnItemCollectionMetrics,
233
228
  returnValues: props.returnValues,
234
- comment: `DynamoDB PutItem step for ${props.name} - ${scope.props.stage} stage`,
229
+ table: table,
230
+ taskTimeout: props.taskTimeout,
235
231
  },
236
232
  });
237
233
  let retries = props.retries;
@@ -246,10 +242,10 @@ class SfnManager {
246
242
  }
247
243
  /**
248
244
  * @summary Method to create a DynamoDB delete item step
249
- * @param {string} id scoped id of the resource
250
- * @param {CommonConstruct} scope scope in which this resource is defined
251
- * @param {SfnDynamoDeleteItemProps} props
252
- * @param {dynamodb.ITable} table The table to put the item in
245
+ * @param id scoped id of the resource
246
+ * @param scope scope in which this resource is defined
247
+ * @param props
248
+ * @param table The table to put the item in
253
249
  * @param tableKey The table key for query/scan
254
250
  */
255
251
  createDynamoDbDeleteItemStep(id, scope, props, table, tableKey) {
@@ -258,22 +254,22 @@ class SfnManager {
258
254
  const step = new tasks.DynamoDeleteItem(scope, `${props.name}`, {
259
255
  ...props,
260
256
  ...{
261
- table: table,
262
- key: tableKey,
257
+ comment: `DynamoDB DeleteItem step for ${props.name} - ${scope.props.stage} stage`,
263
258
  conditionExpression: props.conditionExpression,
264
259
  expressionAttributeNames: props.expressionAttributeNames,
265
260
  expressionAttributeValues: props.expressionAttributeValues,
266
- taskTimeout: props.taskTimeout,
267
261
  heartbeatTimeout: props.heartbeatTimeout,
268
262
  inputPath: props.inputPath,
263
+ integrationPattern: props.integrationPattern,
264
+ key: tableKey,
269
265
  outputPath: props.outputPath,
270
266
  resultPath: props.resultPath,
271
267
  resultSelector: props.resultSelector,
272
- integrationPattern: props.integrationPattern,
273
268
  returnConsumedCapacity: props.returnConsumedCapacity,
274
269
  returnItemCollectionMetrics: props.returnItemCollectionMetrics,
275
270
  returnValues: props.returnValues,
276
- comment: `DynamoDB DeleteItem step for ${props.name} - ${scope.props.stage} stage`,
271
+ table: table,
272
+ taskTimeout: props.taskTimeout,
277
273
  },
278
274
  });
279
275
  let retries = props.retries;
@@ -288,10 +284,10 @@ class SfnManager {
288
284
  }
289
285
  /**
290
286
  * @summary Method to send a message to SQS step
291
- * @param {string} id scoped id of the resource
292
- * @param {CommonConstruct} scope scope in which this resource is defined
293
- * @param {SfnSqsSendMessageProps} props
294
- * @param {sqs.IQueue} queue The queue to send the message to
287
+ * @param id scoped id of the resource
288
+ * @param scope scope in which this resource is defined
289
+ * @param props
290
+ * @param queue The queue to send the message to
295
291
  */
296
292
  createSendSqsMessageStep(id, scope, props, queue) {
297
293
  if (!props)
@@ -301,19 +297,19 @@ class SfnManager {
301
297
  const step = new tasks.SqsSendMessage(scope, `${props.name}`, {
302
298
  ...props,
303
299
  ...{
304
- queue: queue,
305
- messageBody: props.messageBody,
306
- messageGroupId: props.messageGroupId,
307
- messageDeduplicationId: props.messageDeduplicationId,
300
+ comment: `DynamoDB PutItem step for ${props.name} - ${scope.props.stage} stage`,
308
301
  delay: props.delay,
302
+ heartbeatTimeout: props.heartbeatTimeout,
309
303
  inputPath: props.inputPath,
304
+ integrationPattern: props.integrationPattern,
305
+ messageBody: props.messageBody,
306
+ messageDeduplicationId: props.messageDeduplicationId,
307
+ messageGroupId: props.messageGroupId,
310
308
  outputPath: props.outputPath,
309
+ queue: queue,
311
310
  resultPath: props.resultPath,
312
311
  resultSelector: props.resultSelector,
313
312
  taskTimeout: props.taskTimeout,
314
- heartbeatTimeout: props.heartbeatTimeout,
315
- integrationPattern: props.integrationPattern,
316
- comment: `DynamoDB PutItem step for ${props.name} - ${scope.props.stage} stage`,
317
313
  },
318
314
  });
319
315
  let retries = props.retries;
@@ -328,10 +324,10 @@ class SfnManager {
328
324
  }
329
325
  /**
330
326
  * @summary Method to create a lambda invoke step
331
- * @param {string} id scoped id of the resource
332
- * @param {CommonConstruct} scope scope in which this resource is defined
333
- * @param {SfnLambdaInvokeProps} props
334
- * @param {lambda.IFunction} lambdaFunction
327
+ * @param id scoped id of the resource
328
+ * @param scope scope in which this resource is defined
329
+ * @param props
330
+ * @param lambdaFunction
335
331
  */
336
332
  createLambdaStep(id, scope, props, lambdaFunction) {
337
333
  if (!props)
@@ -339,8 +335,8 @@ class SfnManager {
339
335
  const step = new tasks.LambdaInvoke(scope, `${props.name}`, {
340
336
  ...props,
341
337
  ...{
342
- lambdaFunction,
343
338
  comment: `Lambda step for ${props.name} - ${scope.props.stage} stage`,
339
+ lambdaFunction,
344
340
  },
345
341
  });
346
342
  let retries = props.retries;
@@ -355,10 +351,10 @@ class SfnManager {
355
351
  }
356
352
  /**
357
353
  * @summary Method to create a API Gateway invoke step
358
- * @param {string} id scoped id of the resource
359
- * @param {CommonConstruct} scope scope in which this resource is defined
360
- * @param {SfnLambdaInvokeProps} props
361
- * @param {apig.IRestApi} api
354
+ * @param id scoped id of the resource
355
+ * @param scope scope in which this resource is defined
356
+ * @param props
357
+ * @param api
362
358
  */
363
359
  createApiStep(id, scope, props, api) {
364
360
  if (!props)
@@ -367,8 +363,8 @@ class SfnManager {
367
363
  ...props,
368
364
  ...{
369
365
  api,
370
- stageName: scope.props.stage,
371
366
  comment: `API step for ${props.name} - ${scope.props.stage} stage`,
367
+ stageName: scope.props.stage,
372
368
  },
373
369
  });
374
370
  let retries = props.retries;
@@ -383,10 +379,10 @@ class SfnManager {
383
379
  }
384
380
  /**
385
381
  * @summary Method to create a step function execution step
386
- * @param {string} id scoped id of the resource
387
- * @param {CommonConstruct} scope scope in which this resource is defined
388
- * @param {SfnStartExecutionProps} props props for the step
389
- * @param {sfn.IStateMachine} stateMachine the state machine to execute
382
+ * @param id scoped id of the resource
383
+ * @param scope scope in which this resource is defined
384
+ * @param props props for the step
385
+ * @param stateMachine the state machine to execute
390
386
  */
391
387
  createSfnExecutionStep(id, scope, props, stateMachine) {
392
388
  const step = new tasks.StepFunctionsStartExecution(scope, `${id}`, {
@@ -408,37 +404,37 @@ class SfnManager {
408
404
  }
409
405
  /**
410
406
  * @summary Method to create a step function map state
411
- * @param {string} id scoped id of the resource
412
- * @param {CommonConstruct} scope scope in which this resource is defined
413
- * @param {SfnMapProps} props props for the map state
407
+ * @param id scoped id of the resource
408
+ * @param scope scope in which this resource is defined
409
+ * @param props props for the map state
414
410
  */
415
411
  createMapState(id, scope, props) {
416
412
  return new sfn.Map(scope, `${id}`, props);
417
413
  }
418
414
  /**
419
415
  * @summary Method to create a state machine
420
- * @param {string} id scoped id of the resource
421
- * @param {CommonConstruct} scope scope in which this resource is defined
422
- * @param {SfnStateMachineProps} props
423
- * @param {sfn.IChainable} definition
424
- * @param {logs.ILogGroup} logGroup
425
- * @param {iam.IRole} role
416
+ * @param id scoped id of the resource
417
+ * @param scope scope in which this resource is defined
418
+ * @param props
419
+ * @param definition
420
+ * @param logGroup
421
+ * @param role
426
422
  */
427
423
  createStateMachine(id, scope, props, definition, logGroup, role) {
428
424
  if (!props)
429
425
  throw `State Machine props undefined for ${id}`;
430
426
  const stateMachine = new sfn.StateMachine(scope, `${id}`, {
431
- stateMachineName: `${props.stateMachineName}-${scope.props.stage}`,
432
427
  definition,
433
- role,
434
- stateMachineType: props.stateMachineType,
435
428
  logs: {
436
429
  destination: logGroup,
437
430
  includeExecutionData: props.logs?.includeExecutionData ?? true,
438
431
  level: props.logs?.level ?? sfn.LogLevel.ALL,
439
432
  },
440
- tracingEnabled: props.tracingEnabled,
433
+ role,
434
+ stateMachineName: `${props.stateMachineName}-${scope.props.stage}`,
435
+ stateMachineType: props.stateMachineType,
441
436
  timeout: props.timeout,
437
+ tracingEnabled: props.tracingEnabled,
442
438
  });
443
439
  utils.createCfnOutput(`${id}-stateMachineName`, scope, stateMachine.stateMachineName);
444
440
  utils.createCfnOutput(`${id}-stateMachineArn`, scope, stateMachine.stateMachineArn);
@@ -1,119 +1,87 @@
1
1
  import { ChoiceProps, FailProps, MapProps, ParallelProps, PassProps, RetryProps, StateMachineProps, SucceedProps, WaitProps } from 'aws-cdk-lib/aws-stepfunctions';
2
2
  import { CallApiGatewayRestApiEndpointProps, DynamoDeleteItemProps, DynamoGetItemProps, DynamoPutItemProps, LambdaInvokeProps, SqsSendMessageProps, StepFunctionsStartExecutionProps } from 'aws-cdk-lib/aws-stepfunctions-tasks';
3
3
  /**
4
- * @category cdk-utils.step-functions-manager
5
- * @subcategory Properties
6
4
  */
7
5
  export interface SfnSucceedProps extends SucceedProps {
8
6
  name: string;
9
7
  }
10
8
  /**
11
- * @category cdk-utils.step-functions-manager
12
- * @subcategory Properties
13
9
  */
14
10
  export interface SfnRetryProps extends RetryProps {
15
11
  intervalInSecs: number;
16
12
  }
17
13
  /**
18
- * @category cdk-utils.step-functions-manager
19
- * @subcategory Properties
20
14
  */
21
15
  export interface SfnFailProps extends FailProps {
22
16
  name: string;
23
17
  }
24
18
  /**
25
- * @category cdk-utils.step-functions-manager
26
- * @subcategory Properties
27
19
  */
28
20
  export interface SfnPassProps extends PassProps {
29
21
  name: string;
30
22
  }
31
23
  /**
32
- * @category cdk-utils.step-functions-manager
33
- * @subcategory Properties
34
24
  */
35
25
  export interface SfnDynamoGetItemProps extends DynamoGetItemProps {
36
26
  name: string;
37
27
  retries?: SfnRetryProps[];
38
28
  }
39
29
  /**
40
- * @category cdk-utils.step-functions-manager
41
- * @subcategory Properties
42
30
  */
43
31
  export interface SfnDynamoPutItemProps extends DynamoPutItemProps {
44
32
  name: string;
45
33
  retries?: SfnRetryProps[];
46
34
  }
47
35
  /**
48
- * @category cdk-utils.step-functions-manager
49
- * @subcategory Properties
50
36
  */
51
37
  export interface SfnDynamoDeleteItemProps extends DynamoDeleteItemProps {
52
38
  name: string;
53
39
  retries?: SfnRetryProps[];
54
40
  }
55
41
  /**
56
- * @category cdk-utils.step-functions-manager
57
- * @subcategory Properties
58
42
  */
59
43
  export interface SfnSqsSendMessageProps extends SqsSendMessageProps {
60
44
  name: string;
61
45
  retries?: SfnRetryProps[];
62
46
  }
63
47
  /**
64
- * @category cdk-utils.step-functions-manager
65
- * @subcategory Properties
66
48
  */
67
49
  export interface SfnParallelProps extends ParallelProps {
68
50
  name: string;
69
51
  retries?: SfnRetryProps[];
70
52
  }
71
53
  /**
72
- * @category cdk-utils.step-functions-manager
73
- * @subcategory Properties
74
54
  */
75
55
  export interface SfnChoiceProps extends ChoiceProps {
76
56
  name: string;
77
57
  }
78
58
  /**
79
- * @category cdk-utils.step-functions-manager
80
- * @subcategory Properties
81
59
  */
82
60
  export interface SfnWaitProps extends WaitProps {
83
61
  name: string;
84
62
  delayInSeconds: number;
85
63
  }
86
64
  /**
87
- * @category cdk-utils.step-functions-manager
88
- * @subcategory Properties
89
65
  */
90
66
  export interface SfnLambdaInvokeProps extends LambdaInvokeProps {
91
67
  name: string;
92
68
  retries?: SfnRetryProps[];
93
69
  }
94
70
  /**
95
- * @category cdk-utils.step-functions-manager
96
- * @subcategory Properties
97
71
  */
98
72
  export interface SfnCallApiGatewayRestApiEndpointProps extends CallApiGatewayRestApiEndpointProps {
99
73
  name: string;
100
74
  retries?: SfnRetryProps[];
101
75
  }
102
76
  /**
103
- * @category cdk-utils.step-functions-manager
104
- * @subcategory Properties
105
77
  */
106
78
  export interface SfnStateMachineProps extends StateMachineProps {
107
79
  }
108
80
  /**
109
- * @category cdk-utils.sfn-manager
110
- * @subcategory Properties
111
81
  */
112
82
  export interface SfnMapProps extends MapProps {
113
83
  }
114
84
  /**
115
- * @category cdk-utils.sfn-manager
116
- * @subcategory Properties
117
85
  */
118
86
  export interface SfnStartExecutionProps extends StepFunctionsStartExecutionProps {
119
87
  retries?: SfnRetryProps[];
@@ -3,9 +3,6 @@ import * as cr from 'aws-cdk-lib/custom-resources';
3
3
  import { CommonConstruct } from '../../../common';
4
4
  import { SSMParameterReaderProps } from './types';
5
5
  /**
6
- * @stability stable
7
- * @category cdk-utils.ssm-manager
8
- * @subcategory Construct
9
6
  * @classdesc Provides operations on AWS Systems 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,37 +16,34 @@ import { SSMParameterReaderProps } from './types';
19
16
  * this.acmManager.writeStringToParameters('MyParameter', this, ...props)
20
17
  * }
21
18
  * }
22
- *
23
19
  * @see [CDK Systems Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ssm-readme.html}
24
20
  */
25
21
  export declare class SsmManager {
26
22
  static SECRETS_MODIFIED_TIMESTAMP_PARAM: string;
27
23
  /**
28
24
  * Method to write a string parameter to the parameters store
29
- * @param {string} id scoped id of the resource
30
- * @param {CommonConstruct} scope scope in which this resource is defined
31
- * @param {ssm.StringParameterProps} props parameter props
25
+ * @param id scoped id of the resource
26
+ * @param scope scope in which this resource is defined
27
+ * @param props parameter props
32
28
  */
33
29
  writeStringToParameters(id: string, scope: CommonConstruct, props: ssm.StringParameterProps): ssm.StringParameter;
34
30
  /**
35
31
  * Method to read a string parameter from the parameters store
36
- * @param {string} id scoped id of the resource
37
- * @param {CommonConstruct} scope scope in which this resource is defined
38
- * @param {string} parameterName parameter name to lookup
32
+ * @param id scoped id of the resource
33
+ * @param scope scope in which this resource is defined
34
+ * @param parameterName parameter name to lookup
39
35
  */
40
36
  readStringParameter(id: string, scope: CommonConstruct, parameterName: string): string;
41
37
  /**
42
38
  * Method to read a string parameter from the parameters store in a given region
43
- * @param {string} id scoped id of the resource
44
- * @param {CommonConstruct} scope scope in which this resource is defined
45
- * @param {string} parameterName parameter name to lookup
46
- * @param {string} region region name to lookup parameter
39
+ * @param id scoped id of the resource
40
+ * @param scope scope in which this resource is defined
41
+ * @param parameterName parameter name to lookup
42
+ * @param region region name to lookup parameter
47
43
  */
48
44
  readStringParameterFromRegion(id: string, scope: CommonConstruct, parameterName: string, region: string): string;
49
45
  }
50
46
  /**
51
- * @category cdk-utils.ssm-manager
52
- * @subcategory Construct
53
47
  * @classdesc Provides utilities to read same/cross region SSM parameters
54
48
  */
55
49
  export declare class SSMParameterReader extends cr.AwsCustomResource {
@@ -28,9 +28,6 @@ const ssm = __importStar(require("aws-cdk-lib/aws-ssm"));
28
28
  const cr = __importStar(require("aws-cdk-lib/custom-resources"));
29
29
  const utils = __importStar(require("../../../utils"));
30
30
  /**
31
- * @stability stable
32
- * @category cdk-utils.ssm-manager
33
- * @subcategory Construct
34
31
  * @classdesc Provides operations on AWS Systems Manager.
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,23 +41,22 @@ const utils = __importStar(require("../../../utils"));
44
41
  * this.acmManager.writeStringToParameters('MyParameter', this, ...props)
45
42
  * }
46
43
  * }
47
- *
48
44
  * @see [CDK Systems Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ssm-readme.html}
49
45
  */
50
46
  class SsmManager {
51
47
  static SECRETS_MODIFIED_TIMESTAMP_PARAM = 'secrets-last-modified-timestamp';
52
48
  /**
53
49
  * Method to write a string parameter to the parameters store
54
- * @param {string} id scoped id of the resource
55
- * @param {CommonConstruct} scope scope in which this resource is defined
56
- * @param {ssm.StringParameterProps} props parameter props
50
+ * @param id scoped id of the resource
51
+ * @param scope scope in which this resource is defined
52
+ * @param props parameter props
57
53
  */
58
54
  writeStringToParameters(id, scope, props) {
59
55
  if (!props)
60
56
  throw `Parameter props undefined for ${id}`;
61
57
  const parameter = new ssm.StringParameter(scope, `${id}`, {
62
- parameterName: `${props.parameterName}-${scope.props.stage}`,
63
58
  description: `${props.description} - ${scope.props.stage} stage`,
59
+ parameterName: `${props.parameterName}-${scope.props.stage}`,
64
60
  stringValue: props.stringValue,
65
61
  });
66
62
  utils.createCfnOutput(`${id}-parameterArn`, scope, parameter.parameterArn);
@@ -69,9 +65,9 @@ class SsmManager {
69
65
  }
70
66
  /**
71
67
  * Method to read a string parameter from the parameters store
72
- * @param {string} id scoped id of the resource
73
- * @param {CommonConstruct} scope scope in which this resource is defined
74
- * @param {string} parameterName parameter name to lookup
68
+ * @param id scoped id of the resource
69
+ * @param scope scope in which this resource is defined
70
+ * @param parameterName parameter name to lookup
75
71
  */
76
72
  readStringParameter(id, scope, parameterName) {
77
73
  if (!parameterName || parameterName == '')
@@ -80,10 +76,10 @@ class SsmManager {
80
76
  }
81
77
  /**
82
78
  * Method to read a string parameter from the parameters store in a given region
83
- * @param {string} id scoped id of the resource
84
- * @param {CommonConstruct} scope scope in which this resource is defined
85
- * @param {string} parameterName parameter name to lookup
86
- * @param {string} region region name to lookup parameter
79
+ * @param id scoped id of the resource
80
+ * @param scope scope in which this resource is defined
81
+ * @param parameterName parameter name to lookup
82
+ * @param region region name to lookup parameter
87
83
  */
88
84
  readStringParameterFromRegion(id, scope, parameterName, region) {
89
85
  if (!parameterName || parameterName == '')
@@ -98,21 +94,19 @@ class SsmManager {
98
94
  }
99
95
  exports.SsmManager = SsmManager;
100
96
  /**
101
- * @category cdk-utils.ssm-manager
102
- * @subcategory Construct
103
97
  * @classdesc Provides utilities to read same/cross region SSM parameters
104
98
  */
105
99
  class SSMParameterReader extends cr.AwsCustomResource {
106
100
  constructor(scope, name, props) {
107
101
  const { parameterName, region } = props;
108
102
  const ssmAwsSdkCall = {
109
- service: 'SSM',
110
103
  action: 'getParameter',
111
104
  parameters: {
112
105
  Name: `${parameterName}-${scope.props.stage}`,
113
106
  },
114
- region,
115
107
  physicalResourceId: cr.PhysicalResourceId.of(Date.now().toString()),
108
+ region,
109
+ service: 'SSM',
116
110
  };
117
111
  super(scope, name, {
118
112
  onUpdate: ssmAwsSdkCall,
@@ -1,6 +1,4 @@
1
1
  /**
2
- * @category cdk-utils.ssm-manager
3
- * @subcategory Properties
4
2
  */
5
3
  export interface SSMParameterReaderProps {
6
4
  parameterName: string;