@gradientedge/cdk-utils-aws 1.0.1 → 2.1.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 (158) hide show
  1. package/README.md +31 -0
  2. package/dist/src/common/construct.d.ts +2 -2
  3. package/dist/src/common/construct.js +2 -2
  4. package/dist/src/common/resource-name-formatter.d.ts +1 -0
  5. package/dist/src/common/resource-name-formatter.js +1 -0
  6. package/dist/src/common/stack.d.ts +4 -3
  7. package/dist/src/common/stack.js +6 -5
  8. package/dist/src/common/types.d.ts +2 -0
  9. package/dist/src/construct/api-to-any-target/main.d.ts +2 -1
  10. package/dist/src/construct/api-to-any-target/main.js +3 -2
  11. package/dist/src/construct/api-to-any-target/target.d.ts +1 -0
  12. package/dist/src/construct/api-to-any-target/target.js +1 -0
  13. package/dist/src/construct/api-to-any-target/types.d.ts +4 -0
  14. package/dist/src/construct/api-to-eventbridge-target/api.d.ts +2 -1
  15. package/dist/src/construct/api-to-eventbridge-target/api.js +2 -1
  16. package/dist/src/construct/api-to-eventbridge-target/event.d.ts +2 -1
  17. package/dist/src/construct/api-to-eventbridge-target/event.js +2 -1
  18. package/dist/src/construct/api-to-eventbridge-target/main.d.ts +3 -2
  19. package/dist/src/construct/api-to-eventbridge-target/main.js +6 -5
  20. package/dist/src/construct/api-to-eventbridge-target/types.d.ts +8 -3
  21. package/dist/src/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +2 -1
  22. package/dist/src/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.js +2 -1
  23. package/dist/src/construct/api-to-eventbridge-target-with-sns/main.d.ts +3 -2
  24. package/dist/src/construct/api-to-eventbridge-target-with-sns/main.js +6 -5
  25. package/dist/src/construct/api-to-eventbridge-target-with-sns/types.d.ts +3 -1
  26. package/dist/src/construct/api-to-lambda-target/api.d.ts +2 -1
  27. package/dist/src/construct/api-to-lambda-target/api.js +2 -1
  28. package/dist/src/construct/api-to-lambda-target/main.d.ts +1 -0
  29. package/dist/src/construct/api-to-lambda-target/main.js +2 -1
  30. package/dist/src/construct/api-to-lambda-target/types.d.ts +5 -2
  31. package/dist/src/construct/application-configuration/main.d.ts +1 -0
  32. package/dist/src/construct/application-configuration/main.js +1 -0
  33. package/dist/src/construct/application-configuration/types.d.ts +1 -0
  34. package/dist/src/construct/event-handler/handler.d.ts +1 -0
  35. package/dist/src/construct/event-handler/handler.js +1 -0
  36. package/dist/src/construct/event-handler/main.d.ts +2 -1
  37. package/dist/src/construct/event-handler/main.js +2 -1
  38. package/dist/src/construct/event-handler/types.d.ts +2 -0
  39. package/dist/src/construct/lambda-with-iam-access/main.d.ts +2 -1
  40. package/dist/src/construct/lambda-with-iam-access/main.js +2 -1
  41. package/dist/src/construct/lambda-with-iam-access/types.d.ts +2 -0
  42. package/dist/src/construct/piped-event-handler/main.d.ts +2 -1
  43. package/dist/src/construct/piped-event-handler/main.js +2 -1
  44. package/dist/src/construct/piped-event-handler/types.d.ts +1 -0
  45. package/dist/src/construct/rest-api-lambda/main.d.ts +3 -2
  46. package/dist/src/construct/rest-api-lambda/main.js +3 -2
  47. package/dist/src/construct/rest-api-lambda/types.d.ts +3 -1
  48. package/dist/src/construct/rest-api-lambda-with-cache/main.d.ts +4 -3
  49. package/dist/src/construct/rest-api-lambda-with-cache/main.js +3 -2
  50. package/dist/src/construct/rest-api-lambda-with-cache/types.d.ts +1 -0
  51. package/dist/src/construct/site-with-ecs-backend/constants.d.ts +1 -0
  52. package/dist/src/construct/site-with-ecs-backend/constants.js +1 -0
  53. package/dist/src/construct/site-with-ecs-backend/main.d.ts +2 -1
  54. package/dist/src/construct/site-with-ecs-backend/main.js +5 -4
  55. package/dist/src/construct/site-with-ecs-backend/types.d.ts +7 -2
  56. package/dist/src/construct/site-with-lambda-backend/constants.d.ts +2 -0
  57. package/dist/src/construct/site-with-lambda-backend/constants.js +2 -0
  58. package/dist/src/construct/site-with-lambda-backend/main.d.ts +2 -1
  59. package/dist/src/construct/site-with-lambda-backend/main.js +5 -4
  60. package/dist/src/construct/site-with-lambda-backend/types.d.ts +5 -0
  61. package/dist/src/construct/static-asset-deployment/main.d.ts +2 -1
  62. package/dist/src/construct/static-asset-deployment/main.js +4 -3
  63. package/dist/src/construct/static-asset-deployment/types.d.ts +3 -0
  64. package/dist/src/construct/static-site/main.d.ts +2 -1
  65. package/dist/src/construct/static-site/main.js +3 -2
  66. package/dist/src/construct/static-site/types.d.ts +2 -1
  67. package/dist/src/services/api-gateway/main.d.ts +2 -1
  68. package/dist/src/services/api-gateway/main.js +4 -3
  69. package/dist/src/services/api-gateway/types.d.ts +2 -0
  70. package/dist/src/services/appconfig/constants.d.ts +2 -0
  71. package/dist/src/services/appconfig/constants.js +2 -0
  72. package/dist/src/services/appconfig/main.d.ts +2 -1
  73. package/dist/src/services/appconfig/main.js +8 -7
  74. package/dist/src/services/appconfig/types.d.ts +2 -0
  75. package/dist/src/services/certificate-manager/main.d.ts +13 -11
  76. package/dist/src/services/certificate-manager/main.js +14 -12
  77. package/dist/src/services/certificate-manager/types.d.ts +1 -0
  78. package/dist/src/services/cloudfront/main.d.ts +2 -1
  79. package/dist/src/services/cloudfront/main.js +6 -5
  80. package/dist/src/services/cloudfront/types.d.ts +2 -0
  81. package/dist/src/services/cloudtrail/main.d.ts +2 -1
  82. package/dist/src/services/cloudtrail/main.js +4 -3
  83. package/dist/src/services/cloudtrail/types.d.ts +1 -0
  84. package/dist/src/services/cloudwatch/logs.d.ts +2 -1
  85. package/dist/src/services/cloudwatch/logs.js +7 -6
  86. package/dist/src/services/cloudwatch/main.d.ts +2 -1
  87. package/dist/src/services/cloudwatch/main.js +29 -28
  88. package/dist/src/services/cloudwatch/types.d.ts +11 -0
  89. package/dist/src/services/codebuild/main.d.ts +2 -1
  90. package/dist/src/services/codebuild/main.js +2 -1
  91. package/dist/src/services/constants.d.ts +1 -0
  92. package/dist/src/services/constants.js +1 -0
  93. package/dist/src/services/dynamodb/main.d.ts +2 -1
  94. package/dist/src/services/dynamodb/main.js +6 -5
  95. package/dist/src/services/dynamodb/types.d.ts +2 -0
  96. package/dist/src/services/elastic-container-registry/main.d.ts +2 -1
  97. package/dist/src/services/elastic-container-registry/main.js +2 -1
  98. package/dist/src/services/elastic-container-service/main.d.ts +2 -1
  99. package/dist/src/services/elastic-container-service/main.js +8 -7
  100. package/dist/src/services/elastic-container-service/types.d.ts +6 -0
  101. package/dist/src/services/elastic-file-system/main.d.ts +4 -1
  102. package/dist/src/services/elastic-file-system/main.js +7 -4
  103. package/dist/src/services/elastic-file-system/types.d.ts +2 -0
  104. package/dist/src/services/elastic-kubernetes-service/main.d.ts +2 -1
  105. package/dist/src/services/elastic-kubernetes-service/main.js +4 -3
  106. package/dist/src/services/elastic-kubernetes-service/types.d.ts +1 -0
  107. package/dist/src/services/elasticache/main.d.ts +1 -0
  108. package/dist/src/services/elasticache/main.js +4 -3
  109. package/dist/src/services/elasticache/types.d.ts +2 -0
  110. package/dist/src/services/eventbridge/main.d.ts +3 -2
  111. package/dist/src/services/eventbridge/main.js +18 -17
  112. package/dist/src/services/eventbridge/target.d.ts +6 -5
  113. package/dist/src/services/eventbridge/target.js +4 -4
  114. package/dist/src/services/eventbridge/types.d.ts +6 -0
  115. package/dist/src/services/evidently/main.d.ts +2 -1
  116. package/dist/src/services/evidently/main.js +11 -10
  117. package/dist/src/services/evidently/types.d.ts +5 -0
  118. package/dist/src/services/identity-access-management/main.d.ts +2 -1
  119. package/dist/src/services/identity-access-management/main.js +2 -1
  120. package/dist/src/services/key-management-service/main.d.ts +2 -1
  121. package/dist/src/services/key-management-service/main.js +4 -3
  122. package/dist/src/services/key-management-service/types.d.ts +1 -0
  123. package/dist/src/services/lambda/main.d.ts +2 -1
  124. package/dist/src/services/lambda/main.js +7 -6
  125. package/dist/src/services/lambda/types.d.ts +7 -0
  126. package/dist/src/services/route53/main.d.ts +2 -1
  127. package/dist/src/services/route53/main.js +7 -6
  128. package/dist/src/services/route53/types.d.ts +1 -0
  129. package/dist/src/services/secrets-manager/main.d.ts +2 -1
  130. package/dist/src/services/secrets-manager/main.js +5 -4
  131. package/dist/src/services/secrets-manager/types.d.ts +1 -0
  132. package/dist/src/services/simple-notification-service/main.d.ts +2 -1
  133. package/dist/src/services/simple-notification-service/main.js +6 -5
  134. package/dist/src/services/simple-notification-service/types.d.ts +1 -0
  135. package/dist/src/services/simple-queue-service/main.d.ts +2 -1
  136. package/dist/src/services/simple-queue-service/main.js +4 -3
  137. package/dist/src/services/simple-queue-service/types.d.ts +1 -0
  138. package/dist/src/services/simple-storage-service/main.d.ts +2 -1
  139. package/dist/src/services/simple-storage-service/main.js +5 -4
  140. package/dist/src/services/simple-storage-service/types.d.ts +3 -0
  141. package/dist/src/services/step-function/main.d.ts +2 -1
  142. package/dist/src/services/step-function/main.js +17 -16
  143. package/dist/src/services/step-function/types.d.ts +16 -0
  144. package/dist/src/services/systems-manager/main.d.ts +4 -2
  145. package/dist/src/services/systems-manager/main.js +12 -10
  146. package/dist/src/services/systems-manager/types.d.ts +2 -0
  147. package/dist/src/services/virtual-private-cloud/ipv6.d.ts +1 -0
  148. package/dist/src/services/virtual-private-cloud/ipv6.js +1 -0
  149. package/dist/src/services/virtual-private-cloud/main.d.ts +2 -1
  150. package/dist/src/services/virtual-private-cloud/main.js +4 -3
  151. package/dist/src/services/virtual-private-cloud/types.d.ts +1 -0
  152. package/dist/src/services/web-application-firewall/main.d.ts +2 -1
  153. package/dist/src/services/web-application-firewall/main.js +6 -5
  154. package/dist/src/services/web-application-firewall/types.d.ts +2 -0
  155. package/dist/src/types/index.d.ts +1 -0
  156. package/dist/src/utils/index.d.ts +4 -0
  157. package/dist/src/utils/index.js +4 -0
  158. package/package.json +17 -5
@@ -4,7 +4,7 @@ import { Cluster } from 'aws-cdk-lib/aws-eks';
4
4
  import { CommonConstruct } from '../../common/index.js';
5
5
  import { EksClusterProps } from './types.js';
6
6
  /**
7
- * @classdesc Provides operations on AWS Elastic Kubernetes Service.
7
+ * Provides operations on AWS Elastic Kubernetes Service.
8
8
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
9
9
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
10
10
  * @example
@@ -18,6 +18,7 @@ import { EksClusterProps } from './types.js';
18
18
  * }
19
19
  * }
20
20
  * @see [CDK EKS Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks-readme.html}
21
+ * @category Service
21
22
  */
22
23
  export declare class EksManager {
23
24
  /**
@@ -2,7 +2,7 @@ import { InstanceClass, InstanceSize, InstanceType } from 'aws-cdk-lib/aws-ec2';
2
2
  import { Cluster, KubernetesVersion } from 'aws-cdk-lib/aws-eks';
3
3
  import { createCfnOutput } from '../../utils/index.js';
4
4
  /**
5
- * @classdesc Provides operations on AWS Elastic Kubernetes Service.
5
+ * Provides operations on AWS Elastic Kubernetes Service.
6
6
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
7
7
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
8
8
  * @example
@@ -16,6 +16,7 @@ import { createCfnOutput } from '../../utils/index.js';
16
16
  * }
17
17
  * }
18
18
  * @see [CDK EKS Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks-readme.html}
19
+ * @category Service
19
20
  */
20
21
  export class EksManager {
21
22
  /**
@@ -28,9 +29,9 @@ export class EksManager {
28
29
  */
29
30
  createEksDeployment(id, scope, props, image, vpc) {
30
31
  if (!props)
31
- throw `EksCluster props undefined for ${id}`;
32
+ throw new Error(`EksCluster props undefined for ${id}`);
32
33
  if (!props.clusterName)
33
- throw `EksCluster clusterName undefined for ${id}`;
34
+ throw new Error(`EksCluster clusterName undefined for ${id}`);
34
35
  const appLabel = { app: `${id}`.toLowerCase() };
35
36
  const deployment = {
36
37
  apiVersion: 'apps/v1',
@@ -1,6 +1,7 @@
1
1
  import { ClusterProps } from 'aws-cdk-lib/aws-eks';
2
2
  /**
3
3
  */
4
+ /** @category Interface */
4
5
  export interface EksClusterProps extends ClusterProps {
5
6
  appCapacity: number;
6
7
  appContainerPort: number;
@@ -16,6 +16,7 @@ import { ElastiCacheProps, ReplicatedElastiCacheProps } from './types.js';
16
16
  * }
17
17
  * }
18
18
  * @see [CDK ElastiCache Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache-readme.html}
19
+ * @category Service
19
20
  */
20
21
  export declare class ElastiCacheManager {
21
22
  /**
@@ -17,6 +17,7 @@ import { createCfnOutput } from '../../utils/index.js';
17
17
  * }
18
18
  * }
19
19
  * @see [CDK ElastiCache Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache-readme.html}
20
+ * @category Service
20
21
  */
21
22
  export class ElastiCacheManager {
22
23
  /**
@@ -43,9 +44,9 @@ export class ElastiCacheManager {
43
44
  */
44
45
  createElastiCache(id, scope, props, subnetIds, securityGroupIds, logDeliveryConfigurations) {
45
46
  if (!props)
46
- throw `ElastiCache props undefined for ${id}`;
47
+ throw new Error(`ElastiCache props undefined for ${id}`);
47
48
  if (!props.clusterName)
48
- throw `ElastiCache clusterName undefined for ${id}`;
49
+ throw new Error(`ElastiCache clusterName undefined for ${id}`);
49
50
  const subnetGroup = this.createElastiCacheSubnetGroup(`${id}-subnetGroup`, scope, subnetIds);
50
51
  const elasticacheCluster = new CfnCacheCluster(scope, `${id}`, {
51
52
  ...props,
@@ -75,7 +76,7 @@ export class ElastiCacheManager {
75
76
  */
76
77
  createReplicatedElastiCache(id, scope, props, subnetIds, securityGroupIds) {
77
78
  if (!props)
78
- throw `ElastiCache props undefined for ${id}`;
79
+ throw new Error(`ElastiCache props undefined for ${id}`);
79
80
  const subnetGroup = this.createElastiCacheSubnetGroup(`${id}-subnetGroup`, scope, subnetIds);
80
81
  const elasticacheCluster = new CfnReplicationGroup(scope, `${id}`, {
81
82
  ...props,
@@ -1,9 +1,11 @@
1
1
  import { CfnCacheClusterProps, CfnReplicationGroupProps } from 'aws-cdk-lib/aws-elasticache';
2
2
  /**
3
3
  */
4
+ /** @category Interface */
4
5
  export interface ElastiCacheProps extends CfnCacheClusterProps {
5
6
  }
6
7
  /**
7
8
  */
9
+ /** @category Interface */
8
10
  export interface ReplicatedElastiCacheProps extends CfnReplicationGroupProps {
9
11
  }
@@ -8,7 +8,7 @@ import { IStateMachine } from 'aws-cdk-lib/aws-stepfunctions';
8
8
  import { CommonConstruct } from '../../common/index.js';
9
9
  import { DynamoDbToLambdaPipeProps, EventBusProps, EventRuleProps, RuleProps, SqsToLambdaPipeProps, SqsToSfnPipeProps } from './types.js';
10
10
  /**
11
- * @classdesc Provides operations on AWS EventBridge.
11
+ * Provides operations on AWS EventBridge.
12
12
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
13
13
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
14
14
  * @example
@@ -22,6 +22,7 @@ import { DynamoDbToLambdaPipeProps, EventBusProps, EventRuleProps, RuleProps, Sq
22
22
  * }
23
23
  * }
24
24
  * @see [CDK EventBridge Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events-readme.html}
25
+ * @category Service
25
26
  */
26
27
  export declare class EventManager {
27
28
  /**
@@ -86,7 +87,7 @@ export declare class EventManager {
86
87
  * @param id scoped id of the resource
87
88
  * @param scope scope in which this resource is defined
88
89
  * @param props the props for the pipe
89
- * @param dynamoDbStream the source dynamoDb stream
90
+ * @param sourceDynamoDbStreamArn the source dynamoDb stream
90
91
  * @param targetLambdaFunction the target lambda function
91
92
  */
92
93
  createDynamoDbToLambdaCfnPipe(id: string, scope: CommonConstruct, props: DynamoDbToLambdaPipeProps, sourceDynamoDbStreamArn: string, targetLambdaFunction: IFunction): CfnPipe;
@@ -6,7 +6,7 @@ import { CfnPipe } from 'aws-cdk-lib/aws-pipes';
6
6
  import _ from 'lodash';
7
7
  import { createCfnOutput } from '../../utils/index.js';
8
8
  /**
9
- * @classdesc Provides operations on AWS EventBridge.
9
+ * Provides operations on AWS EventBridge.
10
10
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
11
11
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
12
12
  * @example
@@ -20,6 +20,7 @@ import { createCfnOutput } from '../../utils/index.js';
20
20
  * }
21
21
  * }
22
22
  * @see [CDK EventBridge Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events-readme.html}
23
+ * @category Service
23
24
  */
24
25
  export class EventManager {
25
26
  /**
@@ -30,11 +31,11 @@ export class EventManager {
30
31
  */
31
32
  createEventBus(id, scope, props) {
32
33
  if (!props)
33
- throw `EventBus props undefined for ${id}`;
34
+ throw new Error(`EventBus props undefined for ${id}`);
34
35
  if (!props.eventBusName)
35
- throw `EventBus eventBusName undefined for ${id}`;
36
+ throw new Error(`EventBus eventBusName undefined for ${id}`);
36
37
  let eventBusName = props.eventBusName;
37
- if (eventBusName != 'default') {
38
+ if (eventBusName !== 'default') {
38
39
  eventBusName = scope.resourceNameFormatter.format(props.eventBusName, scope.props.resourceNameOptions?.eventbridgeBus);
39
40
  }
40
41
  const eventBus = new EventBus(scope, `${id}`, {
@@ -55,9 +56,9 @@ export class EventManager {
55
56
  */
56
57
  createRule(id, scope, props, eventBus, targets) {
57
58
  if (!props)
58
- throw `EventRule props undefined for ${id}`;
59
+ throw new Error(`EventRule props undefined for ${id}`);
59
60
  if (!props.ruleName)
60
- throw `EventRule ruleName undefined for ${id}`;
61
+ throw new Error(`EventRule ruleName undefined for ${id}`);
61
62
  const rule = new Rule(scope, `${id}`, {
62
63
  ...props,
63
64
  eventBus,
@@ -89,9 +90,9 @@ export class EventManager {
89
90
  */
90
91
  createLambdaRule(id, scope, props, lambdaFunction, eventBusName, eventPattern, scheduleExpression) {
91
92
  if (!props)
92
- throw `EventRule props undefined for ${id}`;
93
+ throw new Error(`EventRule props undefined for ${id}`);
93
94
  if (!props.name)
94
- throw `EventRule name undefined for ${id}`;
95
+ throw new Error(`EventRule name undefined for ${id}`);
95
96
  const eventRule = new CfnRule(scope, `${id}`, {
96
97
  ...props,
97
98
  description: 'Rule to send notification to lambda function target',
@@ -135,9 +136,9 @@ export class EventManager {
135
136
  */
136
137
  createFargateTaskRule(id, scope, props, cluster, task, subnetIds, role, eventPattern) {
137
138
  if (!props)
138
- throw `EventRule props undefined for ${id}`;
139
+ throw new Error(`EventRule props undefined for ${id}`);
139
140
  if (!props.name)
140
- throw `EventRule name undefined for ${id}`;
141
+ throw new Error(`EventRule name undefined for ${id}`);
141
142
  const eventRule = new CfnRule(scope, `${id}`, {
142
143
  ...props,
143
144
  description: 'Rule to send notification on new objects in data bucket to ecs task target',
@@ -173,9 +174,9 @@ export class EventManager {
173
174
  */
174
175
  createSqsToSfnCfnPipe(id, scope, props, sourceQueue, targetStepFunction) {
175
176
  if (!props)
176
- throw `Pipe props undefined for ${id}`;
177
+ throw new Error(`Pipe props undefined for ${id}`);
177
178
  if (!props.name)
178
- throw `Pipe name undefined for ${id}`;
179
+ throw new Error(`Pipe name undefined for ${id}`);
179
180
  const pipeRole = scope.iamManager.createRoleForSqsToSfnPipe(`${id}-role`, scope, sourceQueue.queueArn, targetStepFunction.stateMachineArn);
180
181
  const pipe = new CfnPipe(scope, `${id}`, {
181
182
  ...props,
@@ -219,9 +220,9 @@ export class EventManager {
219
220
  */
220
221
  createSqsToLambdaCfnPipe(id, scope, props, sourceQueue, targetLambdaFunction) {
221
222
  if (!props)
222
- throw `Pipe props undefined for ${id}`;
223
+ throw new Error(`Pipe props undefined for ${id}`);
223
224
  if (!props.name)
224
- throw `Pipe name undefined for ${id}`;
225
+ throw new Error(`Pipe name undefined for ${id}`);
225
226
  const pipeRole = scope.iamManager.createRoleForSqsToLambdaPipe(`${id}-role`, scope, sourceQueue.queueArn, targetLambdaFunction.functionArn);
226
227
  const pipe = new CfnPipe(scope, `${id}`, {
227
228
  ...props,
@@ -257,14 +258,14 @@ export class EventManager {
257
258
  * @param id scoped id of the resource
258
259
  * @param scope scope in which this resource is defined
259
260
  * @param props the props for the pipe
260
- * @param dynamoDbStream the source dynamoDb stream
261
+ * @param sourceDynamoDbStreamArn the source dynamoDb stream
261
262
  * @param targetLambdaFunction the target lambda function
262
263
  */
263
264
  createDynamoDbToLambdaCfnPipe(id, scope, props, sourceDynamoDbStreamArn, targetLambdaFunction) {
264
265
  if (!props)
265
- throw `Pipe props undefined for ${id}`;
266
+ throw new Error(`Pipe props undefined for ${id}`);
266
267
  if (!props.name)
267
- throw `Pipe name undefined for ${id}`;
268
+ throw new Error(`Pipe name undefined for ${id}`);
268
269
  const pipeRole = scope.iamManager.createRoleForDynamoDbToLambdaPipe(`${id}-role`, scope, sourceDynamoDbStreamArn, targetLambdaFunction.functionArn);
269
270
  const pipe = new CfnPipe(scope, `${id}`, {
270
271
  ...props,
@@ -1,9 +1,9 @@
1
- import { IRule, IRuleTarget, RuleTargetConfig, RuleTargetInput } from 'aws-cdk-lib/aws-events';
1
+ import { IRuleTarget, RuleTargetConfig, RuleTargetInput } from 'aws-cdk-lib/aws-events';
2
2
  import { TargetBaseProps } from 'aws-cdk-lib/aws-events-targets';
3
3
  import { ILogGroup } from 'aws-cdk-lib/aws-logs';
4
4
  import { CommonConstruct } from '../../common/index.js';
5
5
  /**
6
- * @classdesc Provides operations on AWS EventBridge Targets
6
+ * Provides operations on AWS EventBridge Targets
7
7
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
8
8
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
9
9
  * @example
@@ -17,6 +17,7 @@ import { CommonConstruct } from '../../common/index.js';
17
17
  * }
18
18
  * }
19
19
  * @see [CDK EventBridge Target Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets-readme.html}
20
+ * @category Service
20
21
  */
21
22
  export declare class EventTargetManager {
22
23
  /**
@@ -32,6 +33,7 @@ export declare class EventTargetManager {
32
33
  /**
33
34
  * Customize the CloudWatch LogGroup Event Target
34
35
  */
36
+ /** @category Interface */
35
37
  export interface LogGroupNoPolicyProps extends TargetBaseProps {
36
38
  /**
37
39
  * The event to send to the CloudWatch LogGroup
@@ -43,6 +45,7 @@ export interface LogGroupNoPolicyProps extends TargetBaseProps {
43
45
  }
44
46
  /**
45
47
  * Use an AWS CloudWatch LogGroup as an event rule target, but don't apply a policy.
48
+ * @category Service
46
49
  */
47
50
  export declare class CloudWatchLogGroupNoPolicy implements IRuleTarget {
48
51
  private readonly logGroup;
@@ -50,8 +53,6 @@ export declare class CloudWatchLogGroupNoPolicy implements IRuleTarget {
50
53
  constructor(logGroup: ILogGroup, props?: LogGroupNoPolicyProps);
51
54
  /**
52
55
  * Returns a RuleTarget that can be used to log an event into a CloudWatch LogGroup
53
- * @param _rule
54
- * @param _id
55
56
  */
56
- bind(_rule: IRule, _id?: string): RuleTargetConfig;
57
+ bind(): RuleTargetConfig;
57
58
  }
@@ -1,7 +1,7 @@
1
1
  import { ArnFormat, Stack } from 'aws-cdk-lib';
2
2
  import { bindBaseTargetConfig } from 'aws-cdk-lib/aws-events-targets';
3
3
  /**
4
- * @classdesc Provides operations on AWS EventBridge Targets
4
+ * Provides operations on AWS EventBridge Targets
5
5
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
6
6
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
7
7
  * @example
@@ -15,6 +15,7 @@ import { bindBaseTargetConfig } from 'aws-cdk-lib/aws-events-targets';
15
15
  * }
16
16
  * }
17
17
  * @see [CDK EventBridge Target Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets-readme.html}
18
+ * @category Service
18
19
  */
19
20
  export class EventTargetManager {
20
21
  /**
@@ -31,6 +32,7 @@ export class EventTargetManager {
31
32
  }
32
33
  /**
33
34
  * Use an AWS CloudWatch LogGroup as an event rule target, but don't apply a policy.
35
+ * @category Service
34
36
  */
35
37
  export class CloudWatchLogGroupNoPolicy {
36
38
  logGroup;
@@ -41,10 +43,8 @@ export class CloudWatchLogGroupNoPolicy {
41
43
  }
42
44
  /**
43
45
  * Returns a RuleTarget that can be used to log an event into a CloudWatch LogGroup
44
- * @param _rule
45
- * @param _id
46
46
  */
47
- bind(_rule, _id) {
47
+ bind() {
48
48
  const logGroupStack = Stack.of(this.logGroup);
49
49
  return {
50
50
  ...bindBaseTargetConfig(this.props),
@@ -3,6 +3,7 @@ import { CfnPipeProps } from 'aws-cdk-lib/aws-pipes';
3
3
  import { TagProps } from '../../types/index.js';
4
4
  /**
5
5
  */
6
+ /** @category Interface */
6
7
  export interface SqsToSfnPipeProps extends CfnPipeProps {
7
8
  pipeFilterPattern?: any;
8
9
  sfnInputTemplate?: string;
@@ -12,6 +13,7 @@ export interface SqsToSfnPipeProps extends CfnPipeProps {
12
13
  }
13
14
  /**
14
15
  */
16
+ /** @category Interface */
15
17
  export interface SqsToLambdaPipeProps extends CfnPipeProps {
16
18
  pipeFilterPattern?: any;
17
19
  sqsBatchSize?: number;
@@ -20,22 +22,26 @@ export interface SqsToLambdaPipeProps extends CfnPipeProps {
20
22
  }
21
23
  /**
22
24
  */
25
+ /** @category Interface */
23
26
  export interface EventRuleProps extends EBRuleProps {
24
27
  tags?: TagProps[];
25
28
  }
26
29
  /**
27
30
  */
31
+ /** @category Interface */
28
32
  export interface RuleProps extends CfnRuleProps {
29
33
  input?: string;
30
34
  tags?: TagProps[];
31
35
  }
32
36
  /**
33
37
  */
38
+ /** @category Interface */
34
39
  export interface EventBusProps extends EBProps {
35
40
  }
36
41
  /**
37
42
  }
38
43
  */
44
+ /** @category Interface */
39
45
  export interface DynamoDbToLambdaPipeProps extends CfnPipeProps {
40
46
  pipeFilterPattern?: any;
41
47
  dynamoDbBatchSize?: number;
@@ -2,7 +2,7 @@ import { CfnExperiment, CfnFeature, CfnLaunch, CfnProject, CfnSegment } from 'aw
2
2
  import { CommonConstruct } from '../../common/index.js';
3
3
  import { EvidentlyExperimentProps, EvidentlyFeatureProps, EvidentlyLaunchProps, EvidentlyProjectProps, EvidentlySegmentProps } from './types.js';
4
4
  /**
5
- * @classdesc Provides operations on AWS Evidently
5
+ * Provides operations on AWS Evidently
6
6
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
7
7
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
8
8
  * @example
@@ -16,6 +16,7 @@ import { EvidentlyExperimentProps, EvidentlyFeatureProps, EvidentlyLaunchProps,
16
16
  * }
17
17
  * }
18
18
  * @see [CDK Evidently Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_evidently-readme.html}
19
+ * @category Service
19
20
  */
20
21
  export declare class EvidentlyManager {
21
22
  /**
@@ -1,7 +1,7 @@
1
1
  import { CfnExperiment, CfnFeature, CfnLaunch, CfnProject, CfnSegment } from 'aws-cdk-lib/aws-evidently';
2
2
  import { createCfnOutput } from '../../utils/index.js';
3
3
  /**
4
- * @classdesc Provides operations on AWS Evidently
4
+ * Provides operations on AWS Evidently
5
5
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
6
6
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
7
7
  * @example
@@ -15,6 +15,7 @@ import { createCfnOutput } from '../../utils/index.js';
15
15
  * }
16
16
  * }
17
17
  * @see [CDK Evidently Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_evidently-readme.html}
18
+ * @category Service
18
19
  */
19
20
  export class EvidentlyManager {
20
21
  /**
@@ -25,9 +26,9 @@ export class EvidentlyManager {
25
26
  */
26
27
  createProject(id, scope, props) {
27
28
  if (!props)
28
- throw `EvidentlyProject props undefined for ${id}`;
29
+ throw new Error(`EvidentlyProject props undefined for ${id}`);
29
30
  if (!props.name)
30
- throw `EvidentlyProject name undefined for ${id}`;
31
+ throw new Error(`EvidentlyProject name undefined for ${id}`);
31
32
  const project = new CfnProject(scope, `${id}`, {
32
33
  ...props,
33
34
  description: `${props.description} ${scope.props.stage}`,
@@ -45,7 +46,7 @@ export class EvidentlyManager {
45
46
  */
46
47
  createFeature(id, scope, props) {
47
48
  if (!props)
48
- throw `EvidentlyFeature props undefined for ${id}`;
49
+ throw new Error(`EvidentlyFeature props undefined for ${id}`);
49
50
  const feature = new CfnFeature(scope, `${id}`, props);
50
51
  createCfnOutput(`${id}-featureArn`, scope, feature.attrArn);
51
52
  createCfnOutput(`${id}-featureName`, scope, feature.name);
@@ -59,9 +60,9 @@ export class EvidentlyManager {
59
60
  */
60
61
  createLaunch(id, scope, props) {
61
62
  if (!props)
62
- throw `EvidentlyLaunch props undefined for ${id}`;
63
+ throw new Error(`EvidentlyLaunch props undefined for ${id}`);
63
64
  if (!props.name)
64
- throw `EvidentlyLaunch name undefined for ${id}`;
65
+ throw new Error(`EvidentlyLaunch name undefined for ${id}`);
65
66
  const launch = new CfnLaunch(scope, `${id}`, {
66
67
  ...props,
67
68
  description: `${props.description} ${scope.props.stage}`,
@@ -79,9 +80,9 @@ export class EvidentlyManager {
79
80
  */
80
81
  createExperiment(id, scope, props) {
81
82
  if (!props)
82
- throw `EvidentlyExperiment props undefined for ${id}`;
83
+ throw new Error(`EvidentlyExperiment props undefined for ${id}`);
83
84
  if (!props.name)
84
- throw `EvidentlyExperiment name undefined for ${id}`;
85
+ throw new Error(`EvidentlyExperiment name undefined for ${id}`);
85
86
  const experiment = new CfnExperiment(scope, `${id}`, {
86
87
  ...props,
87
88
  description: `${props.description} ${scope.props.stage}`,
@@ -99,9 +100,9 @@ export class EvidentlyManager {
99
100
  */
100
101
  createSegment(id, scope, props) {
101
102
  if (!props)
102
- throw `EvidentlySegment props undefined for ${id}`;
103
+ throw new Error(`EvidentlySegment props undefined for ${id}`);
103
104
  if (!props.name)
104
- throw `EvidentlySegment name undefined for ${id}`;
105
+ throw new Error(`EvidentlySegment name undefined for ${id}`);
105
106
  const segment = new CfnSegment(scope, `${id}`, {
106
107
  ...props,
107
108
  description: `${props.description} ${scope.props.stage}`,
@@ -1,21 +1,26 @@
1
1
  import { CfnExperimentProps, CfnFeatureProps, CfnLaunchProps, CfnProjectProps, CfnSegmentProps } from 'aws-cdk-lib/aws-evidently';
2
2
  /**
3
3
  */
4
+ /** @category Interface */
4
5
  export interface EvidentlyProjectProps extends CfnProjectProps {
5
6
  }
6
7
  /**
7
8
  */
9
+ /** @category Interface */
8
10
  export interface EvidentlyFeatureProps extends CfnFeatureProps {
9
11
  }
10
12
  /**
11
13
  */
14
+ /** @category Interface */
12
15
  export interface EvidentlyLaunchProps extends CfnLaunchProps {
13
16
  }
14
17
  /**
15
18
  */
19
+ /** @category Interface */
16
20
  export interface EvidentlyExperimentProps extends CfnExperimentProps {
17
21
  }
18
22
  /**
19
23
  */
24
+ /** @category Interface */
20
25
  export interface EvidentlySegmentProps extends CfnSegmentProps {
21
26
  }
@@ -6,7 +6,7 @@ import { IBucket } from 'aws-cdk-lib/aws-s3';
6
6
  import { Queue } from 'aws-cdk-lib/aws-sqs';
7
7
  import { CommonConstruct } from '../../common/index.js';
8
8
  /**
9
- * @classdesc Provides operations on AWS
9
+ * Provides operations on AWS
10
10
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
11
11
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
12
12
  * @example
@@ -20,6 +20,7 @@ import { CommonConstruct } from '../../common/index.js';
20
20
  * }
21
21
  * }
22
22
  * @see [CDK IAM Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam-readme.html}
23
+ * @category Service
23
24
  */
24
25
  export declare class IamManager {
25
26
  /**
@@ -2,7 +2,7 @@ import { Stack } from 'aws-cdk-lib';
2
2
  import { CfnRole, Effect, ManagedPolicy, PolicyDocument, PolicyStatement, Role, ServicePrincipal, } from 'aws-cdk-lib/aws-iam';
3
3
  import { createCfnOutput } from '../../utils/index.js';
4
4
  /**
5
- * @classdesc Provides operations on AWS
5
+ * Provides operations on AWS
6
6
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
7
7
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
8
8
  * @example
@@ -16,6 +16,7 @@ import { createCfnOutput } from '../../utils/index.js';
16
16
  * }
17
17
  * }
18
18
  * @see [CDK IAM Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam-readme.html}
19
+ * @category Service
19
20
  */
20
21
  export class IamManager {
21
22
  /**
@@ -2,7 +2,7 @@ import { Key } from 'aws-cdk-lib/aws-kms';
2
2
  import { CommonConstruct } from '../../common/index.js';
3
3
  import { KmsKeyProps } from './types.js';
4
4
  /**
5
- * @classdesc Provides operations on AWS KMS.
5
+ * Provides operations on AWS KMS.
6
6
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
7
7
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
8
8
  * @example
@@ -16,6 +16,7 @@ import { KmsKeyProps } from './types.js';
16
16
  * }
17
17
  * }
18
18
  * @see [CDK KMS Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms-readme.html}
19
+ * @category Service
19
20
  */
20
21
  export declare class KmsManager {
21
22
  /**
@@ -1,7 +1,7 @@
1
1
  import { Key } from 'aws-cdk-lib/aws-kms';
2
2
  import { createCfnOutput } from '../../utils/index.js';
3
3
  /**
4
- * @classdesc Provides operations on AWS KMS.
4
+ * Provides operations on AWS KMS.
5
5
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
6
6
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
7
7
  * @example
@@ -15,6 +15,7 @@ import { createCfnOutput } from '../../utils/index.js';
15
15
  * }
16
16
  * }
17
17
  * @see [CDK KMS Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms-readme.html}
18
+ * @category Service
18
19
  */
19
20
  export class KmsManager {
20
21
  /**
@@ -25,9 +26,9 @@ export class KmsManager {
25
26
  */
26
27
  createKey(id, scope, props) {
27
28
  if (!props)
28
- throw `KMS Key props undefined for ${id}`;
29
+ throw new Error(`KMS Key props undefined for ${id}`);
29
30
  if (!props.alias)
30
- throw `KMS Key alias undefined for ${id}`;
31
+ throw new Error(`KMS Key alias undefined for ${id}`);
31
32
  const key = new Key(scope, `${id}`, {
32
33
  ...props,
33
34
  alias: scope.resourceNameFormatter.format(props.alias, scope.props.resourceNameOptions?.kms),
@@ -1,5 +1,6 @@
1
1
  import { KeyProps } from 'aws-cdk-lib/aws-kms';
2
2
  /**
3
3
  */
4
+ /** @category Interface */
4
5
  export interface KmsKeyProps extends KeyProps {
5
6
  }
@@ -6,7 +6,7 @@ import { Alias, Architecture, AssetCode, DockerImageCode, DockerImageFunction, F
6
6
  import { CommonConstruct } from '../../common/index.js';
7
7
  import { LambdaAliasProps, LambdaEdgeProps, LambdaProps } from './types.js';
8
8
  /**
9
- * @classdesc Provides operations on AWS Lambda
9
+ * Provides operations on AWS Lambda
10
10
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
11
11
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
12
12
  * @example
@@ -20,6 +20,7 @@ import { LambdaAliasProps, LambdaEdgeProps, LambdaProps } from './types.js';
20
20
  * }
21
21
  * }
22
22
  * @see [CDK Lambda Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda-readme.html}
23
+ * @category Service
23
24
  */
24
25
  export declare class LambdaManager {
25
26
  /**
@@ -7,7 +7,7 @@ import { CommonStack } from '../../common/index.js';
7
7
  import { createCfnOutput } from '../../utils/index.js';
8
8
  import { CloudFrontManager } from '../cloudfront/index.js';
9
9
  /**
10
- * @classdesc Provides operations on AWS Lambda
10
+ * Provides operations on AWS Lambda
11
11
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
12
12
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
13
13
  * @example
@@ -21,6 +21,7 @@ import { CloudFrontManager } from '../cloudfront/index.js';
21
21
  * }
22
22
  * }
23
23
  * @see [CDK Lambda Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda-readme.html}
24
+ * @category Service
24
25
  */
25
26
  export class LambdaManager {
26
27
  /**
@@ -65,9 +66,9 @@ export class LambdaManager {
65
66
  */
66
67
  createLambdaFunction(id, scope, props, role, layers, code, handler, environment, vpc, securityGroups, accessPoint, mountPath, vpcSubnets) {
67
68
  if (!props)
68
- throw `Lambda props undefined for ${id}`;
69
+ throw new Error(`Lambda props undefined for ${id}`);
69
70
  if (!props.functionName)
70
- throw `Lambda functionName undefined for ${id}`;
71
+ throw new Error(`Lambda functionName undefined for ${id}`);
71
72
  const functionName = scope.resourceNameFormatter.format(props.functionName, scope.props.resourceNameOptions?.lambdaFunction);
72
73
  let deadLetterQueue;
73
74
  if (props.deadLetterQueueEnabled) {
@@ -166,9 +167,9 @@ export class LambdaManager {
166
167
  */
167
168
  createLambdaDockerFunction(id, scope, props, role, code, environment, vpc, securityGroups, accessPoint, mountPath, vpcSubnets) {
168
169
  if (!props)
169
- throw `Lambda props undefined for ${id}`;
170
+ throw new Error(`Lambda props undefined for ${id}`);
170
171
  if (!props.functionName)
171
- throw `Lambda functionName undefined for ${id}`;
172
+ throw new Error(`Lambda functionName undefined for ${id}`);
172
173
  const functionName = scope.resourceNameFormatter.format(props.functionName, scope.props.resourceNameOptions?.lambdaFunction);
173
174
  let deadLetterQueue;
174
175
  if (props.deadLetterQueueEnabled) {
@@ -220,7 +221,7 @@ export class LambdaManager {
220
221
  */
221
222
  createLambdaFunctionAlias(id, scope, props, lambdaVersion) {
222
223
  if (!props)
223
- throw `Lambda Alias props undefined for ${id}`;
224
+ throw new Error(`Lambda Alias props undefined for ${id}`);
224
225
  const lambdaFunctionAlias = new Alias(scope, `${id}`, {
225
226
  ...props,
226
227
  version: lambdaVersion,