@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 { CommonConstruct } from '../../common/index.js';
4
4
  import { Handler } from './handler.js';
5
5
  import { EventHandlerProps } from './types.js';
6
6
  /**
7
- * @classdesc Provides a construct to create and deploy an EventBridge Event Handler
7
+ * Provides a construct to create and deploy an EventBridge Event Handler
8
8
  * @example
9
9
  * import { EventHandler, EventHandlerProps } '@gradientedge/cdk-utils'
10
10
  * import { Construct } from 'constructs'
@@ -17,6 +17,7 @@ import { EventHandlerProps } from './types.js';
17
17
  * this.initResources()
18
18
  * }
19
19
  * }
20
+ * @category Construct
20
21
  */
21
22
  export declare class EventHandler extends CommonConstruct {
22
23
  props: EventHandlerProps;
@@ -8,7 +8,7 @@ import _ from 'lodash';
8
8
  import { CommonConstruct } from '../../common/index.js';
9
9
  import { Handler } from './handler.js';
10
10
  /**
11
- * @classdesc Provides a construct to create and deploy an EventBridge Event Handler
11
+ * Provides a construct to create and deploy an EventBridge Event Handler
12
12
  * @example
13
13
  * import { EventHandler, EventHandlerProps } '@gradientedge/cdk-utils'
14
14
  * import { Construct } from 'constructs'
@@ -21,6 +21,7 @@ import { Handler } from './handler.js';
21
21
  * this.initResources()
22
22
  * }
23
23
  * }
24
+ * @category Construct
24
25
  */
25
26
  export class EventHandler extends CommonConstruct {
26
27
  props;
@@ -6,6 +6,7 @@ import { Queue } from 'aws-cdk-lib/aws-sqs';
6
6
  import { Chain, Map, StateMachine } from 'aws-cdk-lib/aws-stepfunctions';
7
7
  import { CommonStackProps } from '../../common/index.js';
8
8
  import { EventRuleProps, LogProps, QueueProps, SfnMapProps, SfnStateMachineProps, VpcProps } from '../../services/index.js';
9
+ /** @category Interface */
9
10
  export interface EventHandlerProps extends CommonStackProps {
10
11
  eventBusName: string;
11
12
  eventRetentionInDays: number;
@@ -20,6 +21,7 @@ export interface EventHandlerProps extends CommonStackProps {
20
21
  workflowLog: LogProps;
21
22
  workflowMapState: SfnMapProps;
22
23
  }
24
+ /** @category Interface */
23
25
  export interface EventHandlerType {
24
26
  archive: Archive;
25
27
  ecsTargets: EcsTask[];
@@ -7,7 +7,7 @@ import { Construct } from 'constructs';
7
7
  import { CommonConstruct } from '../../common/index.js';
8
8
  import { LambdaWithIamAccessEnvironment, LambdaWithIamAccessProps } from './types.js';
9
9
  /**
10
- * @classdesc Provides a construct to create a lambda function with IAM access
10
+ * Provides a construct to create a lambda function with IAM access
11
11
  * @example
12
12
  * import { LambdaWithIamAccess, LambdaWithIamAccessProps } '@gradientedge/cdk-utils'
13
13
  * import { Construct } from 'constructs'
@@ -20,6 +20,7 @@ import { LambdaWithIamAccessEnvironment, LambdaWithIamAccessProps } from './type
20
20
  * this.initResources()
21
21
  * }
22
22
  * }
23
+ * @category Construct
23
24
  */
24
25
  export declare class LambdaWithIamAccess extends CommonConstruct {
25
26
  props: LambdaWithIamAccessProps;
@@ -6,7 +6,7 @@ import _ from 'lodash';
6
6
  import { CommonConstruct } from '../../common/index.js';
7
7
  import { Architecture } from '../../services/index.js';
8
8
  /**
9
- * @classdesc Provides a construct to create a lambda function with IAM access
9
+ * Provides a construct to create a lambda function with IAM access
10
10
  * @example
11
11
  * import { LambdaWithIamAccess, LambdaWithIamAccessProps } '@gradientedge/cdk-utils'
12
12
  * import { Construct } from 'constructs'
@@ -19,6 +19,7 @@ import { Architecture } from '../../services/index.js';
19
19
  * this.initResources()
20
20
  * }
21
21
  * }
22
+ * @category Construct
22
23
  */
23
24
  export class LambdaWithIamAccess extends CommonConstruct {
24
25
  /* LambdaWithIamAccess props */
@@ -2,6 +2,7 @@ import { AssetCode, LambdaInsightsVersion } from 'aws-cdk-lib/aws-lambda';
2
2
  import { SecretProps } from 'aws-cdk-lib/aws-secretsmanager';
3
3
  import { CommonStackProps } from '../../common/index.js';
4
4
  import { LambdaEnvironment, LambdaProps } from '../../services/index.js';
5
+ /** @category Interface */
5
6
  export interface LambdaWithIamAccessProps extends CommonStackProps {
6
7
  configEnabled?: boolean;
7
8
  lambda: LambdaProps;
@@ -16,5 +17,6 @@ export interface LambdaWithIamAccessProps extends CommonStackProps {
16
17
  timezone: string;
17
18
  vpcName?: string;
18
19
  }
20
+ /** @category Interface */
19
21
  export interface LambdaWithIamAccessEnvironment extends LambdaEnvironment {
20
22
  }
@@ -3,7 +3,7 @@ import { Construct } from 'constructs';
3
3
  import { EventHandler } from '../event-handler/index.js';
4
4
  import { PipedEventHandlerProps } from './types.js';
5
5
  /**
6
- * @classdesc Provides a construct to create and deploy an EventBridge Piped Event Handler
6
+ * Provides a construct to create and deploy an EventBridge Piped Event Handler
7
7
  * @example
8
8
  * import { PipedEventHandler, PipedEventHandlerProps } '@gradientedge/cdk-utils'
9
9
  * import { Construct } from 'constructs'
@@ -16,6 +16,7 @@ import { PipedEventHandlerProps } from './types.js';
16
16
  * this.initResources()
17
17
  * }
18
18
  * }
19
+ * @category Construct
19
20
  */
20
21
  export declare class PipedEventHandler extends EventHandler {
21
22
  props: PipedEventHandlerProps;
@@ -2,7 +2,7 @@ import { SqsQueue } from 'aws-cdk-lib/aws-events-targets';
2
2
  import _ from 'lodash';
3
3
  import { EventHandler } from '../event-handler/index.js';
4
4
  /**
5
- * @classdesc Provides a construct to create and deploy an EventBridge Piped Event Handler
5
+ * Provides a construct to create and deploy an EventBridge Piped Event Handler
6
6
  * @example
7
7
  * import { PipedEventHandler, PipedEventHandlerProps } '@gradientedge/cdk-utils'
8
8
  * import { Construct } from 'constructs'
@@ -15,6 +15,7 @@ import { EventHandler } from '../event-handler/index.js';
15
15
  * this.initResources()
16
16
  * }
17
17
  * }
18
+ * @category Construct
18
19
  */
19
20
  export class PipedEventHandler extends EventHandler {
20
21
  props;
@@ -1,6 +1,7 @@
1
1
  import { QueueProps } from 'aws-cdk-lib/aws-sqs';
2
2
  import { SqsToLambdaPipeProps, SqsToSfnPipeProps } from '../../services/index.js';
3
3
  import { EventHandlerProps } from '../event-handler/index.js';
4
+ /** @category Interface */
4
5
  export interface PipedEventHandlerProps extends EventHandlerProps {
5
6
  pipedDlq: QueueProps;
6
7
  pipedQueue: QueueProps;
@@ -8,9 +8,9 @@ import { Construct } from 'constructs';
8
8
  import { CommonConstruct } from '../../common/index.js';
9
9
  import { RestApiLambdaEnvironment, RestApiLambdaProps } from './types.js';
10
10
  /**
11
- * @classdesc Provides a construct to create and deploy a RestApi as Lambda
11
+ * Provides a construct to create and deploy a RestApi as Lambda
12
12
  *
13
- * <b>Architecture</b><br/> ![Architecture](./RestApiLambda.jpg)
13
+ * <b>Architecture</b><br/> ![Architecture](https://raw.githubusercontent.com/gradientedge/cdk-utils/main/img/RestApiLambda.jpg)
14
14
  * @example
15
15
  * import { RestApiLambda, RestApiLambdaProps } '@gradientedge/cdk-utils'
16
16
  * import { Construct } from 'constructs'
@@ -23,6 +23,7 @@ import { RestApiLambdaEnvironment, RestApiLambdaProps } from './types.js';
23
23
  * this.initResources()
24
24
  * }
25
25
  * }
26
+ * @category Construct
26
27
  */
27
28
  export declare abstract class RestApiLambda extends CommonConstruct {
28
29
  props: RestApiLambdaProps;
@@ -3,9 +3,9 @@ import { PolicyDocument } from 'aws-cdk-lib/aws-iam';
3
3
  import _ from 'lodash';
4
4
  import { CommonConstruct } from '../../common/index.js';
5
5
  /**
6
- * @classdesc Provides a construct to create and deploy a RestApi as Lambda
6
+ * Provides a construct to create and deploy a RestApi as Lambda
7
7
  *
8
- * <b>Architecture</b><br/> ![Architecture](./RestApiLambda.jpg)
8
+ * <b>Architecture</b><br/> ![Architecture](https://raw.githubusercontent.com/gradientedge/cdk-utils/main/img/RestApiLambda.jpg)
9
9
  * @example
10
10
  * import { RestApiLambda, RestApiLambdaProps } '@gradientedge/cdk-utils'
11
11
  * import { Construct } from 'constructs'
@@ -18,6 +18,7 @@ import { CommonConstruct } from '../../common/index.js';
18
18
  * this.initResources()
19
19
  * }
20
20
  * }
21
+ * @category Construct
21
22
  */
22
23
  export class RestApiLambda extends CommonConstruct {
23
24
  /* restApiLambda props */
@@ -1,12 +1,14 @@
1
+ import { AssetCode } from 'aws-cdk-lib/aws-lambda';
1
2
  import { AcmProps, LambdaEnvironment, LambdaProps, LambdaRestApiProps } from '../../services/index.js';
2
3
  import { CommonStackProps } from '../../common/index.js';
3
- import { AssetCode } from 'aws-cdk-lib/aws-lambda';
4
4
  /**
5
5
  */
6
+ /** @category Interface */
6
7
  export interface RestApiLambdaEnvironment extends LambdaEnvironment {
7
8
  }
8
9
  /**
9
10
  */
11
+ /** @category Interface */
10
12
  export interface RestApiLambdaProps extends CommonStackProps {
11
13
  apiRootPaths?: string[];
12
14
  apiSubDomain: string;
@@ -1,12 +1,12 @@
1
1
  import { ISecurityGroup, IVpc } from 'aws-cdk-lib/aws-ec2';
2
2
  import { CfnReplicationGroup } from 'aws-cdk-lib/aws-elasticache';
3
3
  import { Construct } from 'constructs';
4
- import { RestApiLambdaWithCacheProps } from './types.js';
5
4
  import { RestApiLambda } from '../rest-api-lambda/index.js';
5
+ import { RestApiLambdaWithCacheProps } from './types.js';
6
6
  /**
7
- * @classdesc Provides a construct to create and deploy a RestApi API as Lambda with Caching
7
+ * Provides a construct to create and deploy a RestApi API as Lambda with Caching
8
8
  *
9
- * <b>Architecture</b><br/> ![Architecture](./RestApiLambda.jpg)
9
+ * <b>Architecture</b><br/> ![Architecture](https://raw.githubusercontent.com/gradientedge/cdk-utils/main/img/RestApiLambda.jpg)
10
10
  * @example
11
11
  * import { RestApiLambdaWithCacheProps } '@gradientedge/cdk-utils'
12
12
  * import { Construct } from 'constructs'
@@ -19,6 +19,7 @@ import { RestApiLambda } from '../rest-api-lambda/index.js';
19
19
  * this.initResources()
20
20
  * }
21
21
  * }
22
+ * @category Construct
22
23
  */
23
24
  export declare abstract class RestApiLambdaWithCache extends RestApiLambda {
24
25
  props: RestApiLambdaWithCacheProps;
@@ -5,9 +5,9 @@ import _ from 'lodash';
5
5
  import { createCfnOutput } from '../../utils/index.js';
6
6
  import { RestApiLambda } from '../rest-api-lambda/index.js';
7
7
  /**
8
- * @classdesc Provides a construct to create and deploy a RestApi API as Lambda with Caching
8
+ * Provides a construct to create and deploy a RestApi API as Lambda with Caching
9
9
  *
10
- * <b>Architecture</b><br/> ![Architecture](./RestApiLambda.jpg)
10
+ * <b>Architecture</b><br/> ![Architecture](https://raw.githubusercontent.com/gradientedge/cdk-utils/main/img/RestApiLambda.jpg)
11
11
  * @example
12
12
  * import { RestApiLambdaWithCacheProps } '@gradientedge/cdk-utils'
13
13
  * import { Construct } from 'constructs'
@@ -20,6 +20,7 @@ import { RestApiLambda } from '../rest-api-lambda/index.js';
20
20
  * this.initResources()
21
21
  * }
22
22
  * }
23
+ * @category Construct
23
24
  */
24
25
  export class RestApiLambdaWithCache extends RestApiLambda {
25
26
  /* restApiLambdaWithCache props */
@@ -2,6 +2,7 @@ import { RestApiLambdaProps } from '../rest-api-lambda/index.js';
2
2
  import { ReplicatedElastiCacheProps, VpcProps } from '../../services/index.js';
3
3
  /**
4
4
  */
5
+ /** @category Interface */
5
6
  export interface RestApiLambdaWithCacheProps extends RestApiLambdaProps {
6
7
  restApiCache: ReplicatedElastiCacheProps;
7
8
  restApiVpc: VpcProps;
@@ -1,3 +1,4 @@
1
+ /** @category Enum */
1
2
  export declare enum SiteResponseHeaderPolicyType {
2
3
  ORIGIN = "origin",
3
4
  STATIC = "static"
@@ -1,3 +1,4 @@
1
+ /** @category Enum */
1
2
  export var SiteResponseHeaderPolicyType;
2
3
  (function (SiteResponseHeaderPolicyType) {
3
4
  SiteResponseHeaderPolicyType["ORIGIN"] = "origin";
@@ -13,7 +13,7 @@ import { Construct } from 'constructs';
13
13
  import { CommonConstruct } from '../../common/index.js';
14
14
  import { SiteCachePolicyProps, SiteResponseHeadersPolicyProps, SiteWithEcsBackendProps } from './types.js';
15
15
  /**
16
- * @classdesc Provides a construct to create and deploy a site hosted with an clustered ECS/ELB backend
16
+ * Provides a construct to create and deploy a site hosted with an clustered ECS/ELB backend
17
17
  * @example
18
18
  * import { SiteWithEcsBackend, SiteWithEcsBackendProps } '@gradientedge/cdk-utils'
19
19
  * import { Construct } from 'constructs'
@@ -26,6 +26,7 @@ import { SiteCachePolicyProps, SiteResponseHeadersPolicyProps, SiteWithEcsBacken
26
26
  * this.initResources()
27
27
  * }
28
28
  * }
29
+ * @category Construct
29
30
  */
30
31
  export declare class SiteWithEcsBackend extends CommonConstruct {
31
32
  props: SiteWithEcsBackendProps;
@@ -7,7 +7,7 @@ import { PolicyDocument, PolicyStatement } from 'aws-cdk-lib/aws-iam';
7
7
  import _ from 'lodash';
8
8
  import { CommonConstruct } from '../../common/index.js';
9
9
  /**
10
- * @classdesc Provides a construct to create and deploy a site hosted with an clustered ECS/ELB backend
10
+ * Provides a construct to create and deploy a site hosted with an clustered ECS/ELB backend
11
11
  * @example
12
12
  * import { SiteWithEcsBackend, SiteWithEcsBackendProps } '@gradientedge/cdk-utils'
13
13
  * import { Construct } from 'constructs'
@@ -20,6 +20,7 @@ import { CommonConstruct } from '../../common/index.js';
20
20
  * this.initResources()
21
21
  * }
22
22
  * }
23
+ * @category Construct
23
24
  */
24
25
  export class SiteWithEcsBackend extends CommonConstruct {
25
26
  /* site properties */
@@ -323,7 +324,7 @@ export class SiteWithEcsBackend extends CommonConstruct {
323
324
  }
324
325
  createSiteCachePolicy(id, siteCachePolicy) {
325
326
  if (!siteCachePolicy.cachePolicyName)
326
- throw `SiteCachePolicy cachePolicyName undefined for ${id}`;
327
+ throw new Error(`SiteCachePolicy cachePolicyName undefined for ${id}`);
327
328
  return new CachePolicy(this, `${id}`, {
328
329
  cachePolicyName: this.resourceNameFormatter.format(siteCachePolicy.cachePolicyName),
329
330
  comment: `Policy for ${this.id}-distribution - ${this.props.stage} stage`,
@@ -348,7 +349,7 @@ export class SiteWithEcsBackend extends CommonConstruct {
348
349
  if (!this.props.siteOriginRequestPolicy)
349
350
  return;
350
351
  if (!this.props.siteOriginRequestPolicy.originRequestPolicyName)
351
- throw `SiteOriginRequestPolicy originRequestPolicyName undefined for ${this.id}`;
352
+ throw new Error(`SiteOriginRequestPolicy originRequestPolicyName undefined for ${this.id}`);
352
353
  this.siteOriginRequestPolicy = new OriginRequestPolicy(this, `${this.id}-sorp`, {
353
354
  comment: `Request Policy for ${this.id}-distribution - ${this.props.stage} stage`,
354
355
  cookieBehavior: this.props.siteOriginRequestPolicy.cookieBehavior,
@@ -364,7 +365,7 @@ export class SiteWithEcsBackend extends CommonConstruct {
364
365
  if (!props)
365
366
  return undefined;
366
367
  if (!props.responseHeadersPolicyName)
367
- throw `SiteResponseHeadersPolicy responseHeadersPolicyName undefined for ${this.id}`;
368
+ throw new Error(`SiteResponseHeadersPolicy responseHeadersPolicyName undefined for ${this.id}`);
368
369
  return new ResponseHeadersPolicy(this, `${this.id}-${props.type}-srhp`, {
369
370
  ...props,
370
371
  comment: `Response Header Policy for ${props.type} for ${this.id}-distribution - ${this.props.stage} stage`,
@@ -1,10 +1,11 @@
1
- import { CommonStackProps } from '../../common/index.js';
2
- import { AcmProps, CloudfrontFunctionProps, DistributionProps, EcsApplicationLoadBalancedFargateServiceProps, EcsClusterProps, EfsAccessPointOptions, EfsFileSystemProps, HealthCheck, LogProps, S3BucketProps } from '../../services/index.js';
3
1
  import { VpcProps } from 'aws-cdk-lib/aws-ec2';
4
2
  import { OriginRequestPolicyProps, ResponseHeadersStrictTransportSecurity, ResponseSecurityHeadersBehavior, ResponseHeadersPolicyProps, CachePolicyProps } from 'aws-cdk-lib/aws-cloudfront';
3
+ import { CommonStackProps } from '../../common/index.js';
4
+ import { AcmProps, CloudfrontFunctionProps, DistributionProps, EcsApplicationLoadBalancedFargateServiceProps, EcsClusterProps, EfsAccessPointOptions, EfsFileSystemProps, HealthCheck, LogProps, S3BucketProps } from '../../services/index.js';
5
5
  import { SiteResponseHeaderPolicyType } from './constants.js';
6
6
  /**
7
7
  */
8
+ /** @category Interface */
8
9
  export interface SiteWithEcsBackendProps extends CommonStackProps {
9
10
  logLevel: string;
10
11
  nodeEnv: string;
@@ -32,16 +33,20 @@ export interface SiteWithEcsBackendProps extends CommonStackProps {
32
33
  useExistingHostedZone: boolean;
33
34
  useExistingVpc: boolean;
34
35
  }
36
+ /** @category Interface */
35
37
  export interface SiteResponseHeadersStrictTransportSecurity extends ResponseHeadersStrictTransportSecurity {
36
38
  accessControlMaxAgeInSeconds: number;
37
39
  }
40
+ /** @category Interface */
38
41
  export interface SiteSecurityHeadersBehavior extends ResponseSecurityHeadersBehavior {
39
42
  strictTransportSecurity: SiteResponseHeadersStrictTransportSecurity;
40
43
  }
44
+ /** @category Interface */
41
45
  export interface SiteResponseHeadersPolicyProps extends ResponseHeadersPolicyProps {
42
46
  securityHeadersBehavior: SiteSecurityHeadersBehavior;
43
47
  type: SiteResponseHeaderPolicyType;
44
48
  }
49
+ /** @category Interface */
45
50
  export interface SiteCachePolicyProps extends CachePolicyProps {
46
51
  defaultTtlInSeconds: number;
47
52
  minTtlInSeconds: number;
@@ -1,5 +1,7 @@
1
+ /** @category Enum */
1
2
  export declare enum SiteWithLambdaBackendResponseHeaderPolicyType {
2
3
  ORIGIN = "origin",
3
4
  STATIC = "static"
4
5
  }
6
+ /** @category Constant */
5
7
  export declare const LAMBDA_ALIAS_NAME_CURRENT = "latest";
@@ -1,6 +1,8 @@
1
+ /** @category Enum */
1
2
  export var SiteWithLambdaBackendResponseHeaderPolicyType;
2
3
  (function (SiteWithLambdaBackendResponseHeaderPolicyType) {
3
4
  SiteWithLambdaBackendResponseHeaderPolicyType["ORIGIN"] = "origin";
4
5
  SiteWithLambdaBackendResponseHeaderPolicyType["STATIC"] = "static";
5
6
  })(SiteWithLambdaBackendResponseHeaderPolicyType || (SiteWithLambdaBackendResponseHeaderPolicyType = {}));
7
+ /** @category Constant */
6
8
  export const LAMBDA_ALIAS_NAME_CURRENT = 'latest';
@@ -10,7 +10,7 @@ import { Construct } from 'constructs';
10
10
  import { CommonConstruct } from '../../common/index.js';
11
11
  import { SiteWithLambdaBackendCachePolicyProps, SiteWithLambdaBackendProps, SiteWithLambdaBackendResponseHeadersPolicyProps } from './types.js';
12
12
  /**
13
- * @classdesc Provides a construct to create and deploy a site hosted with an clustered ECS/ELB backend
13
+ * Provides a construct to create and deploy a site hosted with an clustered ECS/ELB backend
14
14
  * @example
15
15
  * import { SiteWithLambdaBackend, SiteWithLambdaBackendProps } '@gradientedge/cdk-utils'
16
16
  * import { Construct } from 'constructs'
@@ -23,6 +23,7 @@ import { SiteWithLambdaBackendCachePolicyProps, SiteWithLambdaBackendProps, Site
23
23
  * this.initResources()
24
24
  * }
25
25
  * }
26
+ * @category Construct
26
27
  */
27
28
  export declare class SiteWithLambdaBackend extends CommonConstruct {
28
29
  props: SiteWithLambdaBackendProps;
@@ -7,7 +7,7 @@ import _ from 'lodash';
7
7
  import { CommonConstruct } from '../../common/index.js';
8
8
  import { LAMBDA_ALIAS_NAME_CURRENT } from './constants.js';
9
9
  /**
10
- * @classdesc Provides a construct to create and deploy a site hosted with an clustered ECS/ELB backend
10
+ * Provides a construct to create and deploy a site hosted with an clustered ECS/ELB backend
11
11
  * @example
12
12
  * import { SiteWithLambdaBackend, SiteWithLambdaBackendProps } '@gradientedge/cdk-utils'
13
13
  * import { Construct } from 'constructs'
@@ -20,6 +20,7 @@ import { LAMBDA_ALIAS_NAME_CURRENT } from './constants.js';
20
20
  * this.initResources()
21
21
  * }
22
22
  * }
23
+ * @category Construct
23
24
  */
24
25
  export class SiteWithLambdaBackend extends CommonConstruct {
25
26
  /* site properties */
@@ -131,7 +132,7 @@ export class SiteWithLambdaBackend extends CommonConstruct {
131
132
  }
132
133
  createSiteCachePolicy(id, siteCachePolicy) {
133
134
  if (!siteCachePolicy.cachePolicyName)
134
- throw `SiteCachePolicy cachePolicyName undefined for ${id}`;
135
+ throw new Error(`SiteCachePolicy cachePolicyName undefined for ${id}`);
135
136
  return new CachePolicy(this, `${id}`, {
136
137
  cachePolicyName: this.resourceNameFormatter.format(siteCachePolicy.cachePolicyName),
137
138
  comment: `Policy for ${this.id}-distribution - ${this.props.stage} stage`,
@@ -156,7 +157,7 @@ export class SiteWithLambdaBackend extends CommonConstruct {
156
157
  if (!this.props.siteOriginRequestPolicy)
157
158
  return;
158
159
  if (!this.props.siteOriginRequestPolicy.originRequestPolicyName)
159
- throw `SiteOriginRequestPolicy originRequestPolicyName undefined for ${this.id}`;
160
+ throw new Error(`SiteOriginRequestPolicy originRequestPolicyName undefined for ${this.id}`);
160
161
  this.siteOriginRequestPolicy = new OriginRequestPolicy(this, `${this.id}-sorp`, {
161
162
  comment: `Request Policy for ${this.id}-distribution - ${this.props.stage} stage`,
162
163
  cookieBehavior: this.props.siteOriginRequestPolicy.cookieBehavior,
@@ -172,7 +173,7 @@ export class SiteWithLambdaBackend extends CommonConstruct {
172
173
  if (!props)
173
174
  return undefined;
174
175
  if (!props.responseHeadersPolicyName)
175
- throw `SiteResponseHeadersPolicy responseHeadersPolicyName undefined for ${this.id}`;
176
+ throw new Error(`SiteResponseHeadersPolicy responseHeadersPolicyName undefined for ${this.id}`);
176
177
  return new ResponseHeadersPolicy(this, `${this.id}-${props.type}-srhp`, {
177
178
  ...props,
178
179
  comment: `Response Header Policy for ${props.type} for ${this.id}-distribution - ${this.props.stage} stage`,
@@ -4,6 +4,7 @@ import { AcmProps, CloudfrontFunctionProps, DistributionProps, LambdaProps, LogP
4
4
  import { SiteWithLambdaBackendResponseHeaderPolicyType } from './constants.js';
5
5
  /**
6
6
  */
7
+ /** @category Interface */
7
8
  export interface SiteWithLambdaBackendProps extends CommonStackProps {
8
9
  logLevel: string;
9
10
  nodeEnv: string;
@@ -28,16 +29,20 @@ export interface SiteWithLambdaBackendProps extends CommonStackProps {
28
29
  useExistingHostedZone: boolean;
29
30
  useExistingVpc: boolean;
30
31
  }
32
+ /** @category Interface */
31
33
  export interface SiteWithLambdaBackendResponseHeadersStrictTransportSecurity extends ResponseHeadersStrictTransportSecurity {
32
34
  accessControlMaxAgeInSeconds: number;
33
35
  }
36
+ /** @category Interface */
34
37
  export interface SiteWithLambdaBackendSecurityHeadersBehavior extends ResponseSecurityHeadersBehavior {
35
38
  strictTransportSecurity: SiteWithLambdaBackendResponseHeadersStrictTransportSecurity;
36
39
  }
40
+ /** @category Interface */
37
41
  export interface SiteWithLambdaBackendResponseHeadersPolicyProps extends ResponseHeadersPolicyProps {
38
42
  securityHeadersBehavior: SiteWithLambdaBackendSecurityHeadersBehavior;
39
43
  type: SiteWithLambdaBackendResponseHeaderPolicyType;
40
44
  }
45
+ /** @category Interface */
41
46
  export interface SiteWithLambdaBackendCachePolicyProps extends CachePolicyProps {
42
47
  defaultTtlInSeconds: number;
43
48
  minTtlInSeconds: number;
@@ -4,7 +4,7 @@ import { Construct } from 'constructs';
4
4
  import { CommonConstruct } from '../../common/index.js';
5
5
  import { StaticAssetDeploymentProps } from './types.js';
6
6
  /**
7
- * @classdesc Provides a construct to create and deploy static assets into S3 bucket
7
+ * Provides a construct to create and deploy static assets into S3 bucket
8
8
  * @example
9
9
  * import { StaticAssetDeployment, StaticAssetDeploymentProps } '@gradientedge/cdk-utils'
10
10
  * import { Construct } from 'constructs'
@@ -15,6 +15,7 @@ import { StaticAssetDeploymentProps } from './types.js';
15
15
  * this.initResources()
16
16
  * }
17
17
  * }
18
+ * @category Construct
18
19
  */
19
20
  export declare class StaticAssetDeployment extends CommonConstruct {
20
21
  staticAssetBucket: IBucket;
@@ -1,11 +1,11 @@
1
+ import path from 'path';
1
2
  import { Fn } from 'aws-cdk-lib';
2
3
  import { BucketDeployment, Source } from 'aws-cdk-lib/aws-s3-deployment';
3
4
  import _ from 'lodash';
4
- import { CommonConstruct } from '../../common/index.js';
5
5
  import appRoot from 'app-root-path';
6
- import path from 'path';
6
+ import { CommonConstruct } from '../../common/index.js';
7
7
  /**
8
- * @classdesc Provides a construct to create and deploy static assets into S3 bucket
8
+ * Provides a construct to create and deploy static assets into S3 bucket
9
9
  * @example
10
10
  * import { StaticAssetDeployment, StaticAssetDeploymentProps } '@gradientedge/cdk-utils'
11
11
  * import { Construct } from 'constructs'
@@ -16,6 +16,7 @@ import path from 'path';
16
16
  * this.initResources()
17
17
  * }
18
18
  * }
19
+ * @category Construct
19
20
  */
20
21
  export class StaticAssetDeployment extends CommonConstruct {
21
22
  /* construct resources */
@@ -1,5 +1,6 @@
1
1
  import { BucketDeploymentProps, S3BucketProps } from '../../services/index.js';
2
2
  import { CommonStackProps } from '../../common/index.js';
3
+ /** @category Interface */
3
4
  export interface AssetExport {
4
5
  key: string;
5
6
  value: string;
@@ -9,6 +10,7 @@ export interface AssetExport {
9
10
  * When value is configured, the construct will invalidate the distribution after the deployment.
10
11
  * Use either domainName or distributionId or domainNameRef or distributionIdRef.
11
12
  */
13
+ /** @category Interface */
12
14
  export interface StaticCloudFrontDistribution {
13
15
  /**
14
16
  * @summary The domain name to associate with the bucket.
@@ -31,6 +33,7 @@ export interface StaticCloudFrontDistribution {
31
33
  */
32
34
  invalidationPaths: string[];
33
35
  }
36
+ /** @category Interface */
34
37
  export interface StaticAssetDeploymentProps extends CommonStackProps {
35
38
  staticAssetBucket: S3BucketProps;
36
39
  staticAssetDeployment: BucketDeploymentProps;
@@ -6,7 +6,7 @@ import { Construct } from 'constructs';
6
6
  import { CommonConstruct } from '../../common/index.js';
7
7
  import { StaticSiteProps } from './types.js';
8
8
  /**
9
- * @classdesc Provides a construct to create and deploy a s3 hosted static site
9
+ * Provides a construct to create and deploy a s3 hosted static site
10
10
  * @example
11
11
  * import { StaticSite, StaticSiteProps } '@gradientedge/cdk-utils'
12
12
  * import { Construct } from 'constructs'
@@ -19,6 +19,7 @@ import { StaticSiteProps } from './types.js';
19
19
  * this.initResources()
20
20
  * }
21
21
  * }
22
+ * @category Construct
22
23
  */
23
24
  export declare class StaticSite extends CommonConstruct {
24
25
  props: StaticSiteProps;
@@ -1,7 +1,7 @@
1
1
  import { FunctionEventType, } from 'aws-cdk-lib/aws-cloudfront';
2
2
  import { CommonConstruct } from '../../common/index.js';
3
3
  /**
4
- * @classdesc Provides a construct to create and deploy a s3 hosted static site
4
+ * Provides a construct to create and deploy a s3 hosted static site
5
5
  * @example
6
6
  * import { StaticSite, StaticSiteProps } '@gradientedge/cdk-utils'
7
7
  * import { Construct } from 'constructs'
@@ -14,6 +14,7 @@ import { CommonConstruct } from '../../common/index.js';
14
14
  * this.initResources()
15
15
  * }
16
16
  * }
17
+ * @category Construct
17
18
  */
18
19
  export class StaticSite extends CommonConstruct {
19
20
  /* static site properties */
@@ -109,7 +110,7 @@ export class StaticSite extends CommonConstruct {
109
110
  */
110
111
  createSiteDistribution() {
111
112
  if (!this.props.siteDistribution)
112
- throw 'SiteDistribution props undefined';
113
+ throw new Error('SiteDistribution props undefined');
113
114
  this.siteDistribution = this.cloudFrontManager.createDistributionWithS3Origin(`${this.id}-distribution`, this, this.props.siteDistribution, this.siteBucket, this.siteLogBucket, this.siteOriginAccessIdentity, this.siteCertificate, this.props.siteAliases, this.siteFunctionAssociations);
114
115
  }
115
116
  /**
@@ -1,8 +1,9 @@
1
+ import { ISource } from 'aws-cdk-lib/aws-s3-deployment';
1
2
  import { CommonStackProps } from '../../common/index.js';
2
3
  import { AcmProps, CloudfrontFunctionProps, DistributionProps, S3BucketProps } from '../../services/index.js';
3
- import { ISource } from 'aws-cdk-lib/aws-s3-deployment';
4
4
  /**
5
5
  */
6
+ /** @category Interface */
6
7
  export interface StaticSiteProps extends CommonStackProps {
7
8
  logLevel: string;
8
9
  nodeEnv: string;
@@ -4,7 +4,7 @@ import { IFunction } from 'aws-cdk-lib/aws-lambda';
4
4
  import { CommonConstruct } from '../../common/index.js';
5
5
  import { LambdaRestApiProps } from './types.js';
6
6
  /**
7
- * @classdesc Provides operations on AWS API Gateway.
7
+ * Provides operations on AWS API Gateway.
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
@@ -19,6 +19,7 @@ import { LambdaRestApiProps } from './types.js';
19
19
  * }
20
20
  * }
21
21
  * @see [CDK API Gateway Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway-readme.html}
22
+ * @category Service
22
23
  */
23
24
  export declare class ApiManager {
24
25
  /**