@gradientedge/cdk-utils 8.117.0 → 8.119.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 (148) hide show
  1. package/app/api-destined-function/package.json +1 -1
  2. package/dist/src/lib/common/construct.d.ts +32 -32
  3. package/dist/src/lib/common/construct.js +36 -59
  4. package/dist/src/lib/common/stack.d.ts +8 -7
  5. package/dist/src/lib/common/stack.js +17 -37
  6. package/dist/src/lib/common/types.d.ts +2 -2
  7. package/dist/src/lib/construct/api-to-eventbridge-target/api.d.ts +22 -22
  8. package/dist/src/lib/construct/api-to-eventbridge-target/event.d.ts +9 -9
  9. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +3 -3
  10. package/dist/src/lib/construct/api-to-eventbridge-target/main.js +37 -60
  11. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +9 -9
  12. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +3 -3
  13. package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +40 -63
  14. package/dist/src/lib/construct/api-to-lambda-target/api.d.ts +23 -23
  15. package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +2 -2
  16. package/dist/src/lib/construct/api-to-lambda-target/main.js +15 -38
  17. package/dist/src/lib/construct/application-configuration/main.d.ts +7 -7
  18. package/dist/src/lib/construct/application-configuration/main.js +17 -41
  19. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +17 -17
  20. package/dist/src/lib/construct/graphql-api-lambda/main.js +6 -29
  21. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +5 -5
  22. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +7 -7
  23. package/dist/src/lib/construct/lambda-with-iam-access/main.d.ts +16 -16
  24. package/dist/src/lib/construct/lambda-with-iam-access/main.js +8 -31
  25. package/dist/src/lib/construct/lambda-with-iam-access/types.d.ts +4 -4
  26. package/dist/src/lib/construct/rest-api-lambda/main.d.ts +16 -16
  27. package/dist/src/lib/construct/rest-api-lambda/main.js +5 -28
  28. package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +5 -5
  29. package/dist/src/lib/construct/rest-api-lambda-with-cache/main.js +9 -32
  30. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +38 -39
  31. package/dist/src/lib/construct/site-with-ecs-backend/main.js +33 -54
  32. package/dist/src/lib/construct/static-asset-deployment/main.d.ts +4 -4
  33. package/dist/src/lib/construct/static-asset-deployment/main.js +3 -26
  34. package/dist/src/lib/construct/static-site/main.d.ts +15 -15
  35. package/dist/src/lib/construct/static-site/main.js +4 -27
  36. package/dist/src/lib/services/aws/api-gateway/main.d.ts +10 -10
  37. package/dist/src/lib/services/aws/api-gateway/main.js +21 -44
  38. package/dist/src/lib/services/aws/api-gateway/types.d.ts +2 -2
  39. package/dist/src/lib/services/aws/appconfig/main.d.ts +7 -7
  40. package/dist/src/lib/services/aws/appconfig/main.js +14 -37
  41. package/dist/src/lib/services/aws/certificate-manager/main.d.ts +5 -5
  42. package/dist/src/lib/services/aws/certificate-manager/main.js +10 -33
  43. package/dist/src/lib/services/aws/certificate-manager/types.d.ts +2 -2
  44. package/dist/src/lib/services/aws/cloudfront/main.d.ts +18 -18
  45. package/dist/src/lib/services/aws/cloudfront/main.js +46 -45
  46. package/dist/src/lib/services/aws/cloudfront/types.d.ts +2 -3
  47. package/dist/src/lib/services/aws/cloudtrail/main.d.ts +5 -5
  48. package/dist/src/lib/services/aws/cloudtrail/main.js +5 -28
  49. package/dist/src/lib/services/aws/codebuild/main.d.ts +3 -3
  50. package/dist/src/lib/services/aws/codebuild/main.js +7 -30
  51. package/dist/src/lib/services/aws/dynamodb/main.d.ts +3 -3
  52. package/dist/src/lib/services/aws/dynamodb/main.js +8 -31
  53. package/dist/src/lib/services/aws/elastic-container-registry/main.d.ts +2 -2
  54. package/dist/src/lib/services/aws/elastic-container-registry/main.js +4 -27
  55. package/dist/src/lib/services/aws/elastic-container-service/main.d.ts +10 -10
  56. package/dist/src/lib/services/aws/elastic-container-service/main.js +27 -50
  57. package/dist/src/lib/services/aws/elastic-container-service/types.d.ts +4 -4
  58. package/dist/src/lib/services/aws/elastic-file-system/main.d.ts +3 -3
  59. package/dist/src/lib/services/aws/elastic-file-system/main.js +12 -35
  60. package/dist/src/lib/services/aws/elastic-kubernetes-service/main.d.ts +4 -4
  61. package/dist/src/lib/services/aws/elastic-kubernetes-service/main.js +8 -31
  62. package/dist/src/lib/services/aws/elasticache/main.d.ts +4 -4
  63. package/dist/src/lib/services/aws/elasticache/main.js +10 -33
  64. package/dist/src/lib/services/aws/eventbridge/main.d.ts +13 -13
  65. package/dist/src/lib/services/aws/eventbridge/main.js +26 -49
  66. package/dist/src/lib/services/aws/eventbridge/target.d.ts +10 -10
  67. package/dist/src/lib/services/aws/eventbridge/target.js +6 -29
  68. package/dist/src/lib/services/aws/evidently/main.d.ts +7 -7
  69. package/dist/src/lib/services/aws/evidently/main.js +18 -41
  70. package/dist/src/lib/services/aws/identity-access-management/main.d.ts +48 -49
  71. package/dist/src/lib/services/aws/identity-access-management/main.js +110 -133
  72. package/dist/src/lib/services/aws/key-management-service/main.d.ts +2 -2
  73. package/dist/src/lib/services/aws/key-management-service/main.js +5 -28
  74. package/dist/src/lib/services/aws/lambda/main.d.ts +11 -13
  75. package/dist/src/lib/services/aws/lambda/main.js +31 -58
  76. package/dist/src/lib/services/aws/route53/main.d.ts +9 -9
  77. package/dist/src/lib/services/aws/route53/main.js +21 -44
  78. package/dist/src/lib/services/aws/secrets-manager/main.d.ts +5 -6
  79. package/dist/src/lib/services/aws/secrets-manager/main.js +10 -33
  80. package/dist/src/lib/services/aws/simple-notification-service/main.d.ts +4 -4
  81. package/dist/src/lib/services/aws/simple-notification-service/main.js +11 -34
  82. package/dist/src/lib/services/aws/simple-queue-service/main.d.ts +6 -7
  83. package/dist/src/lib/services/aws/simple-queue-service/main.js +15 -38
  84. package/dist/src/lib/services/aws/simple-storage-service/main.d.ts +10 -11
  85. package/dist/src/lib/services/aws/simple-storage-service/main.js +31 -54
  86. package/dist/src/lib/services/aws/step-function/main.d.ts +31 -32
  87. package/dist/src/lib/services/aws/step-function/main.js +33 -57
  88. package/dist/src/lib/services/aws/systems-manager/main.d.ts +4 -4
  89. package/dist/src/lib/services/aws/systems-manager/main.js +10 -33
  90. package/dist/src/lib/services/aws/virtual-private-cloud/main.d.ts +5 -6
  91. package/dist/src/lib/services/aws/virtual-private-cloud/main.js +14 -37
  92. package/dist/src/lib/services/aws/web-application-firewall/main.d.ts +3 -3
  93. package/dist/src/lib/services/aws/web-application-firewall/main.js +8 -31
  94. package/dist/src/lib/utils/aws/index.d.ts +6 -3
  95. package/dist/src/lib/utils/aws/index.js +9 -26
  96. package/package.json +21 -21
  97. package/src/lib/common/construct.ts +97 -67
  98. package/src/lib/common/stack.ts +12 -12
  99. package/src/lib/common/types.ts +2 -2
  100. package/src/lib/construct/api-to-eventbridge-target/api.ts +31 -22
  101. package/src/lib/construct/api-to-eventbridge-target/event.ts +9 -9
  102. package/src/lib/construct/api-to-eventbridge-target/main.ts +56 -41
  103. package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +9 -9
  104. package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +62 -47
  105. package/src/lib/construct/api-to-lambda-target/api.ts +33 -23
  106. package/src/lib/construct/api-to-lambda-target/main.ts +24 -18
  107. package/src/lib/construct/application-configuration/main.ts +31 -24
  108. package/src/lib/construct/graphql-api-lambda/main.ts +22 -22
  109. package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +13 -13
  110. package/src/lib/construct/lambda-with-iam-access/main.ts +25 -25
  111. package/src/lib/construct/lambda-with-iam-access/types.ts +4 -4
  112. package/src/lib/construct/rest-api-lambda/main.ts +21 -21
  113. package/src/lib/construct/rest-api-lambda-with-cache/main.ts +14 -14
  114. package/src/lib/construct/site-with-ecs-backend/main.ts +79 -60
  115. package/src/lib/construct/static-asset-deployment/main.ts +6 -6
  116. package/src/lib/construct/static-site/main.ts +23 -17
  117. package/src/lib/services/aws/api-gateway/main.ts +42 -36
  118. package/src/lib/services/aws/api-gateway/types.ts +2 -2
  119. package/src/lib/services/aws/appconfig/main.ts +19 -19
  120. package/src/lib/services/aws/certificate-manager/main.ts +14 -14
  121. package/src/lib/services/aws/certificate-manager/types.ts +2 -2
  122. package/src/lib/services/aws/cloudfront/main.ts +88 -74
  123. package/src/lib/services/aws/cloudfront/types.ts +6 -3
  124. package/src/lib/services/aws/cloudtrail/main.ts +11 -11
  125. package/src/lib/services/aws/codebuild/main.ts +7 -7
  126. package/src/lib/services/aws/dynamodb/main.ts +8 -8
  127. package/src/lib/services/aws/elastic-container-registry/main.ts +4 -4
  128. package/src/lib/services/aws/elastic-container-service/main.ts +48 -37
  129. package/src/lib/services/aws/elastic-container-service/types.ts +4 -4
  130. package/src/lib/services/aws/elastic-file-system/main.ts +16 -16
  131. package/src/lib/services/aws/elastic-kubernetes-service/main.ts +11 -11
  132. package/src/lib/services/aws/elasticache/main.ts +10 -10
  133. package/src/lib/services/aws/eventbridge/main.ts +37 -37
  134. package/src/lib/services/aws/eventbridge/target.ts +14 -14
  135. package/src/lib/services/aws/evidently/main.ts +18 -18
  136. package/src/lib/services/aws/identity-access-management/main.ts +142 -134
  137. package/src/lib/services/aws/key-management-service/main.ts +5 -5
  138. package/src/lib/services/aws/lambda/main.ts +65 -59
  139. package/src/lib/services/aws/route53/main.ts +31 -31
  140. package/src/lib/services/aws/secrets-manager/main.ts +11 -15
  141. package/src/lib/services/aws/simple-notification-service/main.ts +13 -13
  142. package/src/lib/services/aws/simple-queue-service/main.ts +18 -18
  143. package/src/lib/services/aws/simple-storage-service/main.ts +40 -40
  144. package/src/lib/services/aws/step-function/main.ts +77 -65
  145. package/src/lib/services/aws/systems-manager/main.ts +17 -12
  146. package/src/lib/services/aws/virtual-private-cloud/main.ts +16 -16
  147. package/src/lib/services/aws/web-application-firewall/main.ts +8 -8
  148. package/src/lib/utils/aws/index.ts +8 -5
@@ -1,35 +1,12 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.EventManager = void 0;
27
- const events = __importStar(require("aws-cdk-lib/aws-events"));
28
- const iam = __importStar(require("aws-cdk-lib/aws-iam"));
29
- const lambda = __importStar(require("aws-cdk-lib/aws-lambda"));
30
- const utils = __importStar(require("../../../utils"));
31
- const cdk = __importStar(require("aws-cdk-lib"));
32
- const pipes = __importStar(require("aws-cdk-lib/aws-pipes"));
4
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
5
+ const aws_events_1 = require("aws-cdk-lib/aws-events");
6
+ const aws_iam_1 = require("aws-cdk-lib/aws-iam");
7
+ const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
8
+ const aws_pipes_1 = require("aws-cdk-lib/aws-pipes");
9
+ const utils_1 = require("../../../utils");
33
10
  /**
34
11
  * @classdesc Provides operations on AWS EventBridge.
35
12
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
@@ -38,7 +15,7 @@ const pipes = __importStar(require("aws-cdk-lib/aws-pipes"));
38
15
  * import { CommonConstruct } from '@gradientedge/cdk-utils'
39
16
  *
40
17
  * class CustomConstruct extends CommonConstruct {
41
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
18
+ * constructor(parent: Construct, id: string, props: common.CommonStackProps) {
42
19
  * super(parent, id, props)
43
20
  * this.props = props
44
21
  * this.eventManager.createLambdaRule('MyLambdaRule', this, lambdaFunction)
@@ -56,11 +33,11 @@ class EventManager {
56
33
  createEventBus(id, scope, props) {
57
34
  if (!props)
58
35
  throw `EventBus props undefined for ${id}`;
59
- const eventBus = new events.EventBus(scope, `${id}`, {
36
+ const eventBus = new aws_events_1.EventBus(scope, `${id}`, {
60
37
  eventBusName: `${props.eventBusName}-${scope.props.stage}`,
61
38
  });
62
- utils.createCfnOutput(`${id}-eventBusName`, scope, `${props.eventBusName}-${scope.props.stage}`);
63
- utils.createCfnOutput(`${id}-eventBusArn`, scope, eventBus.eventBusArn);
39
+ (0, utils_1.createCfnOutput)(`${id}-eventBusName`, scope, `${props.eventBusName}-${scope.props.stage}`);
40
+ (0, utils_1.createCfnOutput)(`${id}-eventBusArn`, scope, eventBus.eventBusArn);
64
41
  return eventBus;
65
42
  }
66
43
  /**
@@ -74,7 +51,7 @@ class EventManager {
74
51
  createRule(id, scope, props, eventBus, targets) {
75
52
  if (!props)
76
53
  throw `EventRule props undefined for ${id}`;
77
- const rule = new events.Rule(scope, `${id}`, {
54
+ const rule = new aws_events_1.Rule(scope, `${id}`, {
78
55
  description: props.description,
79
56
  enabled: props.enabled,
80
57
  eventBus: eventBus,
@@ -89,11 +66,11 @@ class EventManager {
89
66
  }
90
67
  if (props.tags && props.tags.length > 0) {
91
68
  props.tags.forEach(tag => {
92
- cdk.Tags.of(rule).add(tag.key, tag.value);
69
+ aws_cdk_lib_1.Tags.of(rule).add(tag.key, tag.value);
93
70
  });
94
71
  }
95
- utils.createCfnOutput(`${id}-ruleArn`, scope, rule.ruleArn);
96
- utils.createCfnOutput(`${id}-ruleName`, scope, rule.ruleName);
72
+ (0, utils_1.createCfnOutput)(`${id}-ruleArn`, scope, rule.ruleArn);
73
+ (0, utils_1.createCfnOutput)(`${id}-ruleName`, scope, rule.ruleName);
97
74
  return rule;
98
75
  }
99
76
  /**
@@ -109,7 +86,7 @@ class EventManager {
109
86
  createLambdaRule(id, scope, props, lambdaFunction, eventBusName, eventPattern, scheduleExpression) {
110
87
  if (!props)
111
88
  throw `EventRule props undefined for ${id}`;
112
- const eventRule = new events.CfnRule(scope, `${id}`, {
89
+ const eventRule = new aws_events_1.CfnRule(scope, `${id}`, {
113
90
  description: 'Rule to send notification to lambda function target',
114
91
  eventBusName: eventBusName,
115
92
  eventPattern: eventPattern,
@@ -124,14 +101,14 @@ class EventManager {
124
101
  },
125
102
  ],
126
103
  });
127
- new lambda.CfnPermission(scope, `${id}LambdaPermission`, {
104
+ new aws_lambda_1.CfnPermission(scope, `${id}LambdaPermission`, {
128
105
  action: 'lambda:InvokeFunction',
129
106
  functionName: lambdaFunction.functionName,
130
- principal: 'events.amazonaws.com',
107
+ principal: 'amazonaws.com',
131
108
  sourceArn: eventRule.attrArn,
132
109
  });
133
- utils.createCfnOutput(`${id}-ruleArn`, scope, eventRule.attrArn);
134
- utils.createCfnOutput(`${id}-ruleName`, scope, eventRule.name);
110
+ (0, utils_1.createCfnOutput)(`${id}-ruleArn`, scope, eventRule.attrArn);
111
+ (0, utils_1.createCfnOutput)(`${id}-ruleName`, scope, eventRule.name);
135
112
  return eventRule;
136
113
  }
137
114
  /**
@@ -148,7 +125,7 @@ class EventManager {
148
125
  createFargateTaskRule(id, scope, props, cluster, task, subnetIds, role, eventPattern) {
149
126
  if (!props)
150
127
  throw `EventRule props undefined for ${id}`;
151
- const eventRule = new events.CfnRule(scope, `${id}`, {
128
+ const eventRule = new aws_events_1.CfnRule(scope, `${id}`, {
152
129
  description: 'Rule to send notification on new objects in data bucket to ecs task target',
153
130
  eventPattern: eventPattern,
154
131
  name: `${props.name}-${scope.props.stage}`,
@@ -165,12 +142,12 @@ class EventManager {
165
142
  taskDefinitionArn: task.taskDefinitionArn,
166
143
  },
167
144
  id: `${id}-${scope.props.stage}`,
168
- roleArn: role instanceof iam.Role ? role.roleArn : role.attrArn,
145
+ roleArn: role instanceof aws_iam_1.Role ? role.roleArn : role.attrArn,
169
146
  },
170
147
  ],
171
148
  });
172
- utils.createCfnOutput(`${id}-ruleArn`, scope, eventRule.attrArn);
173
- utils.createCfnOutput(`${id}-ruleName`, scope, eventRule.name);
149
+ (0, utils_1.createCfnOutput)(`${id}-ruleArn`, scope, eventRule.attrArn);
150
+ (0, utils_1.createCfnOutput)(`${id}-ruleName`, scope, eventRule.name);
174
151
  return eventRule;
175
152
  }
176
153
  /**
@@ -183,7 +160,7 @@ class EventManager {
183
160
  */
184
161
  createSqsToSfnCfnPipe(id, scope, props, sourceQueue, targetStepFunction) {
185
162
  const pipeRole = scope.iamManager.createRoleForSqsToSfnPipe(`${id}-role`, scope, sourceQueue.queueArn, targetStepFunction.stateMachineArn);
186
- const pipe = new pipes.CfnPipe(scope, `${id}`, {
163
+ const pipe = new aws_pipes_1.CfnPipe(scope, `${id}`, {
187
164
  ...props,
188
165
  description: props.description,
189
166
  enrichment: props.enrichment,
@@ -214,8 +191,8 @@ class EventManager {
214
191
  },
215
192
  },
216
193
  });
217
- utils.createCfnOutput(`${id}-pipeArn`, scope, pipe.attrArn);
218
- utils.createCfnOutput(`${id}-pipeName`, scope, pipe.name);
194
+ (0, utils_1.createCfnOutput)(`${id}-pipeArn`, scope, pipe.attrArn);
195
+ (0, utils_1.createCfnOutput)(`${id}-pipeName`, scope, pipe.name);
219
196
  return pipe;
220
197
  }
221
198
  }
@@ -1,9 +1,9 @@
1
- import * as events from 'aws-cdk-lib/aws-events';
2
- import * as targets from 'aws-cdk-lib/aws-events-targets';
3
- import * as logs from 'aws-cdk-lib/aws-logs';
1
+ import { IRule, IRuleTarget, RuleTargetConfig, RuleTargetInput } from 'aws-cdk-lib/aws-events';
2
+ import { TargetBaseProps } from 'aws-cdk-lib/aws-events-targets';
3
+ import { ILogGroup } from 'aws-cdk-lib/aws-logs';
4
4
  import { CommonConstruct } from '../../../common';
5
5
  /**
6
- * @classdesc Provides operations on AWS EventBridge Targets.
6
+ * @classdesc 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
@@ -27,31 +27,31 @@ export declare class EventTargetManager {
27
27
  * @param logGroup the log group
28
28
  * @param props the log group target properties
29
29
  */
30
- createCloudWatchLogGroupNoPolicy(id: string, scope: CommonConstruct, logGroup: logs.ILogGroup, props?: LogGroupNoPolicyProps): CloudWatchLogGroupNoPolicy;
30
+ createCloudWatchLogGroupNoPolicy(id: string, scope: CommonConstruct, logGroup: ILogGroup, props?: LogGroupNoPolicyProps): CloudWatchLogGroupNoPolicy;
31
31
  }
32
32
  /**
33
33
  * Customize the CloudWatch LogGroup Event Target
34
34
  */
35
- export interface LogGroupNoPolicyProps extends targets.TargetBaseProps {
35
+ export interface LogGroupNoPolicyProps extends TargetBaseProps {
36
36
  /**
37
37
  * The event to send to the CloudWatch LogGroup
38
38
  *
39
39
  * This will be the event logged into the CloudWatch LogGroup
40
40
  * @default - the entire EventBridge event
41
41
  */
42
- readonly event?: events.RuleTargetInput;
42
+ readonly event?: RuleTargetInput;
43
43
  }
44
44
  /**
45
45
  * Use an AWS CloudWatch LogGroup as an event rule target, but don't apply a policy.
46
46
  */
47
- export declare class CloudWatchLogGroupNoPolicy implements events.IRuleTarget {
47
+ export declare class CloudWatchLogGroupNoPolicy implements IRuleTarget {
48
48
  private readonly logGroup;
49
49
  private readonly props;
50
- constructor(logGroup: logs.ILogGroup, props?: LogGroupNoPolicyProps);
50
+ constructor(logGroup: ILogGroup, props?: LogGroupNoPolicyProps);
51
51
  /**
52
52
  * Returns a RuleTarget that can be used to log an event into a CloudWatch LogGroup
53
53
  * @param _rule
54
54
  * @param _id
55
55
  */
56
- bind(_rule: events.IRule, _id?: string): events.RuleTargetConfig;
56
+ bind(_rule: IRule, _id?: string): RuleTargetConfig;
57
57
  }
@@ -1,33 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.CloudWatchLogGroupNoPolicy = exports.EventTargetManager = void 0;
27
- const cdk = __importStar(require("aws-cdk-lib"));
28
- const targets = __importStar(require("aws-cdk-lib/aws-events-targets"));
4
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
5
+ const aws_events_targets_1 = require("aws-cdk-lib/aws-events-targets");
29
6
  /**
30
- * @classdesc Provides operations on AWS EventBridge Targets.
7
+ * @classdesc Provides operations on AWS EventBridge Targets
31
8
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
32
9
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
33
10
  * @example
@@ -72,11 +49,11 @@ class CloudWatchLogGroupNoPolicy {
72
49
  * @param _id
73
50
  */
74
51
  bind(_rule, _id) {
75
- const logGroupStack = cdk.Stack.of(this.logGroup);
52
+ const logGroupStack = aws_cdk_lib_1.Stack.of(this.logGroup);
76
53
  return {
77
- ...targets.bindBaseTargetConfig(this.props),
54
+ ...(0, aws_events_targets_1.bindBaseTargetConfig)(this.props),
78
55
  arn: logGroupStack.formatArn({
79
- arnFormat: cdk.ArnFormat.COLON_RESOURCE_NAME,
56
+ arnFormat: aws_cdk_lib_1.ArnFormat.COLON_RESOURCE_NAME,
80
57
  resource: 'log-group',
81
58
  resourceName: this.logGroup.logGroupName,
82
59
  service: 'logs',
@@ -1,8 +1,8 @@
1
- import * as evidently from 'aws-cdk-lib/aws-evidently';
1
+ import { CfnExperiment, CfnFeature, CfnLaunch, CfnProject, CfnSegment } from 'aws-cdk-lib/aws-evidently';
2
2
  import { CommonConstruct } from '../../../common';
3
3
  import { EvidentlyExperimentProps, EvidentlyFeatureProps, EvidentlyLaunchProps, EvidentlyProjectProps, EvidentlySegmentProps } from './types';
4
4
  /**
5
- * @classdesc Provides operations on AWS Evidently.
5
+ * @classdesc 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
@@ -24,33 +24,33 @@ export declare class EvidentlyManager {
24
24
  * @param scope scope in which this resource is defined
25
25
  * @param props the project properties
26
26
  */
27
- createProject(id: string, scope: CommonConstruct, props: EvidentlyProjectProps): evidently.CfnProject;
27
+ createProject(id: string, scope: CommonConstruct, props: EvidentlyProjectProps): CfnProject;
28
28
  /**
29
29
  * @summary Method to create a feature
30
30
  * @param id scoped id of the resource
31
31
  * @param scope scope in which this resource is defined
32
32
  * @param props the feature properties
33
33
  */
34
- createFeature(id: string, scope: CommonConstruct, props: EvidentlyFeatureProps): evidently.CfnFeature;
34
+ createFeature(id: string, scope: CommonConstruct, props: EvidentlyFeatureProps): CfnFeature;
35
35
  /**
36
36
  * @summary Method to create a launch
37
37
  * @param id scoped id of the resource
38
38
  * @param scope scope in which this resource is defined
39
39
  * @param props the launch properties
40
40
  */
41
- createLaunch(id: string, scope: CommonConstruct, props: EvidentlyLaunchProps): evidently.CfnLaunch;
41
+ createLaunch(id: string, scope: CommonConstruct, props: EvidentlyLaunchProps): CfnLaunch;
42
42
  /**
43
43
  * @summary Method to create an experiment
44
44
  * @param id scoped id of the resource
45
45
  * @param scope scope in which this resource is defined
46
46
  * @param props the experiment properties
47
47
  */
48
- createExperiment(id: string, scope: CommonConstruct, props: EvidentlyExperimentProps): evidently.CfnExperiment;
48
+ createExperiment(id: string, scope: CommonConstruct, props: EvidentlyExperimentProps): CfnExperiment;
49
49
  /**
50
50
  * @summary Method to create a segment
51
51
  * @param id scoped id of the resource
52
52
  * @param scope scope in which this resource is defined
53
53
  * @param props the segment properties
54
54
  */
55
- createSegment(id: string, scope: CommonConstruct, props: EvidentlySegmentProps): evidently.CfnSegment;
55
+ createSegment(id: string, scope: CommonConstruct, props: EvidentlySegmentProps): CfnSegment;
56
56
  }
@@ -1,33 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.EvidentlyManager = void 0;
27
- const evidently = __importStar(require("aws-cdk-lib/aws-evidently"));
28
- const utils = __importStar(require("../../../utils"));
4
+ const aws_evidently_1 = require("aws-cdk-lib/aws-evidently");
5
+ const utils_1 = require("../../../utils");
29
6
  /**
30
- * @classdesc Provides operations on AWS Evidently.
7
+ * @classdesc Provides operations on AWS Evidently
31
8
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
32
9
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
33
10
  * @example
@@ -50,13 +27,13 @@ class EvidentlyManager {
50
27
  * @param props the project properties
51
28
  */
52
29
  createProject(id, scope, props) {
53
- const project = new evidently.CfnProject(scope, `${id}`, {
30
+ const project = new aws_evidently_1.CfnProject(scope, `${id}`, {
54
31
  ...props,
55
32
  description: `${props.description} ${scope.props.stage}`,
56
33
  name: `${props.name}-${scope.props.stage}`,
57
34
  });
58
- utils.createCfnOutput(`${id}-projectArn`, scope, project.attrArn);
59
- utils.createCfnOutput(`${id}-projectName`, scope, project.name);
35
+ (0, utils_1.createCfnOutput)(`${id}-projectArn`, scope, project.attrArn);
36
+ (0, utils_1.createCfnOutput)(`${id}-projectName`, scope, project.name);
60
37
  return project;
61
38
  }
62
39
  /**
@@ -66,9 +43,9 @@ class EvidentlyManager {
66
43
  * @param props the feature properties
67
44
  */
68
45
  createFeature(id, scope, props) {
69
- const feature = new evidently.CfnFeature(scope, `${id}`, props);
70
- utils.createCfnOutput(`${id}-featureArn`, scope, feature.attrArn);
71
- utils.createCfnOutput(`${id}-featureName`, scope, feature.name);
46
+ const feature = new aws_evidently_1.CfnFeature(scope, `${id}`, props);
47
+ (0, utils_1.createCfnOutput)(`${id}-featureArn`, scope, feature.attrArn);
48
+ (0, utils_1.createCfnOutput)(`${id}-featureName`, scope, feature.name);
72
49
  return feature;
73
50
  }
74
51
  /**
@@ -78,13 +55,13 @@ class EvidentlyManager {
78
55
  * @param props the launch properties
79
56
  */
80
57
  createLaunch(id, scope, props) {
81
- const launch = new evidently.CfnLaunch(scope, `${id}`, {
58
+ const launch = new aws_evidently_1.CfnLaunch(scope, `${id}`, {
82
59
  ...props,
83
60
  description: `${props.description} ${scope.props.stage}`,
84
61
  name: `${props.name}-${scope.props.stage}`,
85
62
  });
86
- utils.createCfnOutput(`${id}-launchArn`, scope, launch.attrArn);
87
- utils.createCfnOutput(`${id}-launchName`, scope, launch.name);
63
+ (0, utils_1.createCfnOutput)(`${id}-launchArn`, scope, launch.attrArn);
64
+ (0, utils_1.createCfnOutput)(`${id}-launchName`, scope, launch.name);
88
65
  return launch;
89
66
  }
90
67
  /**
@@ -94,13 +71,13 @@ class EvidentlyManager {
94
71
  * @param props the experiment properties
95
72
  */
96
73
  createExperiment(id, scope, props) {
97
- const experiment = new evidently.CfnExperiment(scope, `${id}`, {
74
+ const experiment = new aws_evidently_1.CfnExperiment(scope, `${id}`, {
98
75
  ...props,
99
76
  description: `${props.description} ${scope.props.stage}`,
100
77
  name: `${props.name}-${scope.props.stage}`,
101
78
  });
102
- utils.createCfnOutput(`${id}-experimentArn`, scope, experiment.attrArn);
103
- utils.createCfnOutput(`${id}-experimentName`, scope, experiment.name);
79
+ (0, utils_1.createCfnOutput)(`${id}-experimentArn`, scope, experiment.attrArn);
80
+ (0, utils_1.createCfnOutput)(`${id}-experimentName`, scope, experiment.name);
104
81
  return experiment;
105
82
  }
106
83
  /**
@@ -110,13 +87,13 @@ class EvidentlyManager {
110
87
  * @param props the segment properties
111
88
  */
112
89
  createSegment(id, scope, props) {
113
- const segment = new evidently.CfnSegment(scope, `${id}`, {
90
+ const segment = new aws_evidently_1.CfnSegment(scope, `${id}`, {
114
91
  ...props,
115
92
  description: `${props.description} ${scope.props.stage}`,
116
93
  name: `${props.name}-${scope.props.stage}`,
117
94
  });
118
- utils.createCfnOutput(`${id}-segmentArn`, scope, segment.attrArn);
119
- utils.createCfnOutput(`${id}-segmentName`, scope, segment.name);
95
+ (0, utils_1.createCfnOutput)(`${id}-segmentArn`, scope, segment.attrArn);
96
+ (0, utils_1.createCfnOutput)(`${id}-segmentName`, scope, segment.name);
120
97
  return segment;
121
98
  }
122
99
  }