@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
@@ -3,7 +3,7 @@ import { AwsCustomResource } from 'aws-cdk-lib/custom-resources';
3
3
  import { CommonConstruct } from '../../common/index.js';
4
4
  import { SSMParameterReaderProps, SSMStringParameterProps } from './types.js';
5
5
  /**
6
- * @classdesc Provides operations on AWS Systems Manager.
6
+ * Provides operations on AWS Systems Manager.
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 { SSMParameterReaderProps, SSMStringParameterProps } from './types.js';
17
17
  * }
18
18
  * }
19
19
  * @see [CDK Systems Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ssm-readme.html}
20
+ * @category Service
20
21
  */
21
22
  export declare class SsmManager {
22
23
  static SECRETS_MODIFIED_TIMESTAMP_PARAM: string;
@@ -44,7 +45,8 @@ export declare class SsmManager {
44
45
  readStringParameterFromRegion(id: string, scope: CommonConstruct, parameterName: string, region: string): string;
45
46
  }
46
47
  /**
47
- * @classdesc Provides utilities to read same/cross region SSM parameters
48
+ * Provides utilities to read same/cross region SSM parameters
49
+ * @category Service
48
50
  */
49
51
  export declare class SSMParameterReader extends AwsCustomResource {
50
52
  constructor(scope: CommonConstruct, name: string, props: SSMParameterReaderProps);
@@ -2,7 +2,7 @@ import { StringParameter } from 'aws-cdk-lib/aws-ssm';
2
2
  import { AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId, } from 'aws-cdk-lib/custom-resources';
3
3
  import { createCfnOutput } from '../../utils/index.js';
4
4
  /**
5
- * @classdesc Provides operations on AWS Systems Manager.
5
+ * Provides operations on AWS Systems Manager.
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 Systems Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ssm-readme.html}
19
+ * @category Service
19
20
  */
20
21
  export class SsmManager {
21
22
  static SECRETS_MODIFIED_TIMESTAMP_PARAM = 'secrets-last-modified-timestamp';
@@ -27,9 +28,9 @@ export class SsmManager {
27
28
  */
28
29
  writeStringToParameters(id, scope, props) {
29
30
  if (!props)
30
- throw `Parameter props undefined for ${id}`;
31
+ throw new Error(`Parameter props undefined for ${id}`);
31
32
  if (!props.parameterName)
32
- throw `Parameter parameterName undefined for ${id}`;
33
+ throw new Error(`Parameter parameterName undefined for ${id}`);
33
34
  const parameter = new StringParameter(scope, `${id}`, {
34
35
  ...props,
35
36
  description: `${props.description} - ${scope.props.stage} stage`,
@@ -46,8 +47,8 @@ export class SsmManager {
46
47
  * @param parameterName parameter name to lookup
47
48
  */
48
49
  readStringParameter(id, scope, parameterName) {
49
- if (!parameterName || parameterName == '')
50
- throw 'Invalid parameter name';
50
+ if (!parameterName || parameterName === '')
51
+ throw new Error('Invalid parameter name');
51
52
  return StringParameter.valueFromLookup(scope, scope.resourceNameFormatter.format(parameterName, scope.props.resourceNameOptions?.ssm));
52
53
  }
53
54
  /**
@@ -58,10 +59,10 @@ export class SsmManager {
58
59
  * @param region region name to lookup parameter
59
60
  */
60
61
  readStringParameterFromRegion(id, scope, parameterName, region) {
61
- if (!parameterName || parameterName == '')
62
- throw `Invalid parameter name for ${id}`;
63
- if (!region || region == '')
64
- throw `Invalid region for ${id}`;
62
+ if (!parameterName || parameterName === '')
63
+ throw new Error(`Invalid parameter name for ${id}`);
64
+ if (!region || region === '')
65
+ throw new Error(`Invalid region for ${id}`);
65
66
  return new SSMParameterReader(scope, `${id}`, {
66
67
  parameterName: scope.resourceNameFormatter.format(parameterName, scope.props.resourceNameOptions?.ssm),
67
68
  region,
@@ -69,7 +70,8 @@ export class SsmManager {
69
70
  }
70
71
  }
71
72
  /**
72
- * @classdesc Provides utilities to read same/cross region SSM parameters
73
+ * Provides utilities to read same/cross region SSM parameters
74
+ * @category Service
73
75
  */
74
76
  export class SSMParameterReader extends AwsCustomResource {
75
77
  constructor(scope, name, props) {
@@ -1,9 +1,11 @@
1
1
  import { StringParameterProps } from 'aws-cdk-lib/aws-ssm';
2
2
  /**
3
3
  */
4
+ /** @category Interface */
4
5
  export interface SSMParameterReaderProps {
5
6
  parameterName: string;
6
7
  region: string;
7
8
  }
9
+ /** @category Interface */
8
10
  export interface SSMStringParameterProps extends StringParameterProps {
9
11
  }
@@ -1,6 +1,7 @@
1
1
  import { Vpc } from 'aws-cdk-lib/aws-ec2';
2
2
  import { CommonConstruct } from '../../common/index.js';
3
3
  import { VpcProps } from './types.js';
4
+ /** @category Service */
4
5
  export declare class Ipv6Vpc extends Vpc {
5
6
  egressOnlyInternetGatewayId: string;
6
7
  constructor(scope: CommonConstruct, id: string, props: VpcProps);
@@ -1,6 +1,7 @@
1
1
  import { Fn } from 'aws-cdk-lib';
2
2
  import { CfnEgressOnlyInternetGateway, CfnVPCCidrBlock, RouterType, Vpc, } from 'aws-cdk-lib/aws-ec2';
3
3
  import _ from 'lodash';
4
+ /** @category Service */
4
5
  export class Ipv6Vpc extends Vpc {
5
6
  egressOnlyInternetGatewayId;
6
7
  constructor(scope, id, props) {
@@ -2,7 +2,7 @@ import { Vpc } from 'aws-cdk-lib/aws-ec2';
2
2
  import { CommonConstruct } from '../../common/index.js';
3
3
  import { VpcProps } from './types.js';
4
4
  /**
5
- * @classdesc Provides operations on AWS VPC.
5
+ * Provides operations on AWS VPC.
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 { VpcProps } from './types.js';
16
16
  * }
17
17
  * }
18
18
  * @see [CDK VPC Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.@aws-cdk_aws-Vpc.html}
19
+ * @category Service
19
20
  */
20
21
  export declare class VpcManager {
21
22
  /**
@@ -7,7 +7,7 @@ import { Ipv6Vpc } from './ipv6.js';
7
7
  */
8
8
  const CommonVpcIdentifier = 'CommonVpc';
9
9
  /**
10
- * @classdesc Provides operations on AWS VPC.
10
+ * Provides operations on AWS VPC.
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 @@ const CommonVpcIdentifier = 'CommonVpc';
21
21
  * }
22
22
  * }
23
23
  * @see [CDK VPC Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.@aws-cdk_aws-Vpc.html}
24
+ * @category Service
24
25
  */
25
26
  export class VpcManager {
26
27
  /**
@@ -31,9 +32,9 @@ export class VpcManager {
31
32
  */
32
33
  createVpc(id, scope, props) {
33
34
  if (!props)
34
- throw `Vpc props undefined for ${id}`;
35
+ throw new Error(`Vpc props undefined for ${id}`);
35
36
  if (!props.vpcName)
36
- throw `Vpc vpcName undefined for ${id}`;
37
+ throw new Error(`Vpc vpcName undefined for ${id}`);
37
38
  const vpcName = scope.resourceNameFormatter.format(props.vpcName, scope.props.resourceNameOptions?.vpc);
38
39
  let vpc;
39
40
  if (props.isIPV6) {
@@ -1,4 +1,5 @@
1
1
  import * as ec2 from 'aws-cdk-lib/aws-ec2';
2
+ /** @category Interface */
2
3
  export interface VpcProps extends ec2.VpcProps {
3
4
  isIPV6?: boolean;
4
5
  }
@@ -2,7 +2,7 @@ import { CfnIPSet, CfnWebACL } from 'aws-cdk-lib/aws-wafv2';
2
2
  import { CommonConstruct } from '../../common/index.js';
3
3
  import { WafIPSetProps, WafWebACLProps } from './types.js';
4
4
  /**
5
- * @classdesc Provides operations on AWS WAF.
5
+ * Provides operations on AWS WAF.
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 { WafIPSetProps, WafWebACLProps } from './types.js';
16
16
  * }
17
17
  * }
18
18
  * @see [CDK WAF Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_waf-readme.html}
19
+ * @category Service
19
20
  */
20
21
  export declare class WafManager {
21
22
  /**
@@ -1,7 +1,7 @@
1
1
  import { CfnIPSet, CfnWebACL } from 'aws-cdk-lib/aws-wafv2';
2
2
  import { createCfnOutput } from '../../utils/index.js';
3
3
  /**
4
- * @classdesc Provides operations on AWS WAF.
4
+ * Provides operations on AWS WAF.
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 WAF Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_waf-readme.html}
18
+ * @category Service
18
19
  */
19
20
  export class WafManager {
20
21
  /**
@@ -25,9 +26,9 @@ export class WafManager {
25
26
  */
26
27
  createIpSet(id, scope, props) {
27
28
  if (!props)
28
- throw `WAF Ip Set props undefined for ${id}`;
29
+ throw new Error(`WAF Ip Set props undefined for ${id}`);
29
30
  if (!props.name)
30
- throw `WAF Ip Set name undefined for ${id}`;
31
+ throw new Error(`WAF Ip Set name undefined for ${id}`);
31
32
  const ipSet = new CfnIPSet(scope, `${id}`, {
32
33
  ...props,
33
34
  description: `IP Set for ${id} - ${scope.props.stage} stage`,
@@ -45,9 +46,9 @@ export class WafManager {
45
46
  */
46
47
  createWebAcl(id, scope, props) {
47
48
  if (!props)
48
- throw `WAF WebACL props undefined for ${id}`;
49
+ throw new Error(`WAF WebACL props undefined for ${id}`);
49
50
  if (!props.name)
50
- throw `WAF WebACL name undefined for ${id}`;
51
+ throw new Error(`WAF WebACL name undefined for ${id}`);
51
52
  const webAcl = new CfnWebACL(scope, `${id}`, {
52
53
  ...props,
53
54
  description: `Web Acl for ${id} - ${scope.props.stage} stage`,
@@ -1,9 +1,11 @@
1
1
  import { CfnIPSetProps, CfnWebACLProps } from 'aws-cdk-lib/aws-wafv2';
2
2
  /**
3
3
  */
4
+ /** @category Interface */
4
5
  export interface WafIPSetProps extends CfnIPSetProps {
5
6
  }
6
7
  /**
7
8
  */
9
+ /** @category Interface */
8
10
  export interface WafWebACLProps extends CfnWebACLProps {
9
11
  }
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  */
3
+ /** @category Interface */
3
4
  export interface TagProps {
4
5
  key: string;
5
6
  value: string;
@@ -10,14 +10,17 @@ import { CommonConstruct } from '../common/index.js';
10
10
  * @param overrideId Flag which indicates whether to override the default logical id of the output
11
11
  * @returns The CloudFormation output
12
12
  */
13
+ /** @category Constant */
13
14
  export declare function createCfnOutput(id: string, scope: CommonConstruct, value?: string, description?: string, overrideId?: boolean): CfnOutput;
14
15
  /**
15
16
  *
16
17
  */
18
+ /** @category Constant */
17
19
  export declare function determineCredentials(): AwsCredentialIdentityProvider;
18
20
  /**
19
21
  * @param error
20
22
  */
23
+ /** @category Constant */
21
24
  export declare function redirectError(error: any): {
22
25
  body: string;
23
26
  headers: {
@@ -32,6 +35,7 @@ export declare function redirectError(error: any): {
32
35
  /**
33
36
  * @param message
34
37
  */
38
+ /** @category Constant */
35
39
  export declare function redirectSuccess(message: any): {
36
40
  body: string;
37
41
  headers: {
@@ -10,6 +10,7 @@ import _ from 'lodash';
10
10
  * @param overrideId Flag which indicates whether to override the default logical id of the output
11
11
  * @returns The CloudFormation output
12
12
  */
13
+ /** @category Constant */
13
14
  export function createCfnOutput(id, scope, value, description, overrideId = true) {
14
15
  const camelName = _.camelCase(id);
15
16
  const output = new CfnOutput(scope, id, {
@@ -25,6 +26,7 @@ export function createCfnOutput(id, scope, value, description, overrideId = true
25
26
  /**
26
27
  *
27
28
  */
29
+ /** @category Constant */
28
30
  export function determineCredentials() {
29
31
  if (process.env.AWS_PROFILE)
30
32
  return fromIni();
@@ -43,6 +45,7 @@ const defaultResponseObject = {
43
45
  /**
44
46
  * @param error
45
47
  */
48
+ /** @category Constant */
46
49
  export function redirectError(error) {
47
50
  console.error(error, error.message, error.stack);
48
51
  return Object.assign({}, defaultResponseObject, {
@@ -53,6 +56,7 @@ export function redirectError(error) {
53
56
  /**
54
57
  * @param message
55
58
  */
59
+ /** @category Constant */
56
60
  export function redirectSuccess(message) {
57
61
  return Object.assign({}, defaultResponseObject, {
58
62
  body: JSON.stringify(Object.assign({}, { error: message, success: true })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils-aws",
3
- "version": "1.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "AWS CDK utilities for @gradientedge/cdk-utils",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -14,18 +14,26 @@
14
14
  "dist/src/"
15
15
  ],
16
16
  "dependencies": {
17
- "@aws-sdk/client-secrets-manager": "3.1022.0",
18
- "@aws-sdk/credential-providers": "3.1022.0",
17
+ "@aws-sdk/client-secrets-manager": "3.1025.0",
18
+ "@aws-sdk/credential-providers": "3.1025.0",
19
19
  "@aws-sdk/types": "3.973.6",
20
20
  "@types/lodash": "4.17.24",
21
21
  "app-root-path": "3.1.0",
22
- "aws-cdk-lib": "2.247.0",
22
+ "aws-cdk-lib": "2.248.0",
23
23
  "lodash": "4.18.1",
24
24
  "constructs": "10.6.0",
25
25
  "moment": "2.30.1",
26
26
  "uuid": "13.0.0",
27
- "@gradientedge/cdk-utils-common": "1.0.1"
27
+ "@gradientedge/cdk-utils-common": "2.1.0"
28
28
  },
29
+ "keywords": [
30
+ "gradientedge",
31
+ "aws",
32
+ "cdk",
33
+ "aws-cdk",
34
+ "iac",
35
+ "typescript"
36
+ ],
29
37
  "publishConfig": {
30
38
  "access": "public"
31
39
  },
@@ -35,6 +43,10 @@
35
43
  "url": "git+https://github.com/gradientedge/cdk-utils.git",
36
44
  "directory": "packages/aws"
37
45
  },
46
+ "typedocOptions": {
47
+ "gitRevision": "main",
48
+ "sourceLinkTemplate": "https://github.com/gradientedge/cdk-utils/blob/main/{path}#L{line}"
49
+ },
38
50
  "scripts": {
39
51
  "build": "tsc",
40
52
  "build:production": "tsc -p tsconfig.prd.json",