@gradientedge/cdk-utils-aws 2.0.0 → 2.2.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.
- package/README.md +31 -0
- package/dist/src/common/construct.d.ts +2 -2
- package/dist/src/common/construct.js +2 -2
- package/dist/src/common/resource-name-formatter.d.ts +1 -0
- package/dist/src/common/resource-name-formatter.js +1 -0
- package/dist/src/common/stack.d.ts +2 -1
- package/dist/src/common/stack.js +2 -1
- package/dist/src/common/types.d.ts +2 -0
- package/dist/src/construct/api-to-any-target/main.d.ts +2 -1
- package/dist/src/construct/api-to-any-target/main.js +2 -1
- package/dist/src/construct/api-to-any-target/target.d.ts +1 -0
- package/dist/src/construct/api-to-any-target/target.js +1 -0
- package/dist/src/construct/api-to-any-target/types.d.ts +4 -0
- package/dist/src/construct/api-to-eventbridge-target/api.d.ts +2 -1
- package/dist/src/construct/api-to-eventbridge-target/api.js +2 -1
- package/dist/src/construct/api-to-eventbridge-target/event.d.ts +2 -1
- package/dist/src/construct/api-to-eventbridge-target/event.js +2 -1
- package/dist/src/construct/api-to-eventbridge-target/main.d.ts +3 -2
- package/dist/src/construct/api-to-eventbridge-target/main.js +3 -2
- package/dist/src/construct/api-to-eventbridge-target/types.d.ts +8 -3
- package/dist/src/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +2 -1
- package/dist/src/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.js +2 -1
- package/dist/src/construct/api-to-eventbridge-target-with-sns/main.d.ts +3 -2
- package/dist/src/construct/api-to-eventbridge-target-with-sns/main.js +3 -2
- package/dist/src/construct/api-to-eventbridge-target-with-sns/types.d.ts +2 -0
- package/dist/src/construct/api-to-lambda-target/api.d.ts +2 -1
- package/dist/src/construct/api-to-lambda-target/api.js +2 -1
- package/dist/src/construct/api-to-lambda-target/main.d.ts +1 -0
- package/dist/src/construct/api-to-lambda-target/main.js +1 -0
- package/dist/src/construct/api-to-lambda-target/types.d.ts +3 -0
- package/dist/src/construct/application-configuration/main.d.ts +1 -0
- package/dist/src/construct/application-configuration/main.js +1 -0
- package/dist/src/construct/application-configuration/types.d.ts +1 -0
- package/dist/src/construct/event-handler/handler.d.ts +1 -0
- package/dist/src/construct/event-handler/handler.js +1 -0
- package/dist/src/construct/event-handler/main.d.ts +2 -1
- package/dist/src/construct/event-handler/main.js +2 -1
- package/dist/src/construct/event-handler/types.d.ts +2 -0
- package/dist/src/construct/lambda-with-iam-access/main.d.ts +2 -1
- package/dist/src/construct/lambda-with-iam-access/main.js +2 -1
- package/dist/src/construct/lambda-with-iam-access/types.d.ts +2 -0
- package/dist/src/construct/piped-event-handler/main.d.ts +2 -1
- package/dist/src/construct/piped-event-handler/main.js +2 -1
- package/dist/src/construct/piped-event-handler/types.d.ts +1 -0
- package/dist/src/construct/rest-api-lambda/main.d.ts +3 -2
- package/dist/src/construct/rest-api-lambda/main.js +3 -2
- package/dist/src/construct/rest-api-lambda/types.d.ts +2 -0
- package/dist/src/construct/rest-api-lambda-with-cache/main.d.ts +3 -2
- package/dist/src/construct/rest-api-lambda-with-cache/main.js +3 -2
- package/dist/src/construct/rest-api-lambda-with-cache/types.d.ts +1 -0
- package/dist/src/construct/site-with-ecs-backend/constants.d.ts +1 -0
- package/dist/src/construct/site-with-ecs-backend/constants.js +1 -0
- package/dist/src/construct/site-with-ecs-backend/main.d.ts +2 -1
- package/dist/src/construct/site-with-ecs-backend/main.js +2 -1
- package/dist/src/construct/site-with-ecs-backend/types.d.ts +5 -0
- package/dist/src/construct/site-with-lambda-backend/constants.d.ts +2 -0
- package/dist/src/construct/site-with-lambda-backend/constants.js +2 -0
- package/dist/src/construct/site-with-lambda-backend/main.d.ts +2 -1
- package/dist/src/construct/site-with-lambda-backend/main.js +2 -1
- package/dist/src/construct/site-with-lambda-backend/types.d.ts +5 -0
- package/dist/src/construct/static-asset-deployment/main.d.ts +2 -1
- package/dist/src/construct/static-asset-deployment/main.js +2 -1
- package/dist/src/construct/static-asset-deployment/types.d.ts +3 -0
- package/dist/src/construct/static-site/main.d.ts +2 -1
- package/dist/src/construct/static-site/main.js +2 -1
- package/dist/src/construct/static-site/types.d.ts +1 -0
- package/dist/src/services/api-gateway/main.d.ts +2 -1
- package/dist/src/services/api-gateway/main.js +2 -1
- package/dist/src/services/api-gateway/types.d.ts +2 -0
- package/dist/src/services/appconfig/constants.d.ts +2 -0
- package/dist/src/services/appconfig/constants.js +2 -0
- package/dist/src/services/appconfig/main.d.ts +2 -1
- package/dist/src/services/appconfig/main.js +2 -1
- package/dist/src/services/appconfig/types.d.ts +2 -0
- package/dist/src/services/certificate-manager/main.d.ts +13 -11
- package/dist/src/services/certificate-manager/main.js +13 -11
- package/dist/src/services/certificate-manager/types.d.ts +1 -0
- package/dist/src/services/cloudfront/main.d.ts +2 -1
- package/dist/src/services/cloudfront/main.js +2 -1
- package/dist/src/services/cloudfront/types.d.ts +2 -0
- package/dist/src/services/cloudtrail/main.d.ts +2 -1
- package/dist/src/services/cloudtrail/main.js +2 -1
- package/dist/src/services/cloudtrail/types.d.ts +1 -0
- package/dist/src/services/cloudwatch/logs.d.ts +2 -1
- package/dist/src/services/cloudwatch/logs.js +2 -1
- package/dist/src/services/cloudwatch/main.d.ts +2 -1
- package/dist/src/services/cloudwatch/main.js +2 -1
- package/dist/src/services/cloudwatch/types.d.ts +11 -0
- package/dist/src/services/codebuild/main.d.ts +2 -1
- package/dist/src/services/codebuild/main.js +2 -1
- package/dist/src/services/constants.d.ts +1 -0
- package/dist/src/services/constants.js +1 -0
- package/dist/src/services/dynamodb/main.d.ts +2 -1
- package/dist/src/services/dynamodb/main.js +2 -1
- package/dist/src/services/dynamodb/types.d.ts +2 -0
- package/dist/src/services/elastic-container-registry/main.d.ts +2 -1
- package/dist/src/services/elastic-container-registry/main.js +2 -1
- package/dist/src/services/elastic-container-service/main.d.ts +2 -1
- package/dist/src/services/elastic-container-service/main.js +2 -1
- package/dist/src/services/elastic-container-service/types.d.ts +6 -0
- package/dist/src/services/elastic-file-system/main.d.ts +4 -1
- package/dist/src/services/elastic-file-system/main.js +4 -1
- package/dist/src/services/elastic-file-system/types.d.ts +2 -0
- package/dist/src/services/elastic-kubernetes-service/main.d.ts +2 -1
- package/dist/src/services/elastic-kubernetes-service/main.js +2 -1
- package/dist/src/services/elastic-kubernetes-service/types.d.ts +1 -0
- package/dist/src/services/elasticache/main.d.ts +1 -0
- package/dist/src/services/elasticache/main.js +1 -0
- package/dist/src/services/elasticache/types.d.ts +2 -0
- package/dist/src/services/eventbridge/main.d.ts +3 -2
- package/dist/src/services/eventbridge/main.js +3 -2
- package/dist/src/services/eventbridge/target.d.ts +4 -1
- package/dist/src/services/eventbridge/target.js +3 -1
- package/dist/src/services/eventbridge/types.d.ts +6 -0
- package/dist/src/services/evidently/main.d.ts +2 -1
- package/dist/src/services/evidently/main.js +2 -1
- package/dist/src/services/evidently/types.d.ts +5 -0
- package/dist/src/services/identity-access-management/main.d.ts +2 -1
- package/dist/src/services/identity-access-management/main.js +2 -1
- package/dist/src/services/key-management-service/main.d.ts +2 -1
- package/dist/src/services/key-management-service/main.js +2 -1
- package/dist/src/services/key-management-service/types.d.ts +1 -0
- package/dist/src/services/lambda/main.d.ts +2 -1
- package/dist/src/services/lambda/main.js +2 -1
- package/dist/src/services/lambda/types.d.ts +7 -0
- package/dist/src/services/route53/main.d.ts +2 -1
- package/dist/src/services/route53/main.js +2 -1
- package/dist/src/services/route53/types.d.ts +1 -0
- package/dist/src/services/secrets-manager/main.d.ts +2 -1
- package/dist/src/services/secrets-manager/main.js +2 -1
- package/dist/src/services/secrets-manager/types.d.ts +1 -0
- package/dist/src/services/simple-notification-service/main.d.ts +2 -1
- package/dist/src/services/simple-notification-service/main.js +2 -1
- package/dist/src/services/simple-notification-service/types.d.ts +1 -0
- package/dist/src/services/simple-queue-service/main.d.ts +2 -1
- package/dist/src/services/simple-queue-service/main.js +2 -1
- package/dist/src/services/simple-queue-service/types.d.ts +1 -0
- package/dist/src/services/simple-storage-service/main.d.ts +2 -1
- package/dist/src/services/simple-storage-service/main.js +2 -1
- package/dist/src/services/simple-storage-service/types.d.ts +3 -0
- package/dist/src/services/step-function/main.d.ts +2 -1
- package/dist/src/services/step-function/main.js +2 -1
- package/dist/src/services/step-function/types.d.ts +16 -0
- package/dist/src/services/systems-manager/main.d.ts +4 -2
- package/dist/src/services/systems-manager/main.js +4 -2
- package/dist/src/services/systems-manager/types.d.ts +2 -0
- package/dist/src/services/virtual-private-cloud/ipv6.d.ts +1 -0
- package/dist/src/services/virtual-private-cloud/ipv6.js +1 -0
- package/dist/src/services/virtual-private-cloud/main.d.ts +2 -1
- package/dist/src/services/virtual-private-cloud/main.js +2 -1
- package/dist/src/services/virtual-private-cloud/types.d.ts +1 -0
- package/dist/src/services/web-application-firewall/main.d.ts +2 -1
- package/dist/src/services/web-application-firewall/main.js +2 -1
- package/dist/src/services/web-application-firewall/types.d.ts +2 -0
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/utils/index.d.ts +4 -0
- package/dist/src/utils/index.js +4 -0
- package/package.json +19 -7
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @gradientedge/cdk-utils-aws
|
|
2
|
+
|
|
3
|
+
AWS CDK utilities for provisioning and managing AWS infrastructure using the [AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/home.html).
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This package provides high-level constructs and service managers that simplify common AWS CDK patterns:
|
|
8
|
+
|
|
9
|
+
- **Constructs** — ready-to-use patterns like REST API with Lambda, EventBridge targets, static sites, and ECS backends
|
|
10
|
+
- **Services** — manager classes for AWS services including Lambda, API Gateway, CloudFront, DynamoDB, ECS, S3, SQS, SNS, and more
|
|
11
|
+
- **Common** — base constructs and stack classes that all higher-level constructs extend
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add @gradientedge/cdk-utils-aws
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { CommonConstruct } from '@gradientedge/cdk-utils-aws'
|
|
23
|
+
import { Construct } from 'constructs'
|
|
24
|
+
|
|
25
|
+
class MyStack extends CommonConstruct {
|
|
26
|
+
constructor(parent: Construct, id: string, props: CommonStackProps) {
|
|
27
|
+
super(parent, id, props)
|
|
28
|
+
this.initResources()
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
@@ -4,8 +4,7 @@ import { AcmManager, ApiManager, AppConfigManager, CloudFrontManager, CloudTrail
|
|
|
4
4
|
import { ResourceNameFormatter } from './resource-name-formatter.js';
|
|
5
5
|
import { CommonStackProps } from './types.js';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* @classdesc Common construct to use as a base for all higher level constructs.
|
|
7
|
+
* Common construct to use as a base for all higher level constructs.
|
|
9
8
|
* @example
|
|
10
9
|
* import { CommonConstruct } from '@gradientedge/cdk-utils';
|
|
11
10
|
*
|
|
@@ -15,6 +14,7 @@ import { CommonStackProps } from './types.js';
|
|
|
15
14
|
* this.props = props;
|
|
16
15
|
* };
|
|
17
16
|
* };
|
|
17
|
+
* @category Common
|
|
18
18
|
*/
|
|
19
19
|
export declare class CommonConstruct extends Construct {
|
|
20
20
|
props: CommonStackProps;
|
|
@@ -4,8 +4,7 @@ import { AcmManager, ApiManager, AppConfigManager, CloudFrontManager, CloudTrail
|
|
|
4
4
|
import { createCfnOutput } from '../utils/index.js';
|
|
5
5
|
import { ResourceNameFormatter } from './resource-name-formatter.js';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* @classdesc Common construct to use as a base for all higher level constructs.
|
|
7
|
+
* Common construct to use as a base for all higher level constructs.
|
|
9
8
|
* @example
|
|
10
9
|
* import { CommonConstruct } from '@gradientedge/cdk-utils';
|
|
11
10
|
*
|
|
@@ -15,6 +14,7 @@ import { ResourceNameFormatter } from './resource-name-formatter.js';
|
|
|
15
14
|
* this.props = props;
|
|
16
15
|
* };
|
|
17
16
|
* };
|
|
17
|
+
* @category Common
|
|
18
18
|
*/
|
|
19
19
|
export class CommonConstruct extends Construct {
|
|
20
20
|
props;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Construct } from 'constructs';
|
|
2
2
|
import { CommonStackProps, ResourceNameFormatterProps } from './types.js';
|
|
3
|
+
/** @category Common */
|
|
3
4
|
export declare class ResourceNameFormatter extends Construct {
|
|
4
5
|
props: CommonStackProps;
|
|
5
6
|
constructor(parent: Construct, id: string, props: CommonStackProps);
|
|
@@ -3,7 +3,7 @@ import { App, Stack, StackProps } from 'aws-cdk-lib';
|
|
|
3
3
|
import { CommonStackProps } from './types.js';
|
|
4
4
|
import { CommonConstruct } from './construct.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Common stack to use as a base for all higher level constructs.
|
|
7
7
|
* @example
|
|
8
8
|
* import { CommonStack } from '@gradientedge/cdk-utils'
|
|
9
9
|
*
|
|
@@ -13,6 +13,7 @@ import { CommonConstruct } from './construct.js';
|
|
|
13
13
|
* // provision resources
|
|
14
14
|
* }
|
|
15
15
|
* }
|
|
16
|
+
* @category Common
|
|
16
17
|
*/
|
|
17
18
|
export declare class CommonStack extends Stack {
|
|
18
19
|
static NODEJS_RUNTIME: Runtime;
|
package/dist/src/common/stack.js
CHANGED
|
@@ -7,7 +7,7 @@ import _ from 'lodash';
|
|
|
7
7
|
import { isDevStage } from '@gradientedge/cdk-utils-common';
|
|
8
8
|
import { CommonConstruct } from './construct.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Common stack to use as a base for all higher level constructs.
|
|
11
11
|
* @example
|
|
12
12
|
* import { CommonStack } from '@gradientedge/cdk-utils'
|
|
13
13
|
*
|
|
@@ -17,6 +17,7 @@ import { CommonConstruct } from './construct.js';
|
|
|
17
17
|
* // provision resources
|
|
18
18
|
* }
|
|
19
19
|
* }
|
|
20
|
+
* @category Common
|
|
20
21
|
*/
|
|
21
22
|
export class CommonStack extends Stack {
|
|
22
23
|
static NODEJS_RUNTIME = Runtime.NODEJS_24_X;
|
|
@@ -4,6 +4,7 @@ import { RetentionDays } from 'aws-cdk-lib/aws-logs';
|
|
|
4
4
|
import { BaseProps } from '@gradientedge/cdk-utils-common';
|
|
5
5
|
/**
|
|
6
6
|
*/
|
|
7
|
+
/** @category Interface */
|
|
7
8
|
export interface CommonStackProps extends BaseProps, StackProps {
|
|
8
9
|
region: string;
|
|
9
10
|
resourceProjectIdentifier?: string;
|
|
@@ -21,6 +22,7 @@ export interface CommonStackProps extends BaseProps, StackProps {
|
|
|
21
22
|
[key: string]: ResourceNameFormatterProps;
|
|
22
23
|
};
|
|
23
24
|
}
|
|
25
|
+
/** @category Interface */
|
|
24
26
|
export interface ResourceNameFormatterProps {
|
|
25
27
|
exclude?: boolean;
|
|
26
28
|
globalPrefix?: boolean;
|
|
@@ -4,7 +4,7 @@ import { Construct } from 'constructs';
|
|
|
4
4
|
import { CommonConstruct } from '../../common/index.js';
|
|
5
5
|
import { ApiToAnyTargetProps, ApiToAnyTargetRestApiResource, ApiToAnyTargetRestApiType } from './types.js';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Provides a construct to create and deploy a shallow API Gateway
|
|
8
8
|
* @example
|
|
9
9
|
* import { ApiToAnyTarget, ApiToAnyTargetProps } '@gradientedge/cdk-utils'
|
|
10
10
|
* import { Construct } from 'constructs'
|
|
@@ -17,6 +17,7 @@ import { ApiToAnyTargetProps, ApiToAnyTargetRestApiResource, ApiToAnyTargetRestA
|
|
|
17
17
|
* this.initResources()
|
|
18
18
|
* }
|
|
19
19
|
* }
|
|
20
|
+
* @category Construct
|
|
20
21
|
*/
|
|
21
22
|
export declare class ApiToAnyTarget extends CommonConstruct {
|
|
22
23
|
props: ApiToAnyTargetProps;
|
|
@@ -3,7 +3,7 @@ import { AccessLogFormat, BasePathMapping, Cors, EndpointType, LogGroupLogDestin
|
|
|
3
3
|
import { CommonConstruct } from '../../common/index.js';
|
|
4
4
|
import { ApiToAnyTargetRestApi } from './target.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Provides a construct to create and deploy a shallow API Gateway
|
|
7
7
|
* @example
|
|
8
8
|
* import { ApiToAnyTarget, ApiToAnyTargetProps } '@gradientedge/cdk-utils'
|
|
9
9
|
* import { Construct } from 'constructs'
|
|
@@ -16,6 +16,7 @@ import { ApiToAnyTargetRestApi } from './target.js';
|
|
|
16
16
|
* this.initResources()
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
|
+
* @category Construct
|
|
19
20
|
*/
|
|
20
21
|
export class ApiToAnyTarget extends CommonConstruct {
|
|
21
22
|
props;
|
|
@@ -3,6 +3,7 @@ import { ICertificate } from 'aws-cdk-lib/aws-certificatemanager';
|
|
|
3
3
|
import { LogGroup } from 'aws-cdk-lib/aws-logs';
|
|
4
4
|
import { IHostedZone } from 'aws-cdk-lib/aws-route53';
|
|
5
5
|
import { ApiToAnyTargetRestApiType } from './types.js';
|
|
6
|
+
/** @category Construct */
|
|
6
7
|
export declare class ApiToAnyTargetRestApi implements ApiToAnyTargetRestApiType {
|
|
7
8
|
accessLogGroup: LogGroup;
|
|
8
9
|
api: IRestApi;
|
|
@@ -4,6 +4,7 @@ import { LogGroup } from 'aws-cdk-lib/aws-logs';
|
|
|
4
4
|
import { IHostedZone } from 'aws-cdk-lib/aws-route53';
|
|
5
5
|
import { CommonStackProps } from '../../common/index.js';
|
|
6
6
|
import { AcmProps, RestApigProps } from '../../services/index.js';
|
|
7
|
+
/** @category Interface */
|
|
7
8
|
export interface ApiToAnyTargetRestApiType {
|
|
8
9
|
accessLogGroup: LogGroup;
|
|
9
10
|
api: IRestApi;
|
|
@@ -22,6 +23,7 @@ export interface ApiToAnyTargetRestApiType {
|
|
|
22
23
|
[path: string]: Resource;
|
|
23
24
|
};
|
|
24
25
|
}
|
|
26
|
+
/** @category Interface */
|
|
25
27
|
export interface ApiToAnyTargetRestApiResource {
|
|
26
28
|
addProxy: boolean;
|
|
27
29
|
authorizer?: IAuthorizer;
|
|
@@ -39,6 +41,7 @@ export interface ApiToAnyTargetRestApiResource {
|
|
|
39
41
|
mockIntegration?: MockIntegration;
|
|
40
42
|
mockMethodResponses?: MethodResponse[];
|
|
41
43
|
}
|
|
44
|
+
/** @category Interface */
|
|
42
45
|
export interface ApiToAnyTargetRestApiProps {
|
|
43
46
|
certificate: AcmProps;
|
|
44
47
|
importedRestApiRef?: string;
|
|
@@ -49,6 +52,7 @@ export interface ApiToAnyTargetRestApiProps {
|
|
|
49
52
|
useExisting: boolean;
|
|
50
53
|
withResource?: boolean;
|
|
51
54
|
}
|
|
55
|
+
/** @category Interface */
|
|
52
56
|
export interface ApiToAnyTargetProps extends CommonStackProps {
|
|
53
57
|
api: ApiToAnyTargetRestApiProps;
|
|
54
58
|
apiRootPaths?: string[];
|
|
@@ -6,7 +6,8 @@ import { IHostedZone } from 'aws-cdk-lib/aws-route53';
|
|
|
6
6
|
import { Topic } from 'aws-cdk-lib/aws-sns';
|
|
7
7
|
import { ApiToEventBridgeTargetRestApiType } from './types.js';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Provides a construct to contain api resources for ApiToEventBridgeTargetWithSns
|
|
10
|
+
* @category Construct
|
|
10
11
|
*/
|
|
11
12
|
export declare class ApiToEventbridgeTargetRestApi implements ApiToEventBridgeTargetRestApiType {
|
|
12
13
|
accessLogGroup: LogGroup;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Provides a construct to contain api resources for ApiToEventBridgeTargetWithSns
|
|
3
|
+
* @category Construct
|
|
3
4
|
*/
|
|
4
5
|
export class ApiToEventbridgeTargetRestApi {
|
|
5
6
|
accessLogGroup;
|
|
@@ -2,7 +2,8 @@ import { IEventBus, Rule } from 'aws-cdk-lib/aws-events';
|
|
|
2
2
|
import { LogGroup } from 'aws-cdk-lib/aws-logs';
|
|
3
3
|
import { ApiToEventBridgeTargetEventType } from './types.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides a construct to contain event resources for ApiToEventBridgeTargetWithSns
|
|
6
|
+
* @category Construct
|
|
6
7
|
*/
|
|
7
8
|
export declare class ApiToEventbridgeTargetEvent implements ApiToEventBridgeTargetEventType {
|
|
8
9
|
eventBus: IEventBus;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Provides a construct to contain event resources for ApiToEventBridgeTargetWithSns
|
|
3
|
+
* @category Construct
|
|
3
4
|
*/
|
|
4
5
|
export class ApiToEventbridgeTargetEvent {
|
|
5
6
|
eventBus;
|
|
@@ -3,9 +3,9 @@ import { Construct } from 'constructs';
|
|
|
3
3
|
import { CommonConstruct } from '../../common/index.js';
|
|
4
4
|
import { ApiToEventBridgeTargetEventType, ApiToEventBridgeTargetProps, ApiToEventBridgeTargetRestApiType } from './types.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Provides a construct to create and deploy API Gateway invocations to EventBridge
|
|
7
7
|
*
|
|
8
|
-
* <b>Architecture</b><br/> 
|
|
9
9
|
* @example
|
|
10
10
|
* import { ApiToEventBridgeTarget, ApiToEventBridgeTargetProps } '@gradientedge/cdk-utils'
|
|
11
11
|
* import { Construct } from 'constructs'
|
|
@@ -18,6 +18,7 @@ import { ApiToEventBridgeTargetEventType, ApiToEventBridgeTargetProps, ApiToEven
|
|
|
18
18
|
* this.initResources()
|
|
19
19
|
* }
|
|
20
20
|
* }
|
|
21
|
+
* @category Construct
|
|
21
22
|
*/
|
|
22
23
|
export declare class ApiToEventBridgeTarget extends CommonConstruct {
|
|
23
24
|
props: ApiToEventBridgeTargetProps;
|
|
@@ -7,9 +7,9 @@ import { CommonConstruct } from '../../common/index.js';
|
|
|
7
7
|
import { ApiToEventbridgeTargetRestApi } from './api.js';
|
|
8
8
|
import { ApiToEventbridgeTargetEvent } from './event.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Provides a construct to create and deploy API Gateway invocations to EventBridge
|
|
11
11
|
*
|
|
12
|
-
* <b>Architecture</b><br/> 
|
|
13
13
|
* @example
|
|
14
14
|
* import { ApiToEventBridgeTarget, ApiToEventBridgeTargetProps } '@gradientedge/cdk-utils'
|
|
15
15
|
* import { Construct } from 'constructs'
|
|
@@ -22,6 +22,7 @@ import { ApiToEventbridgeTargetEvent } from './event.js';
|
|
|
22
22
|
* this.initResources()
|
|
23
23
|
* }
|
|
24
24
|
* }
|
|
25
|
+
* @category Construct
|
|
25
26
|
*/
|
|
26
27
|
export class ApiToEventBridgeTarget extends CommonConstruct {
|
|
27
28
|
props;
|
|
@@ -10,6 +10,7 @@ import { CommonStackProps } from '../../common/index.js';
|
|
|
10
10
|
import { AcmProps, EventRuleProps, LambdaProps, LogProps, RestApigProps } from '../../services/index.js';
|
|
11
11
|
/**
|
|
12
12
|
*/
|
|
13
|
+
/** @category Interface */
|
|
13
14
|
export interface ApiToEventBridgeTargetEventType {
|
|
14
15
|
eventBus: IEventBus;
|
|
15
16
|
logGroup: LogGroup;
|
|
@@ -21,6 +22,7 @@ export interface ApiToEventBridgeTargetEventType {
|
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
*/
|
|
25
|
+
/** @category Interface */
|
|
24
26
|
export interface ApiToEventBridgeTargetRestApiType {
|
|
25
27
|
accessLogGroup: LogGroup;
|
|
26
28
|
api: IRestApi;
|
|
@@ -49,6 +51,7 @@ export interface ApiToEventBridgeTargetRestApiType {
|
|
|
49
51
|
}
|
|
50
52
|
/**
|
|
51
53
|
*/
|
|
54
|
+
/** @category Interface */
|
|
52
55
|
export interface ApiToEventBridgeTargetRestApiProps {
|
|
53
56
|
certificate: AcmProps;
|
|
54
57
|
errorResponseModel?: ModelOptions;
|
|
@@ -67,7 +70,8 @@ export interface ApiToEventBridgeTargetRestApiProps {
|
|
|
67
70
|
}
|
|
68
71
|
/**
|
|
69
72
|
*/
|
|
70
|
-
|
|
73
|
+
/** @category Interface */
|
|
74
|
+
export interface ApiToEventBridgeTargetLambdaProps {
|
|
71
75
|
function: LambdaProps;
|
|
72
76
|
handler?: string;
|
|
73
77
|
layerSource?: AssetCode;
|
|
@@ -75,7 +79,8 @@ interface ApiToEventBridgeTargetLambdaProps {
|
|
|
75
79
|
}
|
|
76
80
|
/**
|
|
77
81
|
*/
|
|
78
|
-
|
|
82
|
+
/** @category Interface */
|
|
83
|
+
export interface ApiToEventBridgeTargetEventProps {
|
|
79
84
|
eventBusName?: string;
|
|
80
85
|
logGroup?: LogProps;
|
|
81
86
|
logGroupFailure?: LogProps;
|
|
@@ -86,6 +91,7 @@ interface ApiToEventBridgeTargetEventProps {
|
|
|
86
91
|
}
|
|
87
92
|
/**
|
|
88
93
|
*/
|
|
94
|
+
/** @category Interface */
|
|
89
95
|
export interface ApiToEventBridgeTargetProps extends CommonStackProps {
|
|
90
96
|
api: ApiToEventBridgeTargetRestApiProps;
|
|
91
97
|
apiRootPaths?: string[];
|
|
@@ -97,4 +103,3 @@ export interface ApiToEventBridgeTargetProps extends CommonStackProps {
|
|
|
97
103
|
timezone: string;
|
|
98
104
|
useExistingHostedZone: boolean;
|
|
99
105
|
}
|
|
100
|
-
export {};
|
|
@@ -3,7 +3,8 @@ import { IFunction, LayerVersion } from 'aws-cdk-lib/aws-lambda';
|
|
|
3
3
|
import { EventBridgeDestination } from 'aws-cdk-lib/aws-lambda-destinations';
|
|
4
4
|
import { ApiDestinedLambdaEnvironment, ApiDestinedLambdaType } from './types.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Provides a construct to contain lambda resources for ApiToEventBridgeTargetWithSns
|
|
7
|
+
* @category Construct
|
|
7
8
|
*/
|
|
8
9
|
export declare class ApiDestinedLambda implements ApiDestinedLambdaType {
|
|
9
10
|
destinationFailure: EventBridgeDestination;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Provides a construct to contain lambda resources for ApiToEventBridgeTargetWithSns
|
|
3
|
+
* @category Construct
|
|
3
4
|
*/
|
|
4
5
|
export class ApiDestinedLambda {
|
|
5
6
|
destinationFailure;
|
|
@@ -5,9 +5,9 @@ import { ApiToEventBridgeTargetEventType, ApiToEventBridgeTargetProps, ApiToEven
|
|
|
5
5
|
import { ApiDestinedLambdaType } from './types.js';
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated Use ApiToEventBridgeTarget instead. This will be removed in a future release.
|
|
8
|
-
*
|
|
8
|
+
* Provides a construct to create and deploy API Gateway invocations to EventBridge
|
|
9
9
|
*
|
|
10
|
-
* <b>Architecture</b><br/> 
|
|
11
11
|
* @example
|
|
12
12
|
* import { ApiToEventBridgeTargetWithSns, ApiToEventBridgeTargetProps } '@gradientedge/cdk-utils'
|
|
13
13
|
* import { Construct } from 'constructs'
|
|
@@ -20,6 +20,7 @@ import { ApiDestinedLambdaType } from './types.js';
|
|
|
20
20
|
* this.initResources()
|
|
21
21
|
* }
|
|
22
22
|
* }
|
|
23
|
+
* @category Construct
|
|
23
24
|
*/
|
|
24
25
|
export declare class ApiToEventBridgeTargetWithSns extends CommonConstruct {
|
|
25
26
|
props: ApiToEventBridgeTargetProps;
|
|
@@ -9,9 +9,9 @@ import { ApiToEventbridgeTargetEvent, ApiToEventbridgeTargetRestApi, } from '../
|
|
|
9
9
|
import { ApiDestinedLambda } from './api-destined-lambda.js';
|
|
10
10
|
/**
|
|
11
11
|
* @deprecated Use ApiToEventBridgeTarget instead. This will be removed in a future release.
|
|
12
|
-
*
|
|
12
|
+
* Provides a construct to create and deploy API Gateway invocations to EventBridge
|
|
13
13
|
*
|
|
14
|
-
* <b>Architecture</b><br/> 
|
|
15
15
|
* @example
|
|
16
16
|
* import { ApiToEventBridgeTargetWithSns, ApiToEventBridgeTargetProps } '@gradientedge/cdk-utils'
|
|
17
17
|
* import { Construct } from 'constructs'
|
|
@@ -24,6 +24,7 @@ import { ApiDestinedLambda } from './api-destined-lambda.js';
|
|
|
24
24
|
* this.initResources()
|
|
25
25
|
* }
|
|
26
26
|
* }
|
|
27
|
+
* @category Construct
|
|
27
28
|
*/
|
|
28
29
|
export class ApiToEventBridgeTargetWithSns extends CommonConstruct {
|
|
29
30
|
props;
|
|
@@ -4,11 +4,13 @@ import { PolicyDocument, Role } from 'aws-cdk-lib/aws-iam';
|
|
|
4
4
|
import { LambdaEnvironment } from '../../services/index.js';
|
|
5
5
|
/**
|
|
6
6
|
*/
|
|
7
|
+
/** @category Interface */
|
|
7
8
|
export interface ApiDestinedLambdaEnvironment extends LambdaEnvironment {
|
|
8
9
|
SOURCE_ID: string;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
12
|
*/
|
|
13
|
+
/** @category Interface */
|
|
12
14
|
export interface ApiDestinedLambdaType {
|
|
13
15
|
destinationFailure: EventBridgeDestination;
|
|
14
16
|
destinationSuccess: EventBridgeDestination;
|
|
@@ -6,7 +6,8 @@ import { IHostedZone } from 'aws-cdk-lib/aws-route53';
|
|
|
6
6
|
import { Topic } from 'aws-cdk-lib/aws-sns';
|
|
7
7
|
import { ApiToLambdaTargetRestApiType } from './types.js';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Provides a construct to contain api resources for ApiToLambdaTarget
|
|
10
|
+
* @category Construct
|
|
10
11
|
*/
|
|
11
12
|
export declare class ApiToLambdaTargetRestApi implements ApiToLambdaTargetRestApiType {
|
|
12
13
|
api: RestApi;
|
|
@@ -3,6 +3,7 @@ import { Construct } from 'constructs';
|
|
|
3
3
|
import { CommonConstruct } from '../../common/index.js';
|
|
4
4
|
import { ApiToLambdaTargetProps, ApiToLambdaTargetRestApiType } from './types.js';
|
|
5
5
|
/**
|
|
6
|
+
* @category Construct
|
|
6
7
|
*/
|
|
7
8
|
export declare class ApiToLambdaTarget extends CommonConstruct {
|
|
8
9
|
props: ApiToLambdaTargetProps;
|
|
@@ -5,6 +5,7 @@ import { Function } from 'aws-cdk-lib/aws-lambda';
|
|
|
5
5
|
import { CommonConstruct } from '../../common/index.js';
|
|
6
6
|
import { ApiToLambdaTargetRestApi } from './api.js';
|
|
7
7
|
/**
|
|
8
|
+
* @category Construct
|
|
8
9
|
*/
|
|
9
10
|
export class ApiToLambdaTarget extends CommonConstruct {
|
|
10
11
|
props;
|
|
@@ -8,6 +8,7 @@ import { AcmProps, LambdaRestApiProps } from '../../services/index.js';
|
|
|
8
8
|
import { CommonStackProps } from '../../common/index.js';
|
|
9
9
|
/**
|
|
10
10
|
*/
|
|
11
|
+
/** @category Interface */
|
|
11
12
|
export interface ApiToLambdaTargetRestApiType {
|
|
12
13
|
api: IRestApi;
|
|
13
14
|
authoriser?: IAuthorizer;
|
|
@@ -37,6 +38,7 @@ export interface ApiToLambdaTargetRestApiType {
|
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
40
|
*/
|
|
41
|
+
/** @category Interface */
|
|
40
42
|
export interface ApiToLambdaTargetRestApiProps {
|
|
41
43
|
certificate: AcmProps;
|
|
42
44
|
importedRestApiRef?: string;
|
|
@@ -50,6 +52,7 @@ export interface ApiToLambdaTargetRestApiProps {
|
|
|
50
52
|
}
|
|
51
53
|
/**
|
|
52
54
|
*/
|
|
55
|
+
/** @category Interface */
|
|
53
56
|
export interface ApiToLambdaTargetProps extends CommonStackProps {
|
|
54
57
|
api: ApiToLambdaTargetRestApiProps;
|
|
55
58
|
apiRootPaths?: string[];
|
|
@@ -2,6 +2,7 @@ import { CfnApplication, CfnConfigurationProfile, CfnEnvironment, CfnHostedConfi
|
|
|
2
2
|
import { Construct } from 'constructs';
|
|
3
3
|
import { CommonConstruct } from '../../common/index.js';
|
|
4
4
|
import { ApplicationConfigurationProps } from './types.js';
|
|
5
|
+
/** @category Construct */
|
|
5
6
|
export declare class ApplicationConfiguration extends CommonConstruct {
|
|
6
7
|
props: ApplicationConfigurationProps;
|
|
7
8
|
id: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Duration, Fn } from 'aws-cdk-lib';
|
|
2
2
|
import { CfnDeployment, CfnHostedConfigurationVersion, DeploymentStrategy, RolloutStrategy, } from 'aws-cdk-lib/aws-appconfig';
|
|
3
3
|
import { CommonConstruct } from '../../common/index.js';
|
|
4
|
+
/** @category Construct */
|
|
4
5
|
export class ApplicationConfiguration extends CommonConstruct {
|
|
5
6
|
id;
|
|
6
7
|
appConfigApplication;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CommonStackProps } from '../../common/index.js';
|
|
2
2
|
import { AppConfigProps } from '../../services/index.js';
|
|
3
|
+
/** @category Interface */
|
|
3
4
|
export interface ApplicationConfigurationProps extends CommonStackProps {
|
|
4
5
|
appConfig: AppConfigProps;
|
|
5
6
|
appConfigContent: any;
|
|
@@ -6,6 +6,7 @@ import { LogGroup } from 'aws-cdk-lib/aws-logs';
|
|
|
6
6
|
import { Queue } from 'aws-cdk-lib/aws-sqs';
|
|
7
7
|
import { Chain, Map, StateMachine } from 'aws-cdk-lib/aws-stepfunctions';
|
|
8
8
|
import { EventHandlerType } from './types.js';
|
|
9
|
+
/** @category Construct */
|
|
9
10
|
export declare class Handler implements EventHandlerType {
|
|
10
11
|
archive: Archive;
|
|
11
12
|
ecsTargets: EcsTask[];
|
|
@@ -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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
}
|