@gradientedge/cdk-utils 8.90.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 (226) 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 +7 -12
  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/index.d.ts +1 -0
  133. package/dist/src/lib/services/aws/web-application-firewall/index.js +1 -0
  134. package/dist/src/lib/services/aws/web-application-firewall/main.d.ts +6 -10
  135. package/dist/src/lib/services/aws/web-application-firewall/main.js +12 -16
  136. package/dist/src/lib/services/aws/web-application-firewall/types.d.ts +0 -4
  137. package/dist/src/lib/types/aws/index.d.ts +0 -2
  138. package/dist/src/lib/utils/aws/index.d.ts +6 -9
  139. package/dist/src/lib/utils/aws/index.js +7 -10
  140. package/dist/src/lib/utils/index.d.ts +6 -13
  141. package/dist/src/lib/utils/index.js +4 -12
  142. package/package.json +5 -5
  143. package/src/lib/common/construct.ts +4 -7
  144. package/src/lib/common/stack.ts +9 -13
  145. package/src/lib/common/types.ts +0 -2
  146. package/src/lib/construct/api-to-eventbridge-target/api.ts +0 -3
  147. package/src/lib/construct/api-to-eventbridge-target/event.ts +0 -3
  148. package/src/lib/construct/api-to-eventbridge-target/main.ts +41 -68
  149. package/src/lib/construct/api-to-eventbridge-target/types.ts +13 -25
  150. package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +0 -3
  151. package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +44 -81
  152. package/src/lib/construct/api-to-eventbridge-target-with-sns/types.ts +1 -5
  153. package/src/lib/construct/api-to-lambda-target/api.ts +0 -3
  154. package/src/lib/construct/api-to-lambda-target/main.ts +7 -21
  155. package/src/lib/construct/api-to-lambda-target/types.ts +7 -13
  156. package/src/lib/construct/graphql-api-lambda/main.ts +1 -19
  157. package/src/lib/construct/graphql-api-lambda/types.ts +4 -8
  158. package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +1 -12
  159. package/src/lib/construct/graphql-api-lambda-with-cache/types.ts +1 -3
  160. package/src/lib/construct/lambda-with-iam-access/main.ts +2 -14
  161. package/src/lib/construct/rest-api-lambda/main.ts +1 -19
  162. package/src/lib/construct/rest-api-lambda/types.ts +7 -12
  163. package/src/lib/construct/rest-api-lambda-with-cache/main.ts +3 -14
  164. package/src/lib/construct/rest-api-lambda-with-cache/types.ts +1 -3
  165. package/src/lib/construct/site-with-ecs-backend/main.ts +31 -52
  166. package/src/lib/construct/site-with-ecs-backend/types.ts +10 -11
  167. package/src/lib/construct/static-asset-deployment/main.ts +0 -8
  168. package/src/lib/construct/static-asset-deployment/types.ts +1 -1
  169. package/src/lib/construct/static-site/main.ts +1 -18
  170. package/src/lib/construct/static-site/types.ts +9 -11
  171. package/src/lib/services/aws/api-gateway/main.ts +43 -47
  172. package/src/lib/services/aws/api-gateway/types.ts +0 -2
  173. package/src/lib/services/aws/appconfig/constants.ts +26 -32
  174. package/src/lib/services/aws/appconfig/main.ts +19 -22
  175. package/src/lib/services/aws/appconfig/types.ts +1 -3
  176. package/src/lib/services/aws/certificate-manager/main.ts +5 -10
  177. package/src/lib/services/aws/certificate-manager/types.ts +3 -5
  178. package/src/lib/services/aws/cloudfront/main.ts +56 -62
  179. package/src/lib/services/aws/cloudfront/types.ts +1 -7
  180. package/src/lib/services/aws/cloudtrail/main.ts +8 -12
  181. package/src/lib/services/aws/cloudtrail/types.ts +0 -2
  182. package/src/lib/services/aws/cloudwatch/logs.ts +15 -19
  183. package/src/lib/services/aws/cloudwatch/main.ts +116 -122
  184. package/src/lib/services/aws/cloudwatch/types.ts +20 -42
  185. package/src/lib/services/aws/codebuild/main.ts +3 -7
  186. package/src/lib/services/aws/dynamodb/main.ts +13 -17
  187. package/src/lib/services/aws/dynamodb/types.ts +0 -2
  188. package/src/lib/services/aws/elastic-container-registry/main.ts +3 -7
  189. package/src/lib/services/aws/elastic-container-service/main.ts +35 -39
  190. package/src/lib/services/aws/elastic-container-service/types.ts +1 -9
  191. package/src/lib/services/aws/elastic-file-system/main.ts +14 -18
  192. package/src/lib/services/aws/elastic-file-system/types.ts +1 -5
  193. package/src/lib/services/aws/elastic-kubernetes-service/main.ts +8 -12
  194. package/src/lib/services/aws/elastic-kubernetes-service/types.ts +1 -3
  195. package/src/lib/services/aws/elasticache/main.ts +35 -39
  196. package/src/lib/services/aws/elasticache/types.ts +0 -4
  197. package/src/lib/services/aws/eventbridge/main.ts +34 -38
  198. package/src/lib/services/aws/eventbridge/target.ts +8 -11
  199. package/src/lib/services/aws/eventbridge/types.ts +2 -10
  200. package/src/lib/services/aws/evidently/main.ts +19 -23
  201. package/src/lib/services/aws/evidently/types.ts +0 -10
  202. package/src/lib/services/aws/identity-access-management/main.ts +97 -101
  203. package/src/lib/services/aws/key-management-service/main.ts +6 -10
  204. package/src/lib/services/aws/key-management-service/types.ts +0 -2
  205. package/src/lib/services/aws/lambda/main.ts +64 -69
  206. package/src/lib/services/aws/lambda/types.ts +6 -16
  207. package/src/lib/services/aws/route53/main.ts +19 -23
  208. package/src/lib/services/aws/route53/types.ts +0 -2
  209. package/src/lib/services/aws/secrets-manager/main.ts +6 -28
  210. package/src/lib/services/aws/simple-notification-service/main.ts +10 -14
  211. package/src/lib/services/aws/simple-notification-service/types.ts +0 -2
  212. package/src/lib/services/aws/simple-queue-service/main.ts +19 -23
  213. package/src/lib/services/aws/simple-queue-service/types.ts +4 -6
  214. package/src/lib/services/aws/simple-storage-service/main.ts +32 -40
  215. package/src/lib/services/aws/simple-storage-service/types.ts +2 -8
  216. package/src/lib/services/aws/step-function/main.ts +91 -95
  217. package/src/lib/services/aws/step-function/types.ts +0 -32
  218. package/src/lib/services/aws/systems-manager/main.ts +13 -19
  219. package/src/lib/services/aws/systems-manager/types.ts +0 -2
  220. package/src/lib/services/aws/virtual-private-cloud/main.ts +10 -16
  221. package/src/lib/services/aws/web-application-firewall/index.ts +1 -0
  222. package/src/lib/services/aws/web-application-firewall/main.ts +12 -16
  223. package/src/lib/services/aws/web-application-firewall/types.ts +0 -4
  224. package/src/lib/types/aws/index.ts +0 -2
  225. package/src/lib/utils/aws/index.ts +7 -10
  226. package/src/lib/utils/index.ts +4 -12
@@ -1,13 +1,9 @@
1
1
  import { CfnCacheClusterProps, CfnReplicationGroupProps } from 'aws-cdk-lib/aws-elasticache'
2
2
 
3
3
  /**
4
- * @category cdk-utils.elasticache-manager
5
- * @category Compute
6
4
  */
7
5
  export interface ElastiCacheProps extends CfnCacheClusterProps {}
8
6
 
9
7
  /**
10
- * @category cdk-utils.elasticache-manager
11
- * @category Compute
12
8
  */
13
9
  export interface ReplicatedElastiCacheProps extends CfnReplicationGroupProps {}
@@ -11,9 +11,6 @@ import { CommonConstruct } from '../../../common'
11
11
  import { EventBusProps, EventRuleProps, RuleProps, SqsToSfnPipeProps } from './types'
12
12
 
13
13
  /**
14
- * @stability stable
15
- * @category cdk-utils.event-manager
16
- * @subcategory Construct
17
14
  * @classdesc Provides operations on AWS EventBridge.
18
15
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
19
16
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
@@ -27,15 +24,14 @@ import { EventBusProps, EventRuleProps, RuleProps, SqsToSfnPipeProps } from './t
27
24
  * this.eventManager.createLambdaRule('MyLambdaRule', this, lambdaFunction)
28
25
  * }
29
26
  * }
30
- *
31
27
  * @see [CDK EventBridge Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events-readme.html}
32
28
  */
33
29
  export class EventManager {
34
30
  /**
35
31
  * Method to create an event bus
36
- * @param {string} id scoped id of the resource
37
- * @param {CommonConstruct} scope scope in which this resource is defined
38
- * @param {EventBusProps} props event bus properties
32
+ * @param id scoped id of the resource
33
+ * @param scope scope in which this resource is defined
34
+ * @param props event bus properties
39
35
  */
40
36
  public createEventBus(id: string, scope: CommonConstruct, props: EventBusProps) {
41
37
  if (!props) throw `EventBus props undefined for ${id}`
@@ -52,11 +48,11 @@ export class EventManager {
52
48
 
53
49
  /**
54
50
  * Method to create an event rule
55
- * @param {string} id scoped id of the resource
56
- * @param {CommonConstruct} scope scope in which this resource is defined
57
- * @param {EventRuleProps} props event rule properties
58
- * @param {events.IEventBus?} eventBus optional custom event bus
59
- * @param {events.IRuleTarget[]?} targets optional event targets
51
+ * @param id scoped id of the resource
52
+ * @param scope scope in which this resource is defined
53
+ * @param props event rule properties
54
+ * @param eventBus optional custom event bus
55
+ * @param targets optional event targets
60
56
  */
61
57
  public createRule(
62
58
  id: string,
@@ -68,11 +64,11 @@ export class EventManager {
68
64
  if (!props) throw `EventRule props undefined for ${id}`
69
65
 
70
66
  const rule = new events.Rule(scope, `${id}`, {
71
- eventBus: eventBus,
72
67
  description: props.description,
73
- ruleName: `${props.ruleName}-${scope.props.stage}`,
74
- eventPattern: props.eventPattern,
75
68
  enabled: props.enabled,
69
+ eventBus: eventBus,
70
+ eventPattern: props.eventPattern,
71
+ ruleName: `${props.ruleName}-${scope.props.stage}`,
76
72
  schedule: props.schedule,
77
73
  })
78
74
 
@@ -96,13 +92,13 @@ export class EventManager {
96
92
 
97
93
  /**
98
94
  * @summary Method to create an eventbridge rule with lambda target
99
- * @param {string} id scoped id of the resource
100
- * @param {CommonConstruct} scope scope in which this resource is defined
101
- * @param {RuleProps} props
102
- * @param {lambda.Function} lambdaFunction
103
- * @param {string} eventBusName
104
- * @param {any} eventPattern
105
- * @param {string} scheduleExpression
95
+ * @param id scoped id of the resource
96
+ * @param scope scope in which this resource is defined
97
+ * @param props
98
+ * @param lambdaFunction
99
+ * @param eventBusName
100
+ * @param eventPattern
101
+ * @param scheduleExpression
106
102
  */
107
103
  public createLambdaRule(
108
104
  id: string,
@@ -119,8 +115,8 @@ export class EventManager {
119
115
  description: 'Rule to send notification to lambda function target',
120
116
  eventBusName: eventBusName,
121
117
  eventPattern: eventPattern,
122
- scheduleExpression: scheduleExpression,
123
118
  name: `${props.name}-${scope.props.stage}`,
119
+ scheduleExpression: scheduleExpression,
124
120
  state: props.state,
125
121
  targets: [
126
122
  {
@@ -146,14 +142,14 @@ export class EventManager {
146
142
 
147
143
  /**
148
144
  * @summary Method to create an eventbridge rule with fargate task target
149
- * @param {string} id scoped id of the resource
150
- * @param {CommonConstruct} scope scope in which this resource is defined
151
- * @param {EventRuleProps} props
152
- * @param {ecs.ICluster} cluster
153
- * @param {ecs.ITaskDefinition} task
154
- * @param {string[]} subnetIds
155
- * @param {iam.Role | iam.CfnRole} role
156
- * @param {any} eventPattern
145
+ * @param id scoped id of the resource
146
+ * @param scope scope in which this resource is defined
147
+ * @param props
148
+ * @param cluster
149
+ * @param task
150
+ * @param subnetIds
151
+ * @param role
152
+ * @param eventPattern
157
153
  */
158
154
  public createFargateTaskRule(
159
155
  id: string,
@@ -175,7 +171,6 @@ export class EventManager {
175
171
  targets: [
176
172
  {
177
173
  arn: cluster.clusterArn,
178
- id: `${id}-${scope.props.stage}`,
179
174
  ecsParameters: {
180
175
  launchType: 'FARGATE',
181
176
  networkConfiguration: {
@@ -184,6 +179,7 @@ export class EventManager {
184
179
  taskCount: 1,
185
180
  taskDefinitionArn: task.taskDefinitionArn,
186
181
  },
182
+ id: `${id}-${scope.props.stage}`,
187
183
  roleArn: role instanceof iam.Role ? role.roleArn : role.attrArn,
188
184
  },
189
185
  ],
@@ -197,8 +193,8 @@ export class EventManager {
197
193
 
198
194
  /**
199
195
  * @summary Method to create an eventbridge pipe with sqs queue as source and step function as target
200
- * @param {string} id scoped id of the resource
201
- * @param {CommonConstruct} scope scope in which this resource is defined
196
+ * @param id scoped id of the resource
197
+ * @param scope scope in which this resource is defined
202
198
  * @param props the props for the pipe
203
199
  * @param sourceQueue the source sqs queue
204
200
  * @param targetStepFunction the target step function
@@ -219,8 +215,11 @@ export class EventManager {
219
215
 
220
216
  const pipe = new pipes.CfnPipe(scope, `${id}`, {
221
217
  ...props,
222
- name: `${props.name}-${scope.props.stage}`,
223
218
  description: props.description,
219
+ enrichment: props.enrichment,
220
+ enrichmentParameters: props.enrichmentParameters,
221
+ name: `${props.name}-${scope.props.stage}`,
222
+ roleArn: pipeRole.roleArn,
224
223
  source: sourceQueue.queueArn,
225
224
  sourceParameters: {
226
225
  filterCriteria: props.pipeFilterPattern
@@ -244,9 +243,6 @@ export class EventManager {
244
243
  invocationType: props.sfnInvocationType ?? 'FIRE_AND_FORGET',
245
244
  },
246
245
  },
247
- enrichment: props.enrichment,
248
- enrichmentParameters: props.enrichmentParameters,
249
- roleArn: pipeRole.roleArn,
250
246
  })
251
247
 
252
248
  utils.createCfnOutput(`${id}-pipeArn`, scope, pipe.attrArn)
@@ -5,9 +5,6 @@ import * as logs from 'aws-cdk-lib/aws-logs'
5
5
  import { CommonConstruct } from '../../../common'
6
6
 
7
7
  /**
8
- * @stability stable
9
- * @category cdk-utils.event-taeget-manager
10
- * @subcategory Construct
11
8
  * @classdesc Provides operations on AWS EventBridge Targets.
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,17 +18,16 @@ import { CommonConstruct } from '../../../common'
21
18
  * this.eventTargetManager.createCloudWatchLogGroupNoPolicy('MyLogGrouptarget', this, myLogGroup)
22
19
  * }
23
20
  * }
24
- *
25
21
  * @see [CDK EventBridge Target Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets-readme.html}
26
22
  */
27
23
  export class EventTargetManager {
28
24
  /**
29
25
  * @summary Method to create a cloud watch log group target without a policy.
30
26
  * - This method is created as a workaround for cdk issue - https://github.com/aws/aws-cdk/issues/17002
31
- * @param {string} id scoped id of the resource
32
- * @param {CommonConstruct} scope scope in which this resource is defined
33
- * @param {logs.ILogGroup} logGroup the log group
34
- * @param {LogGroupNoPolicyProps} props the log group target properties
27
+ * @param id scoped id of the resource
28
+ * @param scope scope in which this resource is defined
29
+ * @param logGroup the log group
30
+ * @param props the log group target properties
35
31
  */
36
32
  public createCloudWatchLogGroupNoPolicy(
37
33
  id: string,
@@ -51,7 +47,6 @@ export interface LogGroupNoPolicyProps extends targets.TargetBaseProps {
51
47
  * The event to send to the CloudWatch LogGroup
52
48
  *
53
49
  * This will be the event logged into the CloudWatch LogGroup
54
- *
55
50
  * @default - the entire EventBridge event
56
51
  */
57
52
  readonly event?: events.RuleTargetInput
@@ -65,6 +60,8 @@ export class CloudWatchLogGroupNoPolicy implements events.IRuleTarget {
65
60
 
66
61
  /**
67
62
  * Returns a RuleTarget that can be used to log an event into a CloudWatch LogGroup
63
+ * @param _rule
64
+ * @param _id
68
65
  */
69
66
  public bind(_rule: events.IRule, _id?: string): events.RuleTargetConfig {
70
67
  const logGroupStack = cdk.Stack.of(this.logGroup)
@@ -72,10 +69,10 @@ export class CloudWatchLogGroupNoPolicy implements events.IRuleTarget {
72
69
  return {
73
70
  ...targets.bindBaseTargetConfig(this.props),
74
71
  arn: logGroupStack.formatArn({
75
- service: 'logs',
76
- resource: 'log-group',
77
72
  arnFormat: cdk.ArnFormat.COLON_RESOURCE_NAME,
73
+ resource: 'log-group',
78
74
  resourceName: this.logGroup.logGroupName,
75
+ service: 'logs',
79
76
  }),
80
77
  input: this.props.event,
81
78
  targetResource: this.logGroup,
@@ -4,35 +4,27 @@ import { TagProps } from '../../../types'
4
4
 
5
5
  /**
6
6
  }
7
- * @category cdk-utils.event-manager
8
- * @subcategory Properties
9
7
  */
10
8
  export interface SqsToSfnPipeProps extends CfnPipeProps {
11
9
  pipeFilterPattern?: any
10
+ sfnInputTemplate?: string
11
+ sfnInvocationType?: string
12
12
  sqsBatchSize?: number
13
13
  sqsMaximumBatchingWindowInSeconds?: number
14
- sfnInvocationType?: string
15
- sfnInputTemplate?: string
16
14
  }
17
15
 
18
16
  /**
19
- * @category cdk-utils.event-manager
20
- * @subcategory Properties
21
17
  */
22
18
  export interface EventRuleProps extends EBRuleProps {
23
19
  tags?: TagProps[]
24
20
  }
25
21
 
26
22
  /**
27
- * @category cdk-utils.event-manager
28
- * @subcategory Properties
29
23
  */
30
24
  export interface RuleProps extends CfnRuleProps {
31
25
  input?: string
32
26
  }
33
27
 
34
28
  /**
35
- * @category cdk-utils.event-manager
36
- * @subcategory Properties
37
29
  */
38
30
  export interface EventBusProps extends EBProps {}
@@ -10,9 +10,6 @@ import {
10
10
  } from './types'
11
11
 
12
12
  /**
13
- * @stability stable
14
- * @category cdk-utils.evidently-manager
15
- * @subcategory Construct
16
13
  * @classdesc Provides operations on AWS Evidently.
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,21 +23,20 @@ import {
26
23
  * this.evidentlyManager.createProject('MyNewProhect', this, props)
27
24
  * }
28
25
  * }
29
- *
30
26
  * @see [CDK Evidently Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_evidently-readme.html}
31
27
  */
32
28
  export class EvidentlyManager {
33
29
  /**
34
30
  * @summary Method to create a project
35
- * @param {string} id scoped id of the resource
36
- * @param {CommonConstruct} scope scope in which this resource is defined
37
- * @param {EvidentlyProjectProps} props the project properties
31
+ * @param id scoped id of the resource
32
+ * @param scope scope in which this resource is defined
33
+ * @param props the project properties
38
34
  */
39
35
  public createProject(id: string, scope: CommonConstruct, props: EvidentlyProjectProps) {
40
36
  const project = new evidently.CfnProject(scope, `${id}`, {
41
37
  ...props,
42
- name: `${props.name}-${scope.props.stage}`,
43
38
  description: `${props.description} ${scope.props.stage}`,
39
+ name: `${props.name}-${scope.props.stage}`,
44
40
  })
45
41
  utils.createCfnOutput(`${id}-projectArn`, scope, project.attrArn)
46
42
  utils.createCfnOutput(`${id}-projectName`, scope, project.name)
@@ -49,9 +45,9 @@ export class EvidentlyManager {
49
45
 
50
46
  /**
51
47
  * @summary Method to create a feature
52
- * @param {string} id scoped id of the resource
53
- * @param {CommonConstruct} scope scope in which this resource is defined
54
- * @param {EvidentlyFeatureProps} props the feature properties
48
+ * @param id scoped id of the resource
49
+ * @param scope scope in which this resource is defined
50
+ * @param props the feature properties
55
51
  */
56
52
  public createFeature(id: string, scope: CommonConstruct, props: EvidentlyFeatureProps) {
57
53
  const feature = new evidently.CfnFeature(scope, `${id}`, props)
@@ -62,15 +58,15 @@ export class EvidentlyManager {
62
58
 
63
59
  /**
64
60
  * @summary Method to create a launch
65
- * @param {string} id scoped id of the resource
66
- * @param {CommonConstruct} scope scope in which this resource is defined
67
- * @param {EvidentlyLaunchProps} props the launch properties
61
+ * @param id scoped id of the resource
62
+ * @param scope scope in which this resource is defined
63
+ * @param props the launch properties
68
64
  */
69
65
  public createLaunch(id: string, scope: CommonConstruct, props: EvidentlyLaunchProps) {
70
66
  const launch = new evidently.CfnLaunch(scope, `${id}`, {
71
67
  ...props,
72
- name: `${props.name}-${scope.props.stage}`,
73
68
  description: `${props.description} ${scope.props.stage}`,
69
+ name: `${props.name}-${scope.props.stage}`,
74
70
  })
75
71
  utils.createCfnOutput(`${id}-launchArn`, scope, launch.attrArn)
76
72
  utils.createCfnOutput(`${id}-launchName`, scope, launch.name)
@@ -79,15 +75,15 @@ export class EvidentlyManager {
79
75
 
80
76
  /**
81
77
  * @summary Method to create an experiment
82
- * @param {string} id scoped id of the resource
83
- * @param {CommonConstruct} scope scope in which this resource is defined
84
- * @param {EvidentlyExperimentProps} props the experiment properties
78
+ * @param id scoped id of the resource
79
+ * @param scope scope in which this resource is defined
80
+ * @param props the experiment properties
85
81
  */
86
82
  public createExperiment(id: string, scope: CommonConstruct, props: EvidentlyExperimentProps) {
87
83
  const experiment = new evidently.CfnExperiment(scope, `${id}`, {
88
84
  ...props,
89
- name: `${props.name}-${scope.props.stage}`,
90
85
  description: `${props.description} ${scope.props.stage}`,
86
+ name: `${props.name}-${scope.props.stage}`,
91
87
  })
92
88
  utils.createCfnOutput(`${id}-experimentArn`, scope, experiment.attrArn)
93
89
  utils.createCfnOutput(`${id}-experimentName`, scope, experiment.name)
@@ -96,15 +92,15 @@ export class EvidentlyManager {
96
92
 
97
93
  /**
98
94
  * @summary Method to create a segment
99
- * @param {string} id scoped id of the resource
100
- * @param {CommonConstruct} scope scope in which this resource is defined
101
- * @param {EvidentlySegmentProps} props the segment properties
95
+ * @param id scoped id of the resource
96
+ * @param scope scope in which this resource is defined
97
+ * @param props the segment properties
102
98
  */
103
99
  public createSegment(id: string, scope: CommonConstruct, props: EvidentlySegmentProps) {
104
100
  const segment = new evidently.CfnSegment(scope, `${id}`, {
105
101
  ...props,
106
- name: `${props.name}-${scope.props.stage}`,
107
102
  description: `${props.description} ${scope.props.stage}`,
103
+ name: `${props.name}-${scope.props.stage}`,
108
104
  })
109
105
  utils.createCfnOutput(`${id}-segmentArn`, scope, segment.attrArn)
110
106
  utils.createCfnOutput(`${id}-segmentName`, scope, segment.name)
@@ -7,31 +7,21 @@ import {
7
7
  } from 'aws-cdk-lib/aws-evidently'
8
8
 
9
9
  /**
10
- * @category cdk-utils.evidently-manager
11
- * @subcategory Properties
12
10
  */
13
11
  export interface EvidentlyProjectProps extends CfnProjectProps {}
14
12
 
15
13
  /**
16
- * @category cdk-utils.evidently-manager
17
- * @subcategory Properties
18
14
  */
19
15
  export interface EvidentlyFeatureProps extends CfnFeatureProps {}
20
16
 
21
17
  /**
22
- * @category cdk-utils.evidently-manager
23
- * @subcategory Properties
24
18
  */
25
19
  export interface EvidentlyLaunchProps extends CfnLaunchProps {}
26
20
 
27
21
  /**
28
- * @category cdk-utils.evidently-manager
29
- * @subcategory Properties
30
22
  */
31
23
  export interface EvidentlyExperimentProps extends CfnExperimentProps {}
32
24
 
33
25
  /**
34
- * @category cdk-utils.evidently-manager
35
- * @subcategory Properties
36
26
  */
37
27
  export interface EvidentlySegmentProps extends CfnSegmentProps {}