@gradientedge/cdk-utils-aws 2.5.0 → 2.6.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 (125) hide show
  1. package/dist/src/construct/api-to-any-target/main.d.ts +11 -0
  2. package/dist/src/construct/api-to-any-target/main.js +11 -2
  3. package/dist/src/construct/api-to-any-target/target.d.ts +16 -1
  4. package/dist/src/construct/api-to-any-target/target.js +16 -1
  5. package/dist/src/construct/api-to-any-target/types.d.ts +52 -0
  6. package/dist/src/construct/api-to-eventbridge-target/api.d.ts +18 -0
  7. package/dist/src/construct/api-to-eventbridge-target/api.js +18 -0
  8. package/dist/src/construct/api-to-eventbridge-target/event.d.ts +7 -0
  9. package/dist/src/construct/api-to-eventbridge-target/event.js +7 -0
  10. package/dist/src/construct/api-to-eventbridge-target/main.d.ts +12 -0
  11. package/dist/src/construct/api-to-eventbridge-target/main.js +12 -3
  12. package/dist/src/construct/api-to-eventbridge-target/types.d.ts +67 -0
  13. package/dist/src/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +7 -0
  14. package/dist/src/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.js +7 -0
  15. package/dist/src/construct/api-to-eventbridge-target-with-sns/main.d.ts +13 -0
  16. package/dist/src/construct/api-to-eventbridge-target-with-sns/main.js +13 -4
  17. package/dist/src/construct/api-to-eventbridge-target-with-sns/types.d.ts +12 -0
  18. package/dist/src/construct/api-to-lambda-target/api.d.ts +19 -0
  19. package/dist/src/construct/api-to-lambda-target/api.js +19 -0
  20. package/dist/src/construct/api-to-lambda-target/main.d.ts +24 -0
  21. package/dist/src/construct/api-to-lambda-target/main.js +24 -2
  22. package/dist/src/construct/api-to-lambda-target/types.d.ts +41 -0
  23. package/dist/src/construct/application-configuration/main.d.ts +29 -1
  24. package/dist/src/construct/application-configuration/main.js +28 -1
  25. package/dist/src/construct/application-configuration/types.d.ts +5 -0
  26. package/dist/src/construct/event-handler/handler.d.ts +23 -1
  27. package/dist/src/construct/event-handler/handler.js +23 -1
  28. package/dist/src/construct/event-handler/main.d.ts +13 -0
  29. package/dist/src/construct/event-handler/main.js +13 -0
  30. package/dist/src/construct/event-handler/types.d.ts +35 -0
  31. package/dist/src/construct/lambda-with-iam-access/main.d.ts +21 -0
  32. package/dist/src/construct/lambda-with-iam-access/main.js +21 -2
  33. package/dist/src/construct/lambda-with-iam-access/types.d.ts +18 -0
  34. package/dist/src/construct/piped-event-handler/main.d.ts +9 -0
  35. package/dist/src/construct/piped-event-handler/main.js +9 -0
  36. package/dist/src/construct/piped-event-handler/types.d.ts +7 -0
  37. package/dist/src/construct/rest-api-lambda/main.d.ts +23 -0
  38. package/dist/src/construct/rest-api-lambda/main.js +19 -2
  39. package/dist/src/construct/rest-api-lambda/types.d.ts +14 -0
  40. package/dist/src/construct/rest-api-lambda-with-cache/main.d.ts +12 -0
  41. package/dist/src/construct/rest-api-lambda-with-cache/main.js +12 -2
  42. package/dist/src/construct/rest-api-lambda-with-cache/types.d.ts +6 -0
  43. package/dist/src/construct/site-with-ecs-backend/constants.d.ts +5 -0
  44. package/dist/src/construct/site-with-ecs-backend/constants.js +5 -0
  45. package/dist/src/construct/site-with-ecs-backend/main.d.ts +37 -0
  46. package/dist/src/construct/site-with-ecs-backend/main.js +37 -2
  47. package/dist/src/construct/site-with-ecs-backend/types.d.ts +45 -0
  48. package/dist/src/construct/site-with-lambda-backend/constants.d.ts +8 -0
  49. package/dist/src/construct/site-with-lambda-backend/constants.js +8 -0
  50. package/dist/src/construct/site-with-lambda-backend/main.d.ts +31 -0
  51. package/dist/src/construct/site-with-lambda-backend/main.js +31 -2
  52. package/dist/src/construct/site-with-lambda-backend/types.d.ts +42 -0
  53. package/dist/src/construct/static-asset-deployment/main.d.ts +10 -0
  54. package/dist/src/construct/static-asset-deployment/main.js +10 -1
  55. package/dist/src/construct/static-asset-deployment/types.d.ts +14 -0
  56. package/dist/src/construct/static-site/main.d.ts +17 -0
  57. package/dist/src/construct/static-site/main.js +17 -2
  58. package/dist/src/construct/static-site/types.d.ts +18 -0
  59. package/dist/src/services/api-gateway/main.d.ts +20 -20
  60. package/dist/src/services/api-gateway/main.js +20 -20
  61. package/dist/src/services/api-gateway/types.d.ts +7 -0
  62. package/dist/src/services/appconfig/constants.d.ts +2 -2
  63. package/dist/src/services/appconfig/constants.js +2 -2
  64. package/dist/src/services/appconfig/main.d.ts +5 -5
  65. package/dist/src/services/appconfig/main.js +5 -5
  66. package/dist/src/services/appconfig/types.d.ts +11 -1
  67. package/dist/src/services/certificate-manager/types.d.ts +8 -0
  68. package/dist/src/services/cloudfront/main.d.ts +28 -28
  69. package/dist/src/services/cloudfront/main.js +28 -28
  70. package/dist/src/services/cloudfront/types.d.ts +8 -0
  71. package/dist/src/services/cloudwatch/logs.d.ts +4 -4
  72. package/dist/src/services/cloudwatch/logs.js +4 -4
  73. package/dist/src/services/cloudwatch/main.d.ts +24 -24
  74. package/dist/src/services/cloudwatch/main.js +25 -24
  75. package/dist/src/services/cloudwatch/types.d.ts +66 -0
  76. package/dist/src/services/dynamodb/main.d.ts +2 -2
  77. package/dist/src/services/dynamodb/main.js +2 -2
  78. package/dist/src/services/dynamodb/types.d.ts +8 -0
  79. package/dist/src/services/elastic-container-registry/main.d.ts +1 -1
  80. package/dist/src/services/elastic-container-registry/main.js +1 -1
  81. package/dist/src/services/elastic-container-service/main.d.ts +13 -13
  82. package/dist/src/services/elastic-container-service/main.js +16 -13
  83. package/dist/src/services/elastic-container-service/types.d.ts +30 -1
  84. package/dist/src/services/elastic-file-system/types.d.ts +9 -0
  85. package/dist/src/services/elastic-kubernetes-service/main.d.ts +3 -3
  86. package/dist/src/services/elastic-kubernetes-service/main.js +7 -3
  87. package/dist/src/services/elastic-kubernetes-service/types.d.ts +4 -0
  88. package/dist/src/services/elasticache/main.d.ts +14 -14
  89. package/dist/src/services/elasticache/main.js +18 -14
  90. package/dist/src/services/elasticache/types.d.ts +4 -0
  91. package/dist/src/services/eventbridge/main.d.ts +11 -11
  92. package/dist/src/services/eventbridge/main.js +19 -11
  93. package/dist/src/services/eventbridge/target.d.ts +5 -1
  94. package/dist/src/services/eventbridge/target.js +6 -1
  95. package/dist/src/services/eventbridge/types.d.ts +27 -1
  96. package/dist/src/services/evidently/types.d.ts +10 -0
  97. package/dist/src/services/identity-access-management/main.d.ts +42 -42
  98. package/dist/src/services/identity-access-management/main.js +42 -42
  99. package/dist/src/services/key-management-service/types.d.ts +2 -0
  100. package/dist/src/services/lambda/main.d.ts +25 -25
  101. package/dist/src/services/lambda/main.js +26 -25
  102. package/dist/src/services/lambda/types.d.ts +34 -0
  103. package/dist/src/services/route53/main.js +2 -0
  104. package/dist/src/services/route53/types.d.ts +3 -0
  105. package/dist/src/services/secrets-manager/main.js +2 -0
  106. package/dist/src/services/secrets-manager/types.d.ts +4 -0
  107. package/dist/src/services/simple-notification-service/types.d.ts +2 -0
  108. package/dist/src/services/simple-queue-service/main.js +2 -0
  109. package/dist/src/services/simple-queue-service/types.d.ts +11 -0
  110. package/dist/src/services/simple-storage-service/main.d.ts +1 -1
  111. package/dist/src/services/simple-storage-service/main.js +5 -1
  112. package/dist/src/services/simple-storage-service/types.d.ts +16 -0
  113. package/dist/src/services/step-function/types.d.ts +54 -0
  114. package/dist/src/services/systems-manager/main.d.ts +15 -4
  115. package/dist/src/services/systems-manager/main.js +17 -4
  116. package/dist/src/services/systems-manager/types.d.ts +8 -0
  117. package/dist/src/services/virtual-private-cloud/ipv6.d.ts +19 -1
  118. package/dist/src/services/virtual-private-cloud/ipv6.js +26 -1
  119. package/dist/src/services/virtual-private-cloud/main.js +1 -2
  120. package/dist/src/services/virtual-private-cloud/types.d.ts +5 -0
  121. package/dist/src/services/web-application-firewall/types.d.ts +4 -0
  122. package/dist/src/types/index.d.ts +3 -0
  123. package/dist/src/utils/index.d.ts +9 -3
  124. package/dist/src/utils/index.js +10 -3
  125. package/package.json +2 -2
@@ -26,7 +26,7 @@ export class ApiManager {
26
26
  * @param id scoped id of the resource
27
27
  * @param scope scope in which this resource is defined
28
28
  * @param props lambda rest restApi props
29
- * @param lambdaFunction
29
+ * @param lambdaFunction the Lambda function to use as the backend handler
30
30
  */
31
31
  createLambdaRestApi(id, scope, props, lambdaFunction) {
32
32
  if (!props)
@@ -86,22 +86,22 @@ export class ApiManager {
86
86
  return apiDomain;
87
87
  }
88
88
  /**
89
- * @summary Method to create an API gateway resource
90
- * @param id
91
- * @param scope
92
- * @param parent
93
- * @param path
94
- * @param integration
95
- * @param addProxy
96
- * @param authorizer
97
- * @param allowedOrigins
98
- * @param allowedMethods
99
- * @param allowedHeaders
100
- * @param methodRequestParameters
101
- * @param proxyIntegration
102
- * @param enableDefaultCors
103
- * @param mockIntegration
104
- * @param mockMethodResponses
89
+ * @summary Method to create an API gateway resource with methods, optional CORS, and optional proxy sub-resource
90
+ * @param id scoped id of the resource
91
+ * @param scope scope in which this resource is defined
92
+ * @param parent the parent API resource to attach this resource to
93
+ * @param path the URL path segment for this resource
94
+ * @param integration the backend integration for methods on this resource
95
+ * @param addProxy whether to create a greedy proxy child resource ({path+})
96
+ * @param authorizer optional authorizer for the methods
97
+ * @param allowedOrigins optional CORS allowed origins (defaults to all origins)
98
+ * @param allowedMethods optional CORS allowed methods (defaults to all methods)
99
+ * @param allowedHeaders optional CORS allowed headers (defaults to default headers)
100
+ * @param methodRequestParameters optional request parameter mappings for methods
101
+ * @param proxyIntegration optional alternative integration for the proxy resource
102
+ * @param enableDefaultCors set to false to disable automatic CORS preflight configuration
103
+ * @param mockIntegration optional mock integration for OPTIONS when CORS is disabled
104
+ * @param mockMethodResponses optional method responses for the mock OPTIONS integration
105
105
  */
106
106
  createApiResource(id, scope, parent, path, integration, addProxy, authorizer, allowedOrigins, allowedMethods, allowedHeaders, methodRequestParameters, proxyIntegration, enableDefaultCors, mockIntegration, mockMethodResponses) {
107
107
  const methods = allowedMethods ?? Cors.ALL_METHODS;
@@ -167,9 +167,9 @@ export class ApiManager {
167
167
  }
168
168
  /**
169
169
  * @summary Method to create an api deployment
170
- * @param id
171
- * @param scope
172
- * @param api
170
+ * @param id scoped id of the resource
171
+ * @param scope scope in which this resource is defined
172
+ * @param api the REST API to create a deployment for
173
173
  */
174
174
  createApiDeployment(id, scope, api) {
175
175
  new Deployment(scope, `${id}`, {
@@ -1,12 +1,19 @@
1
1
  import { LambdaRestApiProps as LambdaRestApigProps, RestApiProps } from 'aws-cdk-lib/aws-apigateway';
2
2
  import { TagProps } from '../../types/index.js';
3
3
  /**
4
+ * Props for creating a Lambda-backed REST API with additional configuration options.
5
+ * @see {@link ApiManager.createLambdaRestApi}
4
6
  */
5
7
  /** @category Interface */
6
8
  export interface LambdaRestApiProps extends LambdaRestApigProps {
9
+ /** Optional tags to apply to the REST API resource */
7
10
  tags?: TagProps[];
11
+ /** Minimum response payload size (in bytes) to be compressed */
8
12
  minCompressionSizeInBytes?: number;
9
13
  }
14
+ /**
15
+ * Props for creating a REST API.
16
+ */
10
17
  /** @category Interface */
11
18
  export interface RestApigProps extends RestApiProps {
12
19
  }
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @returns { Map<string, string> } AppConfig extension ARN by region for x84
2
+ * Mapping of AWS region to AppConfig extension Lambda layer ARN for x86_64 architecture.
3
3
  */
4
4
  /** @category Constant */
5
5
  export declare const ArnsByRegionForX86_64: {
6
6
  [region: string]: string;
7
7
  };
8
8
  /**
9
- * @returns { Map<string, string> } AppConfig extension ARN by region for arm64
9
+ * Mapping of AWS region to AppConfig extension Lambda layer ARN for ARM64 architecture.
10
10
  */
11
11
  /** @category Constant */
12
12
  export declare const ArnsByRegionForArm64: {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @returns { Map<string, string> } AppConfig extension ARN by region for x84
2
+ * Mapping of AWS region to AppConfig extension Lambda layer ARN for x86_64 architecture.
3
3
  */
4
4
  /** @category Constant */
5
5
  export const ArnsByRegionForX86_64 = {
@@ -36,7 +36,7 @@ export const ArnsByRegionForX86_64 = {
36
36
  'us-west-2': 'arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension:223',
37
37
  };
38
38
  /**
39
- * @returns { Map<string, string> } AppConfig extension ARN by region for arm64
39
+ * Mapping of AWS region to AppConfig extension Lambda layer ARN for ARM64 architecture.
40
40
  */
41
41
  /** @category Constant */
42
42
  export const ArnsByRegionForArm64 = {
@@ -3,7 +3,7 @@ import { CommonConstruct } from '../../common/index.js';
3
3
  import { Architecture } from '../constants.js';
4
4
  import { AppConfigProps } from './types.js';
5
5
  /**
6
- * Provides operations on AWS
6
+ * Provides operations on AWS AppConfig.
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
@@ -30,7 +30,7 @@ export declare class AppConfigManager {
30
30
  * @summary Method to create an AppConfig Application
31
31
  * @param id scoped id of the resource
32
32
  * @param scope scope in which this resource is defined
33
- * @param props
33
+ * @param props the AppConfig configuration properties
34
34
  * @returns the appconfig application
35
35
  */
36
36
  createApplication(id: string, scope: CommonConstruct, props: AppConfigProps): CfnApplication;
@@ -39,7 +39,7 @@ export declare class AppConfigManager {
39
39
  * @param id scoped id of the resource
40
40
  * @param scope scope in which this resource is defined
41
41
  * @param applicationId id of the application
42
- * @param props
42
+ * @param props the AppConfig configuration properties
43
43
  * @returns the appconfig environment
44
44
  */
45
45
  createEnvironment(id: string, scope: CommonConstruct, applicationId: string, props: AppConfigProps): CfnEnvironment;
@@ -49,7 +49,7 @@ export declare class AppConfigManager {
49
49
  * @param id scoped id of the resource
50
50
  * @param scope scope in which this resource is defined
51
51
  * @param applicationId id of the application
52
- * @param props
52
+ * @param props the AppConfig configuration properties
53
53
  * @returns the appconfig configuration profile
54
54
  */
55
55
  createConfigurationProfile(id: string, scope: CommonConstruct, applicationId: string, props: AppConfigProps): CfnConfigurationProfile;
@@ -57,7 +57,7 @@ export declare class AppConfigManager {
57
57
  * @summary Method to create an AppConfig Deployment Strategy
58
58
  * @param id scoped id of the resource
59
59
  * @param scope scope in which this resource is defined
60
- * @param props
60
+ * @param props the AppConfig configuration properties
61
61
  * @returns the appconfig deployment strategy
62
62
  */
63
63
  createDeploymentStrategy(id: string, scope: CommonConstruct, props: AppConfigProps): DeploymentStrategy;
@@ -4,7 +4,7 @@ import { createCfnOutput } from '../../utils/index.js';
4
4
  import { Architecture } from '../constants.js';
5
5
  import { ArnsByRegionForArm64, ArnsByRegionForX86_64 } from './constants.js';
6
6
  /**
7
- * Provides operations on AWS
7
+ * Provides operations on AWS AppConfig.
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
@@ -40,7 +40,7 @@ export class AppConfigManager {
40
40
  * @summary Method to create an AppConfig Application
41
41
  * @param id scoped id of the resource
42
42
  * @param scope scope in which this resource is defined
43
- * @param props
43
+ * @param props the AppConfig configuration properties
44
44
  * @returns the appconfig application
45
45
  */
46
46
  createApplication(id, scope, props) {
@@ -59,7 +59,7 @@ export class AppConfigManager {
59
59
  * @param id scoped id of the resource
60
60
  * @param scope scope in which this resource is defined
61
61
  * @param applicationId id of the application
62
- * @param props
62
+ * @param props the AppConfig configuration properties
63
63
  * @returns the appconfig environment
64
64
  */
65
65
  createEnvironment(id, scope, applicationId, props) {
@@ -80,7 +80,7 @@ export class AppConfigManager {
80
80
  * @param id scoped id of the resource
81
81
  * @param scope scope in which this resource is defined
82
82
  * @param applicationId id of the application
83
- * @param props
83
+ * @param props the AppConfig configuration properties
84
84
  * @returns the appconfig configuration profile
85
85
  */
86
86
  createConfigurationProfile(id, scope, applicationId, props) {
@@ -100,7 +100,7 @@ export class AppConfigManager {
100
100
  * @summary Method to create an AppConfig Deployment Strategy
101
101
  * @param id scoped id of the resource
102
102
  * @param scope scope in which this resource is defined
103
- * @param props
103
+ * @param props the AppConfig configuration properties
104
104
  * @returns the appconfig deployment strategy
105
105
  */
106
106
  createDeploymentStrategy(id, scope, props) {
@@ -1,19 +1,29 @@
1
1
  import { CfnApplicationProps, CfnConfigurationProfileProps, CfnDeploymentProps, CfnEnvironmentProps, DeploymentStrategyProps } from 'aws-cdk-lib/aws-appconfig';
2
2
  /**
3
- *
3
+ * Props for an AppConfig deployment strategy with an optional ARN reference.
4
+ * @see {@link AppConfigManager.createDeploymentStrategy}
4
5
  */
5
6
  /** @category Interface */
6
7
  export interface AppConfigDeploymentStrategyProps extends DeploymentStrategyProps {
8
+ /** The ARN of the deployment strategy */
7
9
  deploymentStrategyArn?: string;
8
10
  }
9
11
  /**
12
+ * Props for configuring an AppConfig application and its associated resources.
13
+ * @see {@link AppConfigManager}
10
14
  */
11
15
  /** @category Interface */
12
16
  export interface AppConfigProps {
17
+ /** Configuration for the AppConfig application */
13
18
  application: CfnApplicationProps;
19
+ /** Configuration for the AppConfig configuration profile */
14
20
  configurationProfile: CfnConfigurationProfileProps;
21
+ /** Configuration for the AppConfig deployment */
15
22
  deployment: CfnDeploymentProps;
23
+ /** Configuration for the AppConfig deployment strategy */
16
24
  deploymentStrategy: AppConfigDeploymentStrategyProps;
25
+ /** Configuration for the AppConfig environment */
17
26
  environment: CfnEnvironmentProps;
27
+ /** Unique identifier for the AppConfig resource set */
18
28
  id: string;
19
29
  }
@@ -1,12 +1,20 @@
1
1
  import { CertificateProps } from 'aws-cdk-lib/aws-certificatemanager';
2
2
  /**
3
+ * Props for creating or importing an ACM certificate.
4
+ * @see {@link AcmManager.resolveCertificate}
3
5
  */
4
6
  /** @category Interface */
5
7
  export interface AcmProps extends CertificateProps {
8
+ /** The AWS account ID where the certificate resides */
6
9
  certificateAccount?: string;
10
+ /** The full ARN of an existing certificate to import */
7
11
  certificateArn?: string;
12
+ /** The certificate ID used to construct an ARN when certificateArn is not provided */
8
13
  certificateId?: string;
14
+ /** The AWS region where the certificate resides */
9
15
  certificateRegion?: string;
16
+ /** The SSM parameter name storing the certificate reference */
10
17
  certificateSsmName?: string;
18
+ /** Whether to import an existing certificate instead of creating a new one */
11
19
  useExistingCertificate: boolean;
12
20
  }
@@ -11,7 +11,7 @@ import { CommonConstruct } from '../../common/index.js';
11
11
  import { LambdaEdgeProps } from '../lambda/index.js';
12
12
  import { CloudfrontFunctionProps, DistributionProps } from './types.js';
13
13
  /**
14
- * Provides operations on AWS
14
+ * Provides operations on AWS CloudFront.
15
15
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
16
16
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
17
17
  * @example
@@ -47,12 +47,12 @@ export declare class CloudFrontManager {
47
47
  * @param id scoped id of the resource
48
48
  * @param scope scope in which this resource is defined
49
49
  * @param props distribution properties
50
- * @param siteBucket
51
- * @param logBucket
52
- * @param oai
53
- * @param certificate
54
- * @param aliases
55
- * @param defaultFunctionAssociations
50
+ * @param siteBucket the S3 bucket serving as the origin
51
+ * @param logBucket optional S3 bucket for access logs
52
+ * @param oai optional Origin Access Identity for S3 access
53
+ * @param certificate optional ACM certificate for custom domain HTTPS
54
+ * @param aliases optional custom domain names for the distribution
55
+ * @param defaultFunctionAssociations optional CloudFront function associations for the default behavior
56
56
  */
57
57
  createDistributionWithS3Origin(id: string, scope: CommonConstruct, props: DistributionProps, siteBucket: IBucket, logBucket?: IBucket, oai?: OriginAccessIdentity, certificate?: ICertificate, aliases?: string[], defaultFunctionAssociations?: FunctionAssociation[]): cf.Distribution;
58
58
  /**
@@ -60,12 +60,12 @@ export declare class CloudFrontManager {
60
60
  * @param id scoped id of the resource
61
61
  * @param scope scope in which this resource is defined
62
62
  * @param props distribution properties
63
- * @param origin
64
- * @param domainNames
65
- * @param logBucket
66
- * @param certificate
67
- * @param defaultFunctionAssociations
68
- * @param responseHeadersPolicy
63
+ * @param origin the HTTP origin for the distribution
64
+ * @param domainNames the custom domain names for the distribution
65
+ * @param logBucket optional S3 bucket for access logs
66
+ * @param certificate optional ACM certificate for custom domain HTTPS
67
+ * @param defaultFunctionAssociations optional CloudFront function associations for the default behavior
68
+ * @param responseHeadersPolicy optional response headers policy for the default behavior
69
69
  */
70
70
  createDistributionWithHttpOrigin(id: string, scope: CommonConstruct, props: DistributionProps, origin: HttpOrigin, domainNames: string[], logBucket?: IBucket, certificate?: ICertificate, defaultFunctionAssociations?: FunctionAssociation[], responseHeadersPolicy?: IResponseHeadersPolicyRef): cf.Distribution;
71
71
  /**
@@ -73,30 +73,30 @@ export declare class CloudFrontManager {
73
73
  * @param id scoped id of the resource
74
74
  * @param scope scope in which this resource is defined
75
75
  * @param props lambda@edge properties
76
- * @param layers
77
- * @param code
78
- * @param role
79
- * @param environment
80
- * @param vpc
81
- * @param securityGroups
82
- * @param accessPoint
83
- * @param mountPath
76
+ * @param layers the Lambda layers to attach to the function
77
+ * @param code the asset code bundle for the function
78
+ * @param role the IAM role for the function execution
79
+ * @param environment optional environment variables for the function
80
+ * @param vpc optional VPC to deploy the function into
81
+ * @param securityGroups optional security groups for VPC-connected functions
82
+ * @param accessPoint optional EFS access point for filesystem mounting
83
+ * @param mountPath optional mount path for the EFS filesystem (defaults to /mnt/msg)
84
84
  */
85
85
  createEdgeFunction(id: string, scope: CommonConstruct, props: LambdaEdgeProps, layers: ILayerVersion[], code: AssetCode, role: Role, environment?: any, vpc?: IVpc, securityGroups?: ISecurityGroup[], accessPoint?: IAccessPoint, mountPath?: string): cf.experimental.EdgeFunction;
86
86
  /**
87
- *
88
- * @param id
89
- * @param scope
90
- * @param dockerFilePath
91
- * @param distributionId
92
- * @param paths
87
+ * @summary Method to trigger a CloudFront cache invalidation via a CodeBuild project
88
+ * @param id scoped id of the resource
89
+ * @param scope scope in which this resource is defined
90
+ * @param dockerFilePath the path to the Dockerfile for the CodeBuild project
91
+ * @param distributionId the CloudFront distribution ID to invalidate
92
+ * @param paths optional invalidation paths (defaults to /*)
93
93
  */
94
94
  invalidateCache(id: string, scope: CommonConstruct, dockerFilePath: string, distributionId: string, paths?: string): void;
95
95
  /**
96
96
  * @summary Method to provision a Cloudfront function
97
97
  * @param id scoped id of the resource
98
98
  * @param scope scope in which this resource is defined
99
- * @param props
99
+ * @param props the CloudFront function properties
100
100
  */
101
101
  createCloudfrontFunction(id: string, scope: CommonConstruct, props: CloudfrontFunctionProps): cf.Function;
102
102
  /**
@@ -8,7 +8,7 @@ import _ from 'lodash';
8
8
  import { CommonStack } from '../../common/index.js';
9
9
  import { createCfnOutput } from '../../utils/index.js';
10
10
  /**
11
- * Provides operations on AWS
11
+ * Provides operations on AWS CloudFront.
12
12
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
13
13
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
14
14
  * @example
@@ -51,12 +51,12 @@ export class CloudFrontManager {
51
51
  * @param id scoped id of the resource
52
52
  * @param scope scope in which this resource is defined
53
53
  * @param props distribution properties
54
- * @param siteBucket
55
- * @param logBucket
56
- * @param oai
57
- * @param certificate
58
- * @param aliases
59
- * @param defaultFunctionAssociations
54
+ * @param siteBucket the S3 bucket serving as the origin
55
+ * @param logBucket optional S3 bucket for access logs
56
+ * @param oai optional Origin Access Identity for S3 access
57
+ * @param certificate optional ACM certificate for custom domain HTTPS
58
+ * @param aliases optional custom domain names for the distribution
59
+ * @param defaultFunctionAssociations optional CloudFront function associations for the default behavior
60
60
  */
61
61
  createDistributionWithS3Origin(id, scope, props, siteBucket, logBucket, oai, certificate, aliases, defaultFunctionAssociations) {
62
62
  const distribution = new Distribution(scope, `${id}`, {
@@ -92,12 +92,12 @@ export class CloudFrontManager {
92
92
  * @param id scoped id of the resource
93
93
  * @param scope scope in which this resource is defined
94
94
  * @param props distribution properties
95
- * @param origin
96
- * @param domainNames
97
- * @param logBucket
98
- * @param certificate
99
- * @param defaultFunctionAssociations
100
- * @param responseHeadersPolicy
95
+ * @param origin the HTTP origin for the distribution
96
+ * @param domainNames the custom domain names for the distribution
97
+ * @param logBucket optional S3 bucket for access logs
98
+ * @param certificate optional ACM certificate for custom domain HTTPS
99
+ * @param defaultFunctionAssociations optional CloudFront function associations for the default behavior
100
+ * @param responseHeadersPolicy optional response headers policy for the default behavior
101
101
  */
102
102
  createDistributionWithHttpOrigin(id, scope, props, origin, domainNames, logBucket, certificate, defaultFunctionAssociations, responseHeadersPolicy) {
103
103
  const distribution = new Distribution(scope, `${id}`, {
@@ -142,14 +142,14 @@ export class CloudFrontManager {
142
142
  * @param id scoped id of the resource
143
143
  * @param scope scope in which this resource is defined
144
144
  * @param props lambda@edge properties
145
- * @param layers
146
- * @param code
147
- * @param role
148
- * @param environment
149
- * @param vpc
150
- * @param securityGroups
151
- * @param accessPoint
152
- * @param mountPath
145
+ * @param layers the Lambda layers to attach to the function
146
+ * @param code the asset code bundle for the function
147
+ * @param role the IAM role for the function execution
148
+ * @param environment optional environment variables for the function
149
+ * @param vpc optional VPC to deploy the function into
150
+ * @param securityGroups optional security groups for VPC-connected functions
151
+ * @param accessPoint optional EFS access point for filesystem mounting
152
+ * @param mountPath optional mount path for the EFS filesystem (defaults to /mnt/msg)
153
153
  */
154
154
  createEdgeFunction(id, scope, props, layers, code, role, environment, vpc, securityGroups, accessPoint, mountPath) {
155
155
  if (!props)
@@ -192,12 +192,12 @@ export class CloudFrontManager {
192
192
  return edgeFunction;
193
193
  }
194
194
  /**
195
- *
196
- * @param id
197
- * @param scope
198
- * @param dockerFilePath
199
- * @param distributionId
200
- * @param paths
195
+ * @summary Method to trigger a CloudFront cache invalidation via a CodeBuild project
196
+ * @param id scoped id of the resource
197
+ * @param scope scope in which this resource is defined
198
+ * @param dockerFilePath the path to the Dockerfile for the CodeBuild project
199
+ * @param distributionId the CloudFront distribution ID to invalidate
200
+ * @param paths optional invalidation paths (defaults to /*)
201
201
  */
202
202
  invalidateCache(id, scope, dockerFilePath, distributionId, paths) {
203
203
  new AwsCustomResource(scope, `${id}-trigger-codebuild-${new Date().getTime()}`, {
@@ -216,7 +216,7 @@ export class CloudFrontManager {
216
216
  * @summary Method to provision a Cloudfront function
217
217
  * @param id scoped id of the resource
218
218
  * @param scope scope in which this resource is defined
219
- * @param props
219
+ * @param props the CloudFront function properties
220
220
  */
221
221
  createCloudfrontFunction(id, scope, props) {
222
222
  if (!props)
@@ -1,15 +1,23 @@
1
1
  import { DistributionProps as CfDistributionProps, FunctionProps } from 'aws-cdk-lib/aws-cloudfront';
2
2
  import { TagProps } from '../../types/index.js';
3
3
  /**
4
+ * Props for creating a CloudFront distribution with optional tags.
5
+ * @see {@link CloudFrontManager.createDistributionWithS3Origin}
6
+ * @see {@link CloudFrontManager.createDistributionWithHttpOrigin}
4
7
  */
5
8
  /** @category Interface */
6
9
  export interface DistributionProps extends CfDistributionProps {
10
+ /** Optional tags to apply to the distribution */
7
11
  tags?: TagProps[];
8
12
  }
9
13
  /**
14
+ * Props for creating a CloudFront function.
15
+ * @see {@link CloudFrontManager.createCloudfrontFunction}
10
16
  */
11
17
  /** @category Interface */
12
18
  export interface CloudfrontFunctionProps extends FunctionProps {
19
+ /** The CloudFront event type that triggers the function (e.g. viewer-request, viewer-response) */
13
20
  eventType: string;
21
+ /** The file path to the CloudFront function source code */
14
22
  functionFilePath: string;
15
23
  }
@@ -24,8 +24,8 @@ export declare class LogManager {
24
24
  * @summary Method to create a cloudwatch metric filter
25
25
  * @param id scoped id of the resource
26
26
  * @param scope scope in which this resource is defined
27
- * @param props
28
- * @param logGroup
27
+ * @param props the metric filter properties
28
+ * @param logGroup the log group to apply the metric filter to
29
29
  */
30
30
  createMetricFilter(id: string, scope: CommonConstruct, props: MetricFilterProps, logGroup: logs.ILogGroup): {
31
31
  metric: cdk.aws_cloudwatch.Metric;
@@ -35,14 +35,14 @@ export declare class LogManager {
35
35
  * @summary Method to create a cloudwatch log group (cfn)
36
36
  * @param id scoped id of the resource
37
37
  * @param scope scope in which this resource is defined
38
- * @param props
38
+ * @param props the log group properties
39
39
  */
40
40
  createCfnLogGroup(id: string, scope: CommonConstruct, props: LogProps): cdk.aws_logs.CfnLogGroup;
41
41
  /**
42
42
  * @summary Method to create a cloudwatch log group
43
43
  * @param id scoped id of the resource
44
44
  * @param scope scope in which this resource is defined
45
- * @param props
45
+ * @param props the log group properties
46
46
  */
47
47
  createLogGroup(id: string, scope: CommonConstruct, props: LogProps): cdk.aws_logs.LogGroup;
48
48
  }
@@ -24,8 +24,8 @@ export class LogManager {
24
24
  * @summary Method to create a cloudwatch metric filter
25
25
  * @param id scoped id of the resource
26
26
  * @param scope scope in which this resource is defined
27
- * @param props
28
- * @param logGroup
27
+ * @param props the metric filter properties
28
+ * @param logGroup the log group to apply the metric filter to
29
29
  */
30
30
  createMetricFilter(id, scope, props, logGroup) {
31
31
  if (!props)
@@ -51,7 +51,7 @@ export class LogManager {
51
51
  * @summary Method to create a cloudwatch log group (cfn)
52
52
  * @param id scoped id of the resource
53
53
  * @param scope scope in which this resource is defined
54
- * @param props
54
+ * @param props the log group properties
55
55
  */
56
56
  createCfnLogGroup(id, scope, props) {
57
57
  if (!props)
@@ -75,7 +75,7 @@ export class LogManager {
75
75
  * @summary Method to create a cloudwatch log group
76
76
  * @param id scoped id of the resource
77
77
  * @param scope scope in which this resource is defined
78
- * @param props
78
+ * @param props the log group properties
79
79
  */
80
80
  createLogGroup(id, scope, props) {
81
81
  if (!props)