@gradientedge/cdk-utils-aws 2.3.0 → 2.4.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 (49) hide show
  1. package/dist/src/common/construct.d.ts +38 -0
  2. package/dist/src/common/construct.js +38 -0
  3. package/dist/src/common/resource-name-formatter.d.ts +12 -1
  4. package/dist/src/common/resource-name-formatter.js +12 -1
  5. package/dist/src/common/stack.d.ts +9 -0
  6. package/dist/src/common/stack.js +9 -0
  7. package/dist/src/common/types.d.ts +22 -0
  8. package/dist/src/construct/api-to-any-target/main.d.ts +19 -0
  9. package/dist/src/construct/api-to-any-target/main.js +19 -0
  10. package/dist/src/construct/api-to-eventbridge-target/main.d.ts +6 -0
  11. package/dist/src/construct/api-to-eventbridge-target/main.js +6 -0
  12. package/dist/src/construct/api-to-eventbridge-target-with-sns/main.d.ts +3 -0
  13. package/dist/src/construct/api-to-eventbridge-target-with-sns/main.js +3 -0
  14. package/dist/src/construct/api-to-lambda-target/main.d.ts +9 -0
  15. package/dist/src/construct/api-to-lambda-target/main.js +9 -0
  16. package/dist/src/construct/application-configuration/main.d.ts +27 -0
  17. package/dist/src/construct/application-configuration/main.js +27 -0
  18. package/dist/src/construct/event-handler/main.d.ts +3 -0
  19. package/dist/src/construct/event-handler/main.js +12 -1
  20. package/dist/src/construct/lambda-with-iam-access/main.d.ts +15 -0
  21. package/dist/src/construct/lambda-with-iam-access/main.js +22 -0
  22. package/dist/src/construct/piped-event-handler/main.d.ts +3 -0
  23. package/dist/src/construct/piped-event-handler/main.js +3 -0
  24. package/dist/src/construct/rest-api-lambda/main.js +3 -0
  25. package/dist/src/construct/rest-api-lambda-with-cache/main.d.ts +3 -0
  26. package/dist/src/construct/rest-api-lambda-with-cache/main.js +3 -0
  27. package/dist/src/construct/site-with-ecs-backend/main.d.ts +27 -0
  28. package/dist/src/construct/site-with-ecs-backend/main.js +31 -1
  29. package/dist/src/construct/site-with-lambda-backend/main.d.ts +54 -0
  30. package/dist/src/construct/site-with-lambda-backend/main.js +61 -0
  31. package/dist/src/construct/static-asset-deployment/main.js +4 -0
  32. package/dist/src/services/api-gateway/main.js +6 -0
  33. package/dist/src/services/certificate-manager/main.js +3 -0
  34. package/dist/src/services/cloudfront/main.d.ts +11 -0
  35. package/dist/src/services/cloudfront/main.js +11 -0
  36. package/dist/src/services/cloudtrail/main.js +4 -0
  37. package/dist/src/services/cloudwatch/main.js +9 -0
  38. package/dist/src/services/codebuild/main.d.ts +10 -10
  39. package/dist/src/services/codebuild/main.js +10 -10
  40. package/dist/src/services/elastic-file-system/main.js +3 -0
  41. package/dist/src/services/identity-access-management/main.js +5 -0
  42. package/dist/src/services/lambda/main.d.ts +5 -0
  43. package/dist/src/services/lambda/main.js +12 -0
  44. package/dist/src/services/simple-queue-service/main.js +1 -0
  45. package/dist/src/services/simple-storage-service/main.js +4 -0
  46. package/dist/src/services/step-function/main.js +5 -0
  47. package/dist/src/services/systems-manager/main.d.ts +1 -1
  48. package/dist/src/services/systems-manager/main.js +1 -1
  49. package/package.json +4 -4
@@ -17,38 +17,76 @@ import { CommonStackProps } from './types.js';
17
17
  * @category Common
18
18
  */
19
19
  export declare class CommonConstruct extends Construct {
20
+ /** The common stack properties for the construct */
20
21
  props: CommonStackProps;
22
+ /** Utility for formatting resource names with prefix/suffix conventions */
21
23
  resourceNameFormatter: ResourceNameFormatter;
24
+ /** Manager for AWS Certificate Manager operations */
22
25
  acmManager: AcmManager;
26
+ /** Manager for API Gateway operations */
23
27
  apiManager: ApiManager;
28
+ /** Manager for AWS AppConfig operations */
24
29
  appConfigManager: AppConfigManager;
30
+ /** Manager for AWS CodeBuild operations */
25
31
  codeBuildManager: CodeBuildManager;
32
+ /** Manager for CloudFront distribution operations */
26
33
  cloudFrontManager: CloudFrontManager;
34
+ /** Manager for CloudTrail operations */
27
35
  cloudTrailManager: CloudTrailManager;
36
+ /** Manager for CloudWatch operations */
28
37
  cloudWatchManager: CloudWatchManager;
38
+ /** Manager for DynamoDB operations */
29
39
  dynamodbManager: DynamodbManager;
40
+ /** Manager for Elastic Container Registry operations */
30
41
  ecrManager: EcrManager;
42
+ /** Manager for Elastic Container Service operations */
31
43
  ecsManager: EcsManager;
44
+ /** Manager for Elastic File System operations */
32
45
  efsManager: EfsManager;
46
+ /** Manager for Elastic Kubernetes Service operations */
33
47
  eksManager: EksManager;
48
+ /** Manager for ElastiCache operations */
34
49
  elasticacheManager: ElastiCacheManager;
50
+ /** Manager for EventBridge operations */
35
51
  eventManager: EventManager;
52
+ /** Manager for EventBridge target operations */
36
53
  eventTargetManager: EventTargetManager;
54
+ /** Manager for CloudWatch Evidently operations */
37
55
  evidentlyManager: EvidentlyManager;
56
+ /** Manager for IAM operations */
38
57
  iamManager: IamManager;
58
+ /** Manager for KMS operations */
39
59
  kmsManager: KmsManager;
60
+ /** Manager for Lambda operations */
40
61
  lambdaManager: LambdaManager;
62
+ /** Manager for CloudWatch Logs operations */
41
63
  logManager: LogManager;
64
+ /** Manager for Route53 operations */
42
65
  route53Manager: Route53Manager;
66
+ /** Manager for S3 operations */
43
67
  s3Manager: S3Manager;
68
+ /** Manager for Secrets Manager operations */
44
69
  secretsManager: SecretsManager;
70
+ /** Manager for Step Functions operations */
45
71
  sfnManager: SfnManager;
72
+ /** Manager for SNS operations */
46
73
  snsManager: SnsManager;
74
+ /** Manager for SQS operations */
47
75
  sqsManager: SqsManager;
76
+ /** Manager for Systems Manager operations */
48
77
  ssmManager: SsmManager;
78
+ /** Manager for VPC operations */
49
79
  vpcManager: VpcManager;
80
+ /** Manager for WAF operations */
50
81
  wafManager: WafManager;
82
+ /** The fully qualified domain name resolved from domainName and subDomain */
51
83
  fullyQualifiedDomainName: string;
84
+ /**
85
+ * @summary Create a new CommonConstruct
86
+ * @param parent the parent construct
87
+ * @param id scoped id of the resource
88
+ * @param props the common stack properties
89
+ */
52
90
  constructor(parent: Construct, id: string, props: CommonStackProps);
53
91
  /**
54
92
  * @summary Helper method to add CloudFormation outputs from the construct
@@ -17,38 +17,76 @@ import { ResourceNameFormatter } from './resource-name-formatter.js';
17
17
  * @category Common
18
18
  */
19
19
  export class CommonConstruct extends Construct {
20
+ /** The common stack properties for the construct */
20
21
  props;
22
+ /** Utility for formatting resource names with prefix/suffix conventions */
21
23
  resourceNameFormatter;
24
+ /** Manager for AWS Certificate Manager operations */
22
25
  acmManager;
26
+ /** Manager for API Gateway operations */
23
27
  apiManager;
28
+ /** Manager for AWS AppConfig operations */
24
29
  appConfigManager;
30
+ /** Manager for AWS CodeBuild operations */
25
31
  codeBuildManager;
32
+ /** Manager for CloudFront distribution operations */
26
33
  cloudFrontManager;
34
+ /** Manager for CloudTrail operations */
27
35
  cloudTrailManager;
36
+ /** Manager for CloudWatch operations */
28
37
  cloudWatchManager;
38
+ /** Manager for DynamoDB operations */
29
39
  dynamodbManager;
40
+ /** Manager for Elastic Container Registry operations */
30
41
  ecrManager;
42
+ /** Manager for Elastic Container Service operations */
31
43
  ecsManager;
44
+ /** Manager for Elastic File System operations */
32
45
  efsManager;
46
+ /** Manager for Elastic Kubernetes Service operations */
33
47
  eksManager;
48
+ /** Manager for ElastiCache operations */
34
49
  elasticacheManager;
50
+ /** Manager for EventBridge operations */
35
51
  eventManager;
52
+ /** Manager for EventBridge target operations */
36
53
  eventTargetManager;
54
+ /** Manager for CloudWatch Evidently operations */
37
55
  evidentlyManager;
56
+ /** Manager for IAM operations */
38
57
  iamManager;
58
+ /** Manager for KMS operations */
39
59
  kmsManager;
60
+ /** Manager for Lambda operations */
40
61
  lambdaManager;
62
+ /** Manager for CloudWatch Logs operations */
41
63
  logManager;
64
+ /** Manager for Route53 operations */
42
65
  route53Manager;
66
+ /** Manager for S3 operations */
43
67
  s3Manager;
68
+ /** Manager for Secrets Manager operations */
44
69
  secretsManager;
70
+ /** Manager for Step Functions operations */
45
71
  sfnManager;
72
+ /** Manager for SNS operations */
46
73
  snsManager;
74
+ /** Manager for SQS operations */
47
75
  sqsManager;
76
+ /** Manager for Systems Manager operations */
48
77
  ssmManager;
78
+ /** Manager for VPC operations */
49
79
  vpcManager;
80
+ /** Manager for WAF operations */
50
81
  wafManager;
82
+ /** The fully qualified domain name resolved from domainName and subDomain */
51
83
  fullyQualifiedDomainName;
84
+ /**
85
+ * @summary Create a new CommonConstruct
86
+ * @param parent the parent construct
87
+ * @param id scoped id of the resource
88
+ * @param props the common stack properties
89
+ */
52
90
  constructor(parent, id, props) {
53
91
  super(parent, id);
54
92
  this.props = props;
@@ -1,8 +1,19 @@
1
1
  import { Construct } from 'constructs';
2
2
  import { CommonStackProps, ResourceNameFormatterProps } from './types.js';
3
- /** @category Common */
3
+ /**
4
+ * Utility class to format resource names with configurable prefix, suffix, and stage conventions.
5
+ * Ensures consistent naming across all provisioned AWS resources.
6
+ * @category Common
7
+ */
4
8
  export declare class ResourceNameFormatter extends Construct {
9
+ /** The common stack properties used for resource name formatting */
5
10
  props: CommonStackProps;
11
+ /**
12
+ * @summary Create a new ResourceNameFormatter
13
+ * @param parent the parent construct
14
+ * @param id scoped id of the resource
15
+ * @param props the common stack properties
16
+ */
6
17
  constructor(parent: Construct, id: string, props: CommonStackProps);
7
18
  /**
8
19
  * @summary Helper method to format a resource name based on the provided options
@@ -1,7 +1,18 @@
1
1
  import { Construct } from 'constructs';
2
- /** @category Common */
2
+ /**
3
+ * Utility class to format resource names with configurable prefix, suffix, and stage conventions.
4
+ * Ensures consistent naming across all provisioned AWS resources.
5
+ * @category Common
6
+ */
3
7
  export class ResourceNameFormatter extends Construct {
8
+ /** The common stack properties used for resource name formatting */
4
9
  props;
10
+ /**
11
+ * @summary Create a new ResourceNameFormatter
12
+ * @param parent the parent construct
13
+ * @param id scoped id of the resource
14
+ * @param props the common stack properties
15
+ */
5
16
  constructor(parent, id, props) {
6
17
  super(parent, id);
7
18
  this.props = props;
@@ -16,9 +16,18 @@ import { CommonConstruct } from './construct.js';
16
16
  * @category Common
17
17
  */
18
18
  export declare class CommonStack extends Stack {
19
+ /** The default Node.js runtime used for Lambda functions */
19
20
  static NODEJS_RUNTIME: Runtime;
21
+ /** The common construct instance provisioned by this stack */
20
22
  construct: CommonConstruct;
23
+ /** The resolved common stack properties */
21
24
  props: CommonStackProps;
25
+ /**
26
+ * @summary Create a new CommonStack
27
+ * @param parent the CDK app
28
+ * @param name the stack name
29
+ * @param props the stack properties
30
+ */
22
31
  constructor(parent: App, name: string, props: StackProps);
23
32
  /**
24
33
  * @summary Method to determine the core CDK construct properties injected via context cdk.json
@@ -20,9 +20,18 @@ import { CommonConstruct } from './construct.js';
20
20
  * @category Common
21
21
  */
22
22
  export class CommonStack extends Stack {
23
+ /** The default Node.js runtime used for Lambda functions */
23
24
  static NODEJS_RUNTIME = Runtime.NODEJS_24_X;
25
+ /** The common construct instance provisioned by this stack */
24
26
  construct;
27
+ /** The resolved common stack properties */
25
28
  props;
29
+ /**
30
+ * @summary Create a new CommonStack
31
+ * @param parent the CDK app
32
+ * @param name the stack name
33
+ * @param props the stack properties
34
+ */
26
35
  constructor(parent, name, props) {
27
36
  super(parent, name, props);
28
37
  /* determine extra cdk contexts */
@@ -3,30 +3,52 @@ import { Runtime, Tracing } from 'aws-cdk-lib/aws-lambda';
3
3
  import { RetentionDays } from 'aws-cdk-lib/aws-logs';
4
4
  import { BaseProps } from '@gradientedge/cdk-utils-common';
5
5
  /**
6
+ * Common stack properties shared across all AWS constructs and stacks
6
7
  */
7
8
  /** @category Interface */
8
9
  export interface CommonStackProps extends BaseProps, StackProps {
10
+ /** The AWS region for resource deployment */
9
11
  region: string;
12
+ /** Optional project identifier used in resource naming */
10
13
  resourceProjectIdentifier?: string;
14
+ /** Global prefix prepended to all resource names */
11
15
  globalPrefix?: string;
16
+ /** Global suffix appended to all resource names */
12
17
  globalSuffix?: string;
18
+ /** Default prefix for resource names */
13
19
  resourcePrefix?: string;
20
+ /** Default suffix for resource names */
14
21
  resourceSuffix?: string;
22
+ /** The log retention period for CloudWatch log groups */
15
23
  logRetention?: RetentionDays;
24
+ /** The default reserved concurrent executions for Lambda functions */
16
25
  defaultReservedLambdaConcurrentExecutions?: number;
26
+ /** The default tracing configuration for Lambda functions */
17
27
  defaultTracing?: Tracing;
28
+ /** Whether to exclude the domain name from S3 bucket names */
18
29
  excludeDomainNameForBuckets?: boolean;
30
+ /** Whether to exclude the account number from S3 bucket names */
19
31
  excludeAccountNumberForBuckets?: boolean;
32
+ /** The Node.js runtime version for Lambda functions */
20
33
  nodejsRuntime?: Runtime;
34
+ /** Per-service resource name formatting options */
21
35
  resourceNameOptions?: {
22
36
  [key: string]: ResourceNameFormatterProps;
23
37
  };
24
38
  }
39
+ /**
40
+ * Options for controlling how a resource name is formatted
41
+ */
25
42
  /** @category Interface */
26
43
  export interface ResourceNameFormatterProps {
44
+ /** Whether to exclude the prefix and suffix from the formatted name */
27
45
  exclude?: boolean;
46
+ /** Whether to include the global prefix */
28
47
  globalPrefix?: boolean;
48
+ /** Whether to include the global suffix */
29
49
  globalSuffix?: boolean;
50
+ /** Custom prefix to use instead of the default resource prefix */
30
51
  prefix?: string;
52
+ /** Custom suffix to use instead of the default resource suffix */
31
53
  suffix?: string;
32
54
  }
@@ -26,6 +26,9 @@ export declare class ApiToAnyTarget extends CommonConstruct {
26
26
  apiToAnyTargetRestApi: ApiToAnyTargetRestApiType;
27
27
  apiResource: string;
28
28
  constructor(parent: Construct, id: string, props: ApiToAnyTargetProps);
29
+ /**
30
+ * @summary Initialise and provision resources
31
+ */
29
32
  initResources(): void;
30
33
  /**
31
34
  * @summary Method to resolve secrets from SecretsManager
@@ -40,9 +43,25 @@ export declare class ApiToAnyTarget extends CommonConstruct {
40
43
  * @summary Method to resolve a certificate based on attributes
41
44
  */
42
45
  protected resolveCertificate(): void;
46
+ /**
47
+ * @summary Create or resolve the API Gateway REST API for the any-target integration
48
+ */
43
49
  protected createApiToAnyTargetRestApi(): void;
50
+ /**
51
+ * @summary Create an API resource with the specified integration and method configuration
52
+ * @param apiResourceProps the resource properties including path, integration, and authorizer
53
+ */
44
54
  protected createApiToAnyTargetResource(apiResourceProps: ApiToAnyTargetRestApiResource): Resource | undefined;
55
+ /**
56
+ * @summary Create the custom domain for the API Gateway
57
+ */
45
58
  protected createApiDomain(): void;
59
+ /**
60
+ * @summary Create the base path mapping for the API custom domain
61
+ */
46
62
  protected createApiBasePathMapping(): void;
63
+ /**
64
+ * @summary Create Route53 DNS records for the API custom domain
65
+ */
47
66
  protected createApiRouteAssets(): void;
48
67
  }
@@ -32,6 +32,9 @@ export class ApiToAnyTarget extends CommonConstruct {
32
32
  this.id = id;
33
33
  this.apiToAnyTargetRestApi = new ApiToAnyTargetRestApi();
34
34
  }
35
+ /**
36
+ * @summary Initialise and provision resources
37
+ */
35
38
  initResources() {
36
39
  /* application related resources */
37
40
  this.resolveSecrets();
@@ -70,6 +73,9 @@ export class ApiToAnyTarget extends CommonConstruct {
70
73
  }
71
74
  this.apiToAnyTargetRestApi.certificate = this.acmManager.resolveCertificate(`${this.id}-certificate`, this, this.props.api.certificate);
72
75
  }
76
+ /**
77
+ * @summary Create or resolve the API Gateway REST API for the any-target integration
78
+ */
73
79
  createApiToAnyTargetRestApi() {
74
80
  if (this.props.api.useExisting && this.props.api.importedRestApiRef) {
75
81
  this.apiToAnyTargetRestApi.api = RestApi.fromRestApiId(this, `${this.id}-rest-api`, Fn.importValue(this.props.api.importedRestApiRef));
@@ -114,6 +120,10 @@ export class ApiToAnyTarget extends CommonConstruct {
114
120
  this.addCfnOutput(`${this.id}-restApiId`, this.apiToAnyTargetRestApi.api.restApiId);
115
121
  this.addCfnOutput(`${this.id}-restApiRootResourceId`, this.apiToAnyTargetRestApi.api.root.resourceId);
116
122
  }
123
+ /**
124
+ * @summary Create an API resource with the specified integration and method configuration
125
+ * @param apiResourceProps the resource properties including path, integration, and authorizer
126
+ */
117
127
  createApiToAnyTargetResource(apiResourceProps) {
118
128
  if (!this.props.api.withResource)
119
129
  return;
@@ -130,6 +140,9 @@ export class ApiToAnyTarget extends CommonConstruct {
130
140
  }
131
141
  return this.apiManager.createApiResource(`${this.id}-resource-${apiResourceProps.path}}`, this, apiResourceProps.parent ?? rootResource, apiResourceProps.path, apiResourceProps.integration, apiResourceProps.addProxy, apiResourceProps.authorizer, apiResourceProps.allowedOrigins, apiResourceProps.allowedMethods, apiResourceProps.allowedHeaders, apiResourceProps.methodRequestParameters, apiResourceProps.proxyIntegration, apiResourceProps.enableDefaultCors, apiResourceProps.mockIntegration, apiResourceProps.mockMethodResponses);
132
142
  }
143
+ /**
144
+ * @summary Create the custom domain for the API Gateway
145
+ */
133
146
  createApiDomain() {
134
147
  if (this.props.api.useExisting)
135
148
  return;
@@ -137,6 +150,9 @@ export class ApiToAnyTarget extends CommonConstruct {
137
150
  ? `${this.props.apiSubDomain}.${this.fullyQualifiedDomainName}`
138
151
  : `${this.props.apiSubDomain}-${this.props.stage}.${this.fullyQualifiedDomainName}`, this.apiToAnyTargetRestApi.certificate);
139
152
  }
153
+ /**
154
+ * @summary Create the base path mapping for the API custom domain
155
+ */
140
156
  createApiBasePathMapping() {
141
157
  if (this.props.api.useExisting)
142
158
  return;
@@ -147,6 +163,9 @@ export class ApiToAnyTarget extends CommonConstruct {
147
163
  stage: this.apiToAnyTargetRestApi.api.deploymentStage,
148
164
  });
149
165
  }
166
+ /**
167
+ * @summary Create Route53 DNS records for the API custom domain
168
+ */
150
169
  createApiRouteAssets() {
151
170
  if (this.props.api.useExisting)
152
171
  return;
@@ -28,6 +28,9 @@ export declare class ApiToEventBridgeTarget extends CommonConstruct {
28
28
  apiToEventBridgeTargetRestApi: ApiToEventBridgeTargetRestApiType;
29
29
  apiResource: string;
30
30
  constructor(parent: Construct, id: string, props: ApiToEventBridgeTargetProps);
31
+ /**
32
+ * @summary Initialise and provision resources
33
+ */
31
34
  initResources(): void;
32
35
  /**
33
36
  * @summary Method to resolve secrets from SecretsManager
@@ -54,6 +57,9 @@ export declare class ApiToEventBridgeTarget extends CommonConstruct {
54
57
  * Method to create EventBridge rule with lambda target for success
55
58
  */
56
59
  protected createApiToEventBridgeTargetRule(): void;
60
+ /**
61
+ * @summary Create the IAM policy for the EventBridge target integration
62
+ */
57
63
  protected createApiToEventBridgeTargetPolicy(): void;
58
64
  /**
59
65
  * @summary Method to create a role for api integration
@@ -42,6 +42,9 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
42
42
  this.apiToEventBridgeTargetRestApi = new ApiToEventbridgeTargetRestApi();
43
43
  this.apiResource = 'notify';
44
44
  }
45
+ /**
46
+ * @summary Initialise and provision resources
47
+ */
45
48
  initResources() {
46
49
  /* application related resources */
47
50
  this.resolveSecrets();
@@ -139,6 +142,9 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
139
142
  };
140
143
  this.apiEvent.rule = this.eventManager.createRule(`${this.id}-api-to-eventbridge-target-rule`, this, this.props.event.rule, this.apiEvent.eventBus, [new CloudWatchLogGroup(this.apiEvent.logGroup)]);
141
144
  }
145
+ /**
146
+ * @summary Create the IAM policy for the EventBridge target integration
147
+ */
142
148
  createApiToEventBridgeTargetPolicy() {
143
149
  this.apiToEventBridgeTargetRestApi.policy = new PolicyDocument({
144
150
  statements: [this.iamManager.statementForPutEvents()],
@@ -31,6 +31,9 @@ export declare class ApiToEventBridgeTargetWithSns extends CommonConstruct {
31
31
  apiDestinedRestApi: ApiToEventBridgeTargetRestApiType;
32
32
  apiResource: string;
33
33
  constructor(parent: Construct, id: string, props: ApiToEventBridgeTargetProps);
34
+ /**
35
+ * @summary Initialise and provision resources
36
+ */
34
37
  initResources(): void;
35
38
  /**
36
39
  * @summary Method to resolve secrets from SecretsManager
@@ -47,6 +47,9 @@ export class ApiToEventBridgeTargetWithSns extends CommonConstruct {
47
47
  this.apiDestinedRestApi = new ApiToEventbridgeTargetRestApi();
48
48
  this.apiResource = 'notify';
49
49
  }
50
+ /**
51
+ * @summary Initialise and provision resources
52
+ */
50
53
  initResources() {
51
54
  /* application related resources */
52
55
  this.resolveSecrets();
@@ -12,6 +12,9 @@ export declare class ApiToLambdaTarget extends CommonConstruct {
12
12
  apiToLambdaTargetRestApi: ApiToLambdaTargetRestApiType;
13
13
  apiResource: string;
14
14
  constructor(parent: Construct, id: string, props: ApiToLambdaTargetProps);
15
+ /**
16
+ * @summary Initialise and provision resources
17
+ */
15
18
  initResources(): void;
16
19
  /**
17
20
  * @summary Method to resolve secrets from SecretsManager
@@ -34,6 +37,9 @@ export declare class ApiToLambdaTarget extends CommonConstruct {
34
37
  * @summary Method to create api integration method error response
35
38
  */
36
39
  protected createApiToLambdaTargetMethodErrorResponse(): void;
40
+ /**
41
+ * @summary Resolve an existing Lambda function by name for the API integration
42
+ */
37
43
  protected resolveApiToLambdaTargetFunction(): void;
38
44
  /**
39
45
  * @summary Method to create rest restApi for Api
@@ -43,6 +49,9 @@ export declare class ApiToLambdaTarget extends CommonConstruct {
43
49
  * @summary Method to create api integration resource
44
50
  */
45
51
  protected createApiToLambdaTargetResource(): void;
52
+ /**
53
+ * @summary Create the IAM policy for the Lambda target integration
54
+ */
46
55
  protected createApiToLambdaTargetPolicy(): void;
47
56
  /**
48
57
  * @summary Method to create a role for api integration
@@ -21,6 +21,9 @@ export class ApiToLambdaTarget extends CommonConstruct {
21
21
  this.id = id;
22
22
  this.apiToLambdaTargetRestApi = new ApiToLambdaTargetRestApi();
23
23
  }
24
+ /**
25
+ * @summary Initialise and provision resources
26
+ */
24
27
  initResources() {
25
28
  this.resolveSecrets();
26
29
  this.resolveHostedZone();
@@ -100,6 +103,9 @@ export class ApiToLambdaTarget extends CommonConstruct {
100
103
  ...this.props.api.methodErrorResponse,
101
104
  };
102
105
  }
106
+ /**
107
+ * @summary Resolve an existing Lambda function by name for the API integration
108
+ */
103
109
  resolveApiToLambdaTargetFunction() {
104
110
  this.apiToLambdaTargetRestApi.lambda = Function.fromFunctionName(this, `${this.id}-lambda`, this.resourceNameFormatter.format(this.props.lambdaFunctionName));
105
111
  }
@@ -143,6 +149,9 @@ export class ApiToLambdaTarget extends CommonConstruct {
143
149
  }
144
150
  this.apiToLambdaTargetRestApi.resource = rootResource.addResource(this.props.api.resource ?? this.apiResource);
145
151
  }
152
+ /**
153
+ * @summary Create the IAM policy for the Lambda target integration
154
+ */
146
155
  createApiToLambdaTargetPolicy() {
147
156
  this.apiToLambdaTargetRestApi.policy = new PolicyDocument({
148
157
  statements: [
@@ -12,13 +12,40 @@ export declare class ApplicationConfiguration extends CommonConstruct {
12
12
  appConfigVersion: CfnHostedConfigurationVersion;
13
13
  appConfigDeploymentStrategy: IDeploymentStrategy;
14
14
  constructor(parent: Construct, id: string, props: ApplicationConfigurationProps);
15
+ /**
16
+ * @summary Initialise and provision resources
17
+ */
15
18
  initResources(): void;
19
+ /**
20
+ * @summary Create all AppConfig resources for the application configuration
21
+ */
16
22
  protected createConfiguration(): void;
23
+ /**
24
+ * @summary Create the AppConfig application resource
25
+ */
17
26
  protected createAppConfigApplication(): void;
27
+ /**
28
+ * @summary Create the AppConfig environment resource
29
+ */
18
30
  protected createAppConfigEnvironment(): void;
31
+ /**
32
+ * @summary Create the AppConfig configuration profile resource
33
+ */
19
34
  protected createAppConfigProfile(): void;
35
+ /**
36
+ * @summary Create the AppConfig hosted configuration version with the provided content
37
+ */
20
38
  protected createAppConfigVersion(): void;
39
+ /**
40
+ * @summary Create or resolve the AppConfig deployment strategy
41
+ */
21
42
  protected createAppConfigDeploymentStrategy(): void;
43
+ /**
44
+ * @summary Create the AppConfig deployment to roll out the configuration
45
+ */
22
46
  protected createAppConfigDeployment(): void;
47
+ /**
48
+ * @summary Resolve environment variables containing AppConfig resource identifiers for Lambda consumption
49
+ */
23
50
  resolveEnvironmentVariables(): any;
24
51
  }
@@ -14,10 +14,16 @@ export class ApplicationConfiguration extends CommonConstruct {
14
14
  this.props = props;
15
15
  this.id = id;
16
16
  }
17
+ /**
18
+ * @summary Initialise and provision resources
19
+ */
17
20
  initResources() {
18
21
  this.createConfiguration();
19
22
  this.resolveEnvironmentVariables();
20
23
  }
24
+ /**
25
+ * @summary Create all AppConfig resources for the application configuration
26
+ */
21
27
  createConfiguration() {
22
28
  this.createAppConfigApplication();
23
29
  this.createAppConfigEnvironment();
@@ -26,15 +32,27 @@ export class ApplicationConfiguration extends CommonConstruct {
26
32
  this.createAppConfigDeploymentStrategy();
27
33
  this.createAppConfigDeployment();
28
34
  }
35
+ /**
36
+ * @summary Create the AppConfig application resource
37
+ */
29
38
  createAppConfigApplication() {
30
39
  this.appConfigApplication = this.appConfigManager.createApplication(`${this.id}-ac-application`, this, this.props.appConfig);
31
40
  }
41
+ /**
42
+ * @summary Create the AppConfig environment resource
43
+ */
32
44
  createAppConfigEnvironment() {
33
45
  this.appConfigEnvironment = this.appConfigManager.createEnvironment(`${this.id}-ac-environment`, this, Fn.ref(this.appConfigApplication.logicalId), this.props.appConfig);
34
46
  }
47
+ /**
48
+ * @summary Create the AppConfig configuration profile resource
49
+ */
35
50
  createAppConfigProfile() {
36
51
  this.appConfigProfile = this.appConfigManager.createConfigurationProfile(`${this.id}-ac-profile`, this, Fn.ref(this.appConfigApplication.logicalId), this.props.appConfig);
37
52
  }
53
+ /**
54
+ * @summary Create the AppConfig hosted configuration version with the provided content
55
+ */
38
56
  createAppConfigVersion() {
39
57
  this.appConfigVersion = new CfnHostedConfigurationVersion(this, `${this.id}-ac-configuration`, {
40
58
  applicationId: Fn.ref(this.appConfigApplication.logicalId),
@@ -43,6 +61,9 @@ export class ApplicationConfiguration extends CommonConstruct {
43
61
  contentType: 'application/json',
44
62
  });
45
63
  }
64
+ /**
65
+ * @summary Create or resolve the AppConfig deployment strategy
66
+ */
46
67
  createAppConfigDeploymentStrategy() {
47
68
  if (!this.props.appConfig.deploymentStrategy)
48
69
  return;
@@ -61,6 +82,9 @@ export class ApplicationConfiguration extends CommonConstruct {
61
82
  deploymentStrategyName: this.resourceNameFormatter.format(this.props.appConfig.deploymentStrategy.deploymentStrategyName ?? 'common-deployment-strategy', this.props.resourceNameOptions?.appconfig),
62
83
  });
63
84
  }
85
+ /**
86
+ * @summary Create the AppConfig deployment to roll out the configuration
87
+ */
64
88
  createAppConfigDeployment() {
65
89
  new CfnDeployment(this, `${this.id}-app-config-deployment`, {
66
90
  applicationId: Fn.ref(this.appConfigApplication.logicalId),
@@ -70,6 +94,9 @@ export class ApplicationConfiguration extends CommonConstruct {
70
94
  environmentId: Fn.ref(this.appConfigEnvironment.logicalId),
71
95
  });
72
96
  }
97
+ /**
98
+ * @summary Resolve environment variables containing AppConfig resource identifiers for Lambda consumption
99
+ */
73
100
  resolveEnvironmentVariables() {
74
101
  return {
75
102
  APP_CONFIG_APPLICATION_ID: Fn.ref(this.appConfigApplication.logicalId),
@@ -28,6 +28,9 @@ export declare class EventHandler extends CommonConstruct {
28
28
  useMapState: boolean;
29
29
  vpc: IVpc;
30
30
  constructor(parent: Construct, id: string, props: EventHandlerProps);
31
+ /**
32
+ * @summary Initialise and provision resources
33
+ */
31
34
  initResources(): void;
32
35
  /**
33
36
  * @summary Method to resolve common vpc or create a new one.