@gradientedge/cdk-utils 8.118.0 → 8.119.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/app/api-destined-function/package.json +1 -1
- package/dist/src/lib/common/construct.d.ts +32 -32
- package/dist/src/lib/common/construct.js +36 -59
- package/dist/src/lib/common/stack.d.ts +8 -7
- package/dist/src/lib/common/stack.js +17 -37
- package/dist/src/lib/common/types.d.ts +2 -2
- package/dist/src/lib/construct/api-to-eventbridge-target/api.d.ts +22 -22
- package/dist/src/lib/construct/api-to-eventbridge-target/event.d.ts +9 -9
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +3 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +37 -60
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +9 -9
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +3 -3
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +40 -63
- package/dist/src/lib/construct/api-to-lambda-target/api.d.ts +23 -23
- package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +2 -2
- package/dist/src/lib/construct/api-to-lambda-target/main.js +15 -38
- package/dist/src/lib/construct/application-configuration/main.d.ts +7 -7
- package/dist/src/lib/construct/application-configuration/main.js +17 -41
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +17 -17
- package/dist/src/lib/construct/graphql-api-lambda/main.js +6 -29
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +5 -5
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +7 -7
- package/dist/src/lib/construct/lambda-with-iam-access/main.d.ts +16 -16
- package/dist/src/lib/construct/lambda-with-iam-access/main.js +8 -31
- package/dist/src/lib/construct/lambda-with-iam-access/types.d.ts +4 -4
- package/dist/src/lib/construct/rest-api-lambda/main.d.ts +16 -16
- package/dist/src/lib/construct/rest-api-lambda/main.js +5 -28
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +5 -5
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.js +9 -32
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +38 -39
- package/dist/src/lib/construct/site-with-ecs-backend/main.js +33 -54
- package/dist/src/lib/construct/static-asset-deployment/main.d.ts +4 -4
- package/dist/src/lib/construct/static-asset-deployment/main.js +3 -26
- package/dist/src/lib/construct/static-site/main.d.ts +15 -15
- package/dist/src/lib/construct/static-site/main.js +4 -27
- package/dist/src/lib/services/aws/api-gateway/main.d.ts +10 -10
- package/dist/src/lib/services/aws/api-gateway/main.js +21 -44
- package/dist/src/lib/services/aws/api-gateway/types.d.ts +2 -2
- package/dist/src/lib/services/aws/appconfig/main.d.ts +7 -7
- package/dist/src/lib/services/aws/appconfig/main.js +14 -37
- package/dist/src/lib/services/aws/certificate-manager/main.d.ts +5 -5
- package/dist/src/lib/services/aws/certificate-manager/main.js +10 -33
- package/dist/src/lib/services/aws/certificate-manager/types.d.ts +2 -2
- package/dist/src/lib/services/aws/cloudfront/main.d.ts +18 -18
- package/dist/src/lib/services/aws/cloudfront/main.js +46 -45
- package/dist/src/lib/services/aws/cloudfront/types.d.ts +2 -3
- package/dist/src/lib/services/aws/cloudtrail/main.d.ts +5 -5
- package/dist/src/lib/services/aws/cloudtrail/main.js +5 -28
- package/dist/src/lib/services/aws/codebuild/main.d.ts +3 -3
- package/dist/src/lib/services/aws/codebuild/main.js +7 -30
- package/dist/src/lib/services/aws/dynamodb/main.d.ts +3 -3
- package/dist/src/lib/services/aws/dynamodb/main.js +8 -31
- package/dist/src/lib/services/aws/elastic-container-registry/main.d.ts +2 -2
- package/dist/src/lib/services/aws/elastic-container-registry/main.js +4 -27
- package/dist/src/lib/services/aws/elastic-container-service/main.d.ts +10 -10
- package/dist/src/lib/services/aws/elastic-container-service/main.js +27 -50
- package/dist/src/lib/services/aws/elastic-container-service/types.d.ts +4 -4
- package/dist/src/lib/services/aws/elastic-file-system/main.d.ts +3 -3
- package/dist/src/lib/services/aws/elastic-file-system/main.js +12 -35
- package/dist/src/lib/services/aws/elastic-kubernetes-service/main.d.ts +4 -4
- package/dist/src/lib/services/aws/elastic-kubernetes-service/main.js +8 -31
- package/dist/src/lib/services/aws/elasticache/main.d.ts +4 -4
- package/dist/src/lib/services/aws/elasticache/main.js +10 -33
- package/dist/src/lib/services/aws/eventbridge/main.d.ts +13 -13
- package/dist/src/lib/services/aws/eventbridge/main.js +26 -49
- package/dist/src/lib/services/aws/eventbridge/target.d.ts +10 -10
- package/dist/src/lib/services/aws/eventbridge/target.js +6 -29
- package/dist/src/lib/services/aws/evidently/main.d.ts +7 -7
- package/dist/src/lib/services/aws/evidently/main.js +18 -41
- package/dist/src/lib/services/aws/identity-access-management/main.d.ts +48 -49
- package/dist/src/lib/services/aws/identity-access-management/main.js +110 -133
- package/dist/src/lib/services/aws/key-management-service/main.d.ts +2 -2
- package/dist/src/lib/services/aws/key-management-service/main.js +5 -28
- package/dist/src/lib/services/aws/lambda/main.d.ts +11 -13
- package/dist/src/lib/services/aws/lambda/main.js +31 -58
- package/dist/src/lib/services/aws/route53/main.d.ts +9 -9
- package/dist/src/lib/services/aws/route53/main.js +21 -44
- package/dist/src/lib/services/aws/secrets-manager/main.d.ts +5 -6
- package/dist/src/lib/services/aws/secrets-manager/main.js +10 -33
- package/dist/src/lib/services/aws/simple-notification-service/main.d.ts +4 -4
- package/dist/src/lib/services/aws/simple-notification-service/main.js +11 -34
- package/dist/src/lib/services/aws/simple-queue-service/main.d.ts +6 -7
- package/dist/src/lib/services/aws/simple-queue-service/main.js +15 -38
- package/dist/src/lib/services/aws/simple-storage-service/main.d.ts +10 -11
- package/dist/src/lib/services/aws/simple-storage-service/main.js +31 -54
- package/dist/src/lib/services/aws/step-function/main.d.ts +31 -32
- package/dist/src/lib/services/aws/step-function/main.js +33 -57
- package/dist/src/lib/services/aws/systems-manager/main.d.ts +4 -4
- package/dist/src/lib/services/aws/systems-manager/main.js +10 -33
- package/dist/src/lib/services/aws/virtual-private-cloud/main.d.ts +5 -6
- package/dist/src/lib/services/aws/virtual-private-cloud/main.js +14 -37
- package/dist/src/lib/services/aws/web-application-firewall/main.d.ts +3 -3
- package/dist/src/lib/services/aws/web-application-firewall/main.js +8 -31
- package/dist/src/lib/utils/aws/index.d.ts +6 -3
- package/dist/src/lib/utils/aws/index.js +9 -26
- package/package.json +15 -15
- package/src/lib/common/construct.ts +97 -67
- package/src/lib/common/stack.ts +12 -12
- package/src/lib/common/types.ts +2 -2
- package/src/lib/construct/api-to-eventbridge-target/api.ts +31 -22
- package/src/lib/construct/api-to-eventbridge-target/event.ts +9 -9
- package/src/lib/construct/api-to-eventbridge-target/main.ts +56 -41
- package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +9 -9
- package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +62 -47
- package/src/lib/construct/api-to-lambda-target/api.ts +33 -23
- package/src/lib/construct/api-to-lambda-target/main.ts +24 -18
- package/src/lib/construct/application-configuration/main.ts +31 -24
- package/src/lib/construct/graphql-api-lambda/main.ts +22 -22
- package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +13 -13
- package/src/lib/construct/lambda-with-iam-access/main.ts +25 -25
- package/src/lib/construct/lambda-with-iam-access/types.ts +4 -4
- package/src/lib/construct/rest-api-lambda/main.ts +21 -21
- package/src/lib/construct/rest-api-lambda-with-cache/main.ts +14 -14
- package/src/lib/construct/site-with-ecs-backend/main.ts +79 -60
- package/src/lib/construct/static-asset-deployment/main.ts +6 -6
- package/src/lib/construct/static-site/main.ts +23 -17
- package/src/lib/services/aws/api-gateway/main.ts +42 -36
- package/src/lib/services/aws/api-gateway/types.ts +2 -2
- package/src/lib/services/aws/appconfig/main.ts +19 -19
- package/src/lib/services/aws/certificate-manager/main.ts +14 -14
- package/src/lib/services/aws/certificate-manager/types.ts +2 -2
- package/src/lib/services/aws/cloudfront/main.ts +88 -74
- package/src/lib/services/aws/cloudfront/types.ts +6 -3
- package/src/lib/services/aws/cloudtrail/main.ts +11 -11
- package/src/lib/services/aws/codebuild/main.ts +7 -7
- package/src/lib/services/aws/dynamodb/main.ts +8 -8
- package/src/lib/services/aws/elastic-container-registry/main.ts +4 -4
- package/src/lib/services/aws/elastic-container-service/main.ts +48 -37
- package/src/lib/services/aws/elastic-container-service/types.ts +4 -4
- package/src/lib/services/aws/elastic-file-system/main.ts +16 -16
- package/src/lib/services/aws/elastic-kubernetes-service/main.ts +11 -11
- package/src/lib/services/aws/elasticache/main.ts +10 -10
- package/src/lib/services/aws/eventbridge/main.ts +37 -37
- package/src/lib/services/aws/eventbridge/target.ts +14 -14
- package/src/lib/services/aws/evidently/main.ts +18 -18
- package/src/lib/services/aws/identity-access-management/main.ts +142 -134
- package/src/lib/services/aws/key-management-service/main.ts +5 -5
- package/src/lib/services/aws/lambda/main.ts +65 -59
- package/src/lib/services/aws/route53/main.ts +31 -31
- package/src/lib/services/aws/secrets-manager/main.ts +11 -15
- package/src/lib/services/aws/simple-notification-service/main.ts +13 -13
- package/src/lib/services/aws/simple-queue-service/main.ts +18 -18
- package/src/lib/services/aws/simple-storage-service/main.ts +40 -40
- package/src/lib/services/aws/step-function/main.ts +77 -65
- package/src/lib/services/aws/systems-manager/main.ts +17 -12
- package/src/lib/services/aws/virtual-private-cloud/main.ts +16 -16
- package/src/lib/services/aws/web-application-firewall/main.ts +8 -8
- package/src/lib/utils/aws/index.ts +8 -5
|
@@ -1,32 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.SnsManager = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
4
|
+
const aws_sns_1 = require("aws-cdk-lib/aws-sns");
|
|
5
|
+
const aws_sns_subscriptions_1 = require("aws-cdk-lib/aws-sns-subscriptions");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
30
7
|
/**
|
|
31
8
|
* @classdesc Provides operations on AWS Simple Notification Service.
|
|
32
9
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -54,16 +31,16 @@ class SnsManager {
|
|
|
54
31
|
createEmailNotificationService(id, scope, props, emails) {
|
|
55
32
|
if (!props)
|
|
56
33
|
throw `Subscription props undefined for ${id}`;
|
|
57
|
-
const topic = new
|
|
34
|
+
const topic = new aws_sns_1.Topic(scope, id, {
|
|
58
35
|
displayName: `${props.topicName}-${scope.props.stage}`,
|
|
59
36
|
fifo: props.fifo,
|
|
60
37
|
topicName: `${props.topicName}-${scope.props.stage}`,
|
|
61
38
|
});
|
|
62
39
|
if (emails && emails.length > 0) {
|
|
63
|
-
emails.forEach((email) => topic.addSubscription(new
|
|
40
|
+
emails.forEach((email) => topic.addSubscription(new aws_sns_subscriptions_1.EmailSubscription(email)));
|
|
64
41
|
}
|
|
65
|
-
|
|
66
|
-
|
|
42
|
+
(0, utils_1.createCfnOutput)(`${id}-subscriptionArn`, scope, topic.topicArn);
|
|
43
|
+
(0, utils_1.createCfnOutput)(`${id}-subscriptionName`, scope, topic.topicName);
|
|
67
44
|
return topic;
|
|
68
45
|
}
|
|
69
46
|
/**
|
|
@@ -76,14 +53,14 @@ class SnsManager {
|
|
|
76
53
|
createLambdaNotificationService(id, scope, props, lambdaFunction) {
|
|
77
54
|
if (!props)
|
|
78
55
|
throw `Subscription props undefined for ${id}`;
|
|
79
|
-
const topic = new
|
|
56
|
+
const topic = new aws_sns_1.Topic(scope, id, {
|
|
80
57
|
displayName: `${props.topicName}-${scope.props.stage}`,
|
|
81
58
|
fifo: props.fifo,
|
|
82
59
|
topicName: `${props.topicName}-${scope.props.stage}`,
|
|
83
60
|
});
|
|
84
|
-
topic.addSubscription(new
|
|
85
|
-
|
|
86
|
-
|
|
61
|
+
topic.addSubscription(new aws_sns_subscriptions_1.LambdaSubscription(lambdaFunction));
|
|
62
|
+
(0, utils_1.createCfnOutput)(`${id}-subscriptionArn`, scope, topic.topicArn);
|
|
63
|
+
(0, utils_1.createCfnOutput)(`${id}-subscriptionName`, scope, topic.topicName);
|
|
87
64
|
return topic;
|
|
88
65
|
}
|
|
89
66
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as sqs from 'aws-cdk-lib/aws-sqs';
|
|
1
|
+
import { IQueue, Queue } from 'aws-cdk-lib/aws-sqs';
|
|
3
2
|
import { CommonConstruct } from '../../../common';
|
|
4
|
-
import { QueueProps } from './types';
|
|
5
3
|
import { LambdaProps } from '../lambda';
|
|
4
|
+
import { QueueProps } from './types';
|
|
6
5
|
/**
|
|
7
6
|
* @classdesc Provides operations on AWS Simple Queue Service.
|
|
8
7
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -11,7 +10,7 @@ import { LambdaProps } from '../lambda';
|
|
|
11
10
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
12
11
|
*
|
|
13
12
|
* class CustomConstruct extends CommonConstruct {
|
|
14
|
-
* constructor(parent:
|
|
13
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
15
14
|
* super(parent, id, props)
|
|
16
15
|
* this.props = props
|
|
17
16
|
* this.sqsManager.createQueue('MySqs', this, {...})
|
|
@@ -27,14 +26,14 @@ export declare class SqsManager {
|
|
|
27
26
|
* @param props
|
|
28
27
|
* @param deadLetterQueue
|
|
29
28
|
*/
|
|
30
|
-
createQueue(id: string, scope: CommonConstruct, props: QueueProps, deadLetterQueue?:
|
|
29
|
+
createQueue(id: string, scope: CommonConstruct, props: QueueProps, deadLetterQueue?: IQueue): Queue;
|
|
31
30
|
/**
|
|
32
31
|
* @summary Method to create a redrive queue for a lambda function
|
|
33
32
|
* @param id scoped id of the resource
|
|
34
33
|
* @param scope scope in which this resource is defined
|
|
35
34
|
* @param props the lambda properties
|
|
36
35
|
*/
|
|
37
|
-
createRedriveQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps):
|
|
36
|
+
createRedriveQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps): Queue;
|
|
38
37
|
/**
|
|
39
38
|
* @summary Method to create a dead letter queue for a lambda function
|
|
40
39
|
* @param id scoped id of the resource
|
|
@@ -42,5 +41,5 @@ export declare class SqsManager {
|
|
|
42
41
|
* @param props the lambda properties
|
|
43
42
|
* @param deadLetterQueue
|
|
44
43
|
*/
|
|
45
|
-
createDeadLetterQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps, deadLetterQueue:
|
|
44
|
+
createDeadLetterQueueForLambda(id: string, scope: CommonConstruct, props: LambdaProps, deadLetterQueue: IQueue): Queue;
|
|
46
45
|
}
|
|
@@ -1,32 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.SqsManager = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
4
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
5
|
+
const aws_sqs_1 = require("aws-cdk-lib/aws-sqs");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
30
7
|
/**
|
|
31
8
|
* @classdesc Provides operations on AWS Simple Queue Service.
|
|
32
9
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -35,7 +12,7 @@ const utils = __importStar(require("../../../utils"));
|
|
|
35
12
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
36
13
|
*
|
|
37
14
|
* class CustomConstruct extends CommonConstruct {
|
|
38
|
-
* constructor(parent:
|
|
15
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
39
16
|
* super(parent, id, props)
|
|
40
17
|
* this.props = props
|
|
41
18
|
* this.sqsManager.createQueue('MySqs', this, {...})
|
|
@@ -54,9 +31,9 @@ class SqsManager {
|
|
|
54
31
|
createQueue(id, scope, props, deadLetterQueue) {
|
|
55
32
|
if (!props)
|
|
56
33
|
throw `Queue props undefined for ${id}`;
|
|
57
|
-
const queue = new
|
|
34
|
+
const queue = new aws_sqs_1.Queue(scope, id, {
|
|
58
35
|
contentBasedDeduplication: props.contentBasedDeduplication,
|
|
59
|
-
dataKeyReuse: props.dataKeyReuseInSecs ?
|
|
36
|
+
dataKeyReuse: props.dataKeyReuseInSecs ? aws_cdk_lib_1.Duration.seconds(props.dataKeyReuseInSecs) : props.dataKeyReuse,
|
|
60
37
|
deadLetterQueue: !deadLetterQueue
|
|
61
38
|
? undefined
|
|
62
39
|
: {
|
|
@@ -64,7 +41,7 @@ class SqsManager {
|
|
|
64
41
|
queue: deadLetterQueue,
|
|
65
42
|
},
|
|
66
43
|
deduplicationScope: props.deduplicationScope,
|
|
67
|
-
deliveryDelay: props.deliveryDelayInSecs ?
|
|
44
|
+
deliveryDelay: props.deliveryDelayInSecs ? aws_cdk_lib_1.Duration.seconds(props.deliveryDelayInSecs) : undefined,
|
|
68
45
|
encryption: props.encryption,
|
|
69
46
|
encryptionMasterKey: props.encryptionMasterKey,
|
|
70
47
|
fifo: props.fifo,
|
|
@@ -72,22 +49,22 @@ class SqsManager {
|
|
|
72
49
|
maxMessageSizeBytes: props.maxMessageSizeBytes,
|
|
73
50
|
queueName: props.queueName,
|
|
74
51
|
receiveMessageWaitTime: props.receiveMessageWaitTimeInSecs
|
|
75
|
-
?
|
|
52
|
+
? aws_cdk_lib_1.Duration.seconds(props.receiveMessageWaitTimeInSecs)
|
|
76
53
|
: props.receiveMessageWaitTime,
|
|
77
|
-
removalPolicy: props.removalPolicy ??
|
|
78
|
-
retentionPeriod: props.retentionInDays ?
|
|
54
|
+
removalPolicy: props.removalPolicy ?? aws_cdk_lib_1.RemovalPolicy.DESTROY,
|
|
55
|
+
retentionPeriod: props.retentionInDays ? aws_cdk_lib_1.Duration.days(props.retentionInDays) : aws_cdk_lib_1.Duration.days(7),
|
|
79
56
|
visibilityTimeout: props.visibilityTimeoutInSecs
|
|
80
|
-
?
|
|
57
|
+
? aws_cdk_lib_1.Duration.seconds(props.visibilityTimeoutInSecs)
|
|
81
58
|
: props.visibilityTimeout,
|
|
82
59
|
});
|
|
83
60
|
if (props.tags && props.tags.length > 0) {
|
|
84
61
|
props.tags.forEach(tag => {
|
|
85
|
-
|
|
62
|
+
aws_cdk_lib_1.Tags.of(queue).add(tag.key, tag.value);
|
|
86
63
|
});
|
|
87
64
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
65
|
+
(0, utils_1.createCfnOutput)(`${id}-queueArn`, scope, queue.queueArn);
|
|
66
|
+
(0, utils_1.createCfnOutput)(`${id}-queueName`, scope, queue.queueName);
|
|
67
|
+
(0, utils_1.createCfnOutput)(`${id}-queueUrl`, scope, queue.queueUrl);
|
|
91
68
|
return queue;
|
|
92
69
|
}
|
|
93
70
|
/**
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import * as s3deploy from 'aws-cdk-lib/aws-s3-deployment';
|
|
5
|
-
import { LifecycleRule, S3BucketProps } from './types';
|
|
1
|
+
import { IDistribution } from 'aws-cdk-lib/aws-cloudfront';
|
|
2
|
+
import { CfnBucketPolicy, IBucket } from 'aws-cdk-lib/aws-s3';
|
|
3
|
+
import { ISource } from 'aws-cdk-lib/aws-s3-deployment';
|
|
6
4
|
import { CommonConstruct } from '../../../common';
|
|
5
|
+
import { LifecycleRule, S3BucketProps } from './types';
|
|
7
6
|
/**
|
|
8
|
-
* @classdesc Provides operations on AWS S3
|
|
7
|
+
* @classdesc Provides operations on AWS S3
|
|
9
8
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
10
9
|
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
11
10
|
* @example
|
|
12
11
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
13
12
|
*
|
|
14
13
|
* class CustomConstruct extends CommonConstruct {
|
|
15
|
-
* constructor(parent:
|
|
14
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
16
15
|
* super(parent, id, props)
|
|
17
16
|
* this.props = props
|
|
18
17
|
* this.s3Manager.createS3Bucket('MyBucket', this)
|
|
@@ -50,14 +49,14 @@ export declare class S3Manager {
|
|
|
50
49
|
* @param scope scope in which this resource is defined
|
|
51
50
|
* @param props bucket properties
|
|
52
51
|
*/
|
|
53
|
-
createS3Bucket(id: string, scope: CommonConstruct, props: S3BucketProps):
|
|
52
|
+
createS3Bucket(id: string, scope: CommonConstruct, props: S3BucketProps): IBucket;
|
|
54
53
|
/**
|
|
55
54
|
* @summary Method to create an iam bucket policy for cloudtrail
|
|
56
55
|
* @param id scoped id of the resource
|
|
57
56
|
* @param scope scope in which this resource is defined
|
|
58
57
|
* @param bucket
|
|
59
58
|
*/
|
|
60
|
-
createBucketPolicyForCloudTrail(id: string, scope: CommonConstruct, bucket:
|
|
59
|
+
createBucketPolicyForCloudTrail(id: string, scope: CommonConstruct, bucket: IBucket): CfnBucketPolicy;
|
|
61
60
|
/**
|
|
62
61
|
* @summary Method to create a s3 bucket deployment
|
|
63
62
|
* @param id scoped id of the resource
|
|
@@ -68,7 +67,7 @@ export declare class S3Manager {
|
|
|
68
67
|
* @param prefix
|
|
69
68
|
* @param prune
|
|
70
69
|
*/
|
|
71
|
-
doBucketDeployment(id: string, scope: CommonConstruct, siteBucket:
|
|
70
|
+
doBucketDeployment(id: string, scope: CommonConstruct, siteBucket: IBucket, distribution: IDistribution, sources: ISource[], prefix: string, prune?: boolean): void;
|
|
72
71
|
/**
|
|
73
72
|
*
|
|
74
73
|
* @param id scoped id of the resource
|
|
@@ -76,5 +75,5 @@ export declare class S3Manager {
|
|
|
76
75
|
* @param bucket bucket to create the folders in
|
|
77
76
|
* @param folders list of folder names to be created in the bucket
|
|
78
77
|
*/
|
|
79
|
-
createBucketFolders(id: string, scope: CommonConstruct, bucket:
|
|
78
|
+
createBucketFolders(id: string, scope: CommonConstruct, bucket: IBucket, folders: string[]): void;
|
|
80
79
|
}
|
|
@@ -1,43 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.S3Manager = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
4
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
5
|
+
const aws_iam_1 = require("aws-cdk-lib/aws-iam");
|
|
6
|
+
const aws_s3_1 = require("aws-cdk-lib/aws-s3");
|
|
7
|
+
const aws_s3_deployment_1 = require("aws-cdk-lib/aws-s3-deployment");
|
|
8
|
+
const utils_1 = require("../../../utils");
|
|
32
9
|
/**
|
|
33
|
-
* @classdesc Provides operations on AWS S3
|
|
10
|
+
* @classdesc Provides operations on AWS S3
|
|
34
11
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
35
12
|
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
36
13
|
* @example
|
|
37
14
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
38
15
|
*
|
|
39
16
|
* class CustomConstruct extends CommonConstruct {
|
|
40
|
-
* constructor(parent:
|
|
17
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
41
18
|
* super(parent, id, props)
|
|
42
19
|
* this.props = props
|
|
43
20
|
* this.s3Manager.createS3Bucket('MyBucket', this)
|
|
@@ -58,12 +35,12 @@ class S3Manager {
|
|
|
58
35
|
bucketLifecycleRules.push({
|
|
59
36
|
abortIncompleteMultipartUploadAfter: lifecycleRule.abortIncompleteMultipartUploadAfter,
|
|
60
37
|
enabled: lifecycleRule.enabled,
|
|
61
|
-
expiration: lifecycleRule.expirationInDays ?
|
|
38
|
+
expiration: lifecycleRule.expirationInDays ? aws_cdk_lib_1.Duration.days(lifecycleRule.expirationInDays) : undefined,
|
|
62
39
|
expirationDate: lifecycleRule.expirationDate,
|
|
63
40
|
expiredObjectDeleteMarker: lifecycleRule.expiredObjectDeleteMarker,
|
|
64
41
|
id: lifecycleRule.id,
|
|
65
42
|
noncurrentVersionExpiration: lifecycleRule.noncurrentVersionExpirationInDays
|
|
66
|
-
?
|
|
43
|
+
? aws_cdk_lib_1.Duration.days(lifecycleRule.noncurrentVersionExpirationInDays)
|
|
67
44
|
: undefined,
|
|
68
45
|
noncurrentVersionTransitions: lifecycleRule.noncurrentVersionTransitions,
|
|
69
46
|
prefix: lifecycleRule.prefix,
|
|
@@ -79,7 +56,7 @@ class S3Manager {
|
|
|
79
56
|
* @param bucketName the bucket name
|
|
80
57
|
*/
|
|
81
58
|
static determineBucketNameByAccountAndRegion(scope, bucketName) {
|
|
82
|
-
return `${bucketName}-${
|
|
59
|
+
return `${bucketName}-${aws_cdk_lib_1.Stack.of(scope).account}-${scope.props.region}-${scope.props.stage}`;
|
|
83
60
|
}
|
|
84
61
|
/**
|
|
85
62
|
* @summary Method to determine the bucket name using domain name
|
|
@@ -113,27 +90,27 @@ class S3Manager {
|
|
|
113
90
|
let bucket;
|
|
114
91
|
const bucketName = S3Manager.determineBucketName(scope, props.bucketName);
|
|
115
92
|
if (props.existingBucket && props.bucketName) {
|
|
116
|
-
bucket =
|
|
93
|
+
bucket = aws_s3_1.Bucket.fromBucketName(scope, `${id}`, bucketName);
|
|
117
94
|
}
|
|
118
95
|
else {
|
|
119
96
|
let logBucket;
|
|
120
97
|
if (props.logBucketName) {
|
|
121
98
|
const logBucketName = S3Manager.determineBucketName(scope, props.logBucketName);
|
|
122
|
-
logBucket =
|
|
99
|
+
logBucket = aws_s3_1.Bucket.fromBucketName(scope, `${id}-logs`, logBucketName);
|
|
123
100
|
}
|
|
124
|
-
bucket = new
|
|
101
|
+
bucket = new aws_s3_1.Bucket(scope, `${id}-bucket`, {
|
|
125
102
|
accessControl: props.accessControl,
|
|
126
103
|
autoDeleteObjects: props.autoDeleteObjects,
|
|
127
|
-
blockPublicAccess: props.blockPublicAccess ||
|
|
104
|
+
blockPublicAccess: props.blockPublicAccess || aws_s3_1.BlockPublicAccess.BLOCK_ALL,
|
|
128
105
|
bucketName: bucketName,
|
|
129
106
|
cors: props.cors,
|
|
130
|
-
encryption: props.encryption ||
|
|
107
|
+
encryption: props.encryption || aws_s3_1.BucketEncryption.S3_MANAGED,
|
|
131
108
|
encryptionKey: props.encryptionKey,
|
|
132
109
|
lifecycleRules: this.determineBucketLifecycleRules(props),
|
|
133
110
|
metrics: props.metrics,
|
|
134
111
|
objectOwnership: props.objectOwnership,
|
|
135
112
|
publicReadAccess: props.publicReadAccess,
|
|
136
|
-
removalPolicy: props.removalPolicy ||
|
|
113
|
+
removalPolicy: props.removalPolicy || aws_cdk_lib_1.RemovalPolicy.RETAIN,
|
|
137
114
|
serverAccessLogsBucket: logBucket,
|
|
138
115
|
serverAccessLogsPrefix: props.serverAccessLogsPrefix,
|
|
139
116
|
versioned: props.versioned,
|
|
@@ -150,11 +127,11 @@ class S3Manager {
|
|
|
150
127
|
}
|
|
151
128
|
if (props.tags && props.tags.length > 0) {
|
|
152
129
|
props.tags.forEach(tag => {
|
|
153
|
-
|
|
130
|
+
aws_cdk_lib_1.Tags.of(bucket).add(tag.key, tag.value);
|
|
154
131
|
});
|
|
155
132
|
}
|
|
156
|
-
|
|
157
|
-
|
|
133
|
+
(0, utils_1.createCfnOutput)(`${id}-bucketName`, scope, bucket.bucketName);
|
|
134
|
+
(0, utils_1.createCfnOutput)(`${id}-bucketArn`, scope, bucket.bucketArn);
|
|
158
135
|
return bucket;
|
|
159
136
|
}
|
|
160
137
|
/**
|
|
@@ -164,25 +141,25 @@ class S3Manager {
|
|
|
164
141
|
* @param bucket
|
|
165
142
|
*/
|
|
166
143
|
createBucketPolicyForCloudTrail(id, scope, bucket) {
|
|
167
|
-
const bucketPolicyDocument = new
|
|
144
|
+
const bucketPolicyDocument = new aws_iam_1.PolicyDocument({
|
|
168
145
|
statements: [
|
|
169
|
-
new
|
|
146
|
+
new aws_iam_1.PolicyStatement({
|
|
170
147
|
actions: ['s3:GetBucketAcl'],
|
|
171
|
-
effect:
|
|
172
|
-
principals: [new
|
|
148
|
+
effect: aws_iam_1.Effect.ALLOW,
|
|
149
|
+
principals: [new aws_iam_1.ServicePrincipal('cloudtrail.amazonaws.com')],
|
|
173
150
|
resources: [bucket.bucketArn],
|
|
174
151
|
sid: 'AWSCloudTrailAclCheck20150319',
|
|
175
152
|
}),
|
|
176
|
-
new
|
|
153
|
+
new aws_iam_1.PolicyStatement({
|
|
177
154
|
actions: ['s3:PutObject'],
|
|
178
|
-
effect:
|
|
179
|
-
principals: [new
|
|
155
|
+
effect: aws_iam_1.Effect.ALLOW,
|
|
156
|
+
principals: [new aws_iam_1.ServicePrincipal('cloudtrail.amazonaws.com')],
|
|
180
157
|
resources: [bucket.arnForObjects('*')],
|
|
181
158
|
sid: 'AWSCloudTrailWrite20150319',
|
|
182
159
|
}),
|
|
183
160
|
],
|
|
184
161
|
});
|
|
185
|
-
return new
|
|
162
|
+
return new aws_s3_1.CfnBucketPolicy(scope, `${id}`, {
|
|
186
163
|
bucket: bucket.bucketName,
|
|
187
164
|
policyDocument: bucketPolicyDocument,
|
|
188
165
|
});
|
|
@@ -198,14 +175,14 @@ class S3Manager {
|
|
|
198
175
|
* @param prune
|
|
199
176
|
*/
|
|
200
177
|
doBucketDeployment(id, scope, siteBucket, distribution, sources, prefix, prune) {
|
|
201
|
-
new
|
|
178
|
+
new aws_s3_deployment_1.BucketDeployment(scope, `${id}`, {
|
|
202
179
|
destinationBucket: siteBucket,
|
|
203
180
|
destinationKeyPrefix: prefix,
|
|
204
181
|
distribution: distribution,
|
|
205
182
|
distributionPaths: ['/*'],
|
|
206
183
|
memoryLimit: 1024,
|
|
207
184
|
prune: !!prune,
|
|
208
|
-
serverSideEncryption:
|
|
185
|
+
serverSideEncryption: aws_s3_deployment_1.ServerSideEncryption.AES_256,
|
|
209
186
|
sources: sources,
|
|
210
187
|
});
|
|
211
188
|
}
|
|
@@ -221,11 +198,11 @@ class S3Manager {
|
|
|
221
198
|
throw `Folder unspecified for ${id}`;
|
|
222
199
|
}
|
|
223
200
|
folders.forEach(folder => {
|
|
224
|
-
new
|
|
201
|
+
new aws_s3_deployment_1.BucketDeployment(scope, `${id}-${folder}`, {
|
|
225
202
|
destinationBucket: bucket,
|
|
226
203
|
destinationKeyPrefix: folder,
|
|
227
204
|
prune: false,
|
|
228
|
-
sources: [
|
|
205
|
+
sources: [aws_s3_deployment_1.Source.data('README.md', `This is the ${folder} folder for ${id}`)],
|
|
229
206
|
});
|
|
230
207
|
});
|
|
231
208
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks';
|
|
1
|
+
import { IRestApi } from 'aws-cdk-lib/aws-apigateway';
|
|
2
|
+
import { ITable } from 'aws-cdk-lib/aws-dynamodb';
|
|
3
|
+
import { IRole } from 'aws-cdk-lib/aws-iam';
|
|
4
|
+
import { IFunction } from 'aws-cdk-lib/aws-lambda';
|
|
5
|
+
import { ILogGroup } from 'aws-cdk-lib/aws-logs';
|
|
6
|
+
import { IQueue } from 'aws-cdk-lib/aws-sqs';
|
|
7
|
+
import { Choice, Fail, IChainable, IStateMachine, Map, Parallel, Pass, StateMachine, Succeed, Wait } from 'aws-cdk-lib/aws-stepfunctions';
|
|
8
|
+
import { CallApiGatewayRestApiEndpoint, DynamoAttributeValue, DynamoDeleteItem, DynamoGetItem, DynamoPutItem, LambdaInvoke, SqsSendMessage, StepFunctionsStartExecution } from 'aws-cdk-lib/aws-stepfunctions-tasks';
|
|
10
9
|
import { CommonConstruct } from '../../../common';
|
|
11
10
|
import { SfnCallApiGatewayRestApiEndpointProps, SfnChoiceProps, SfnDynamoDeleteItemProps, SfnDynamoGetItemProps, SfnDynamoPutItemProps, SfnFailProps, SfnLambdaInvokeProps, SfnMapProps, SfnParallelProps, SfnPassProps, SfnSqsSendMessageProps, SfnStartExecutionProps, SfnStateMachineProps, SfnSucceedProps, SfnWaitProps } from './types';
|
|
12
11
|
/**
|
|
@@ -17,7 +16,7 @@ import { SfnCallApiGatewayRestApiEndpointProps, SfnChoiceProps, SfnDynamoDeleteI
|
|
|
17
16
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
18
17
|
*
|
|
19
18
|
* class CustomConstruct extends CommonConstruct {
|
|
20
|
-
* constructor(parent:
|
|
19
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
21
20
|
* super(parent, id, props)
|
|
22
21
|
* this.props = props
|
|
23
22
|
* this.sfnManager.createSuccessStep('MyStep', this, myStepProps)
|
|
@@ -32,42 +31,42 @@ export declare class SfnManager {
|
|
|
32
31
|
* @param scope scope in which this resource is defined
|
|
33
32
|
* @param props
|
|
34
33
|
*/
|
|
35
|
-
createSuccessStep(id: string, scope: CommonConstruct, props: SfnSucceedProps):
|
|
34
|
+
createSuccessStep(id: string, scope: CommonConstruct, props: SfnSucceedProps): Succeed;
|
|
36
35
|
/**
|
|
37
36
|
* @summary Method to create a failure step
|
|
38
37
|
* @param id scoped id of the resource
|
|
39
38
|
* @param scope scope in which this resource is defined
|
|
40
39
|
* @param props
|
|
41
40
|
*/
|
|
42
|
-
createFailStep(id: string, scope: CommonConstruct, props: SfnFailProps):
|
|
41
|
+
createFailStep(id: string, scope: CommonConstruct, props: SfnFailProps): Fail;
|
|
43
42
|
/**
|
|
44
43
|
* @summary Method to create a pass step
|
|
45
44
|
* @param id scoped id of the resource
|
|
46
45
|
* @param scope scope in which this resource is defined
|
|
47
46
|
* @param props
|
|
48
47
|
*/
|
|
49
|
-
createPassStep(id: string, scope: CommonConstruct, props: SfnPassProps):
|
|
48
|
+
createPassStep(id: string, scope: CommonConstruct, props: SfnPassProps): Pass;
|
|
50
49
|
/**
|
|
51
50
|
* @summary Method to create a parallel step
|
|
52
51
|
* @param id scoped id of the resource
|
|
53
52
|
* @param scope scope in which this resource is defined
|
|
54
53
|
* @param props
|
|
55
54
|
*/
|
|
56
|
-
createParallelStep(id: string, scope: CommonConstruct, props: SfnParallelProps):
|
|
55
|
+
createParallelStep(id: string, scope: CommonConstruct, props: SfnParallelProps): Parallel;
|
|
57
56
|
/**
|
|
58
57
|
* @summary Method to create a choice step
|
|
59
58
|
* @param id scoped id of the resource
|
|
60
59
|
* @param scope scope in which this resource is defined
|
|
61
60
|
* @param props
|
|
62
61
|
*/
|
|
63
|
-
createChoiceStep(id: string, scope: CommonConstruct, props: SfnChoiceProps):
|
|
62
|
+
createChoiceStep(id: string, scope: CommonConstruct, props: SfnChoiceProps): Choice;
|
|
64
63
|
/**
|
|
65
64
|
* @summary Method to create a wait step
|
|
66
65
|
* @param id scoped id of the resource
|
|
67
66
|
* @param scope scope in which this resource is defined
|
|
68
67
|
* @param props
|
|
69
68
|
*/
|
|
70
|
-
createWaitStep(id: string, scope: CommonConstruct, props: SfnWaitProps):
|
|
69
|
+
createWaitStep(id: string, scope: CommonConstruct, props: SfnWaitProps): Wait;
|
|
71
70
|
/**
|
|
72
71
|
* @summary Method to create a DynamoDB get item step
|
|
73
72
|
* @param id scoped id of the resource
|
|
@@ -76,9 +75,9 @@ export declare class SfnManager {
|
|
|
76
75
|
* @param table The table to get the item from
|
|
77
76
|
* @param tableKey The table key for query/scan
|
|
78
77
|
*/
|
|
79
|
-
createDynamoDbGetItemStep(id: string, scope: CommonConstruct, props: SfnDynamoGetItemProps, table:
|
|
80
|
-
[key: string]:
|
|
81
|
-
}):
|
|
78
|
+
createDynamoDbGetItemStep(id: string, scope: CommonConstruct, props: SfnDynamoGetItemProps, table: ITable, tableKey: {
|
|
79
|
+
[key: string]: DynamoAttributeValue;
|
|
80
|
+
}): DynamoGetItem;
|
|
82
81
|
/**
|
|
83
82
|
* @summary Method to create a DynamoDB put item step
|
|
84
83
|
* @param id scoped id of the resource
|
|
@@ -87,9 +86,9 @@ export declare class SfnManager {
|
|
|
87
86
|
* @param table The table to put the item in
|
|
88
87
|
* @param tableItem The item to add to the table
|
|
89
88
|
*/
|
|
90
|
-
createDynamoDbPutItemStep(id: string, scope: CommonConstruct, props: SfnDynamoPutItemProps, table:
|
|
91
|
-
[key: string]:
|
|
92
|
-
}):
|
|
89
|
+
createDynamoDbPutItemStep(id: string, scope: CommonConstruct, props: SfnDynamoPutItemProps, table: ITable, tableItem: {
|
|
90
|
+
[key: string]: DynamoAttributeValue;
|
|
91
|
+
}): DynamoPutItem;
|
|
93
92
|
/**
|
|
94
93
|
* @summary Method to create a DynamoDB delete item step
|
|
95
94
|
* @param id scoped id of the resource
|
|
@@ -98,9 +97,9 @@ export declare class SfnManager {
|
|
|
98
97
|
* @param table The table to put the item in
|
|
99
98
|
* @param tableKey The table key for query/scan
|
|
100
99
|
*/
|
|
101
|
-
createDynamoDbDeleteItemStep(id: string, scope: CommonConstruct, props: SfnDynamoDeleteItemProps, table:
|
|
102
|
-
[key: string]:
|
|
103
|
-
}):
|
|
100
|
+
createDynamoDbDeleteItemStep(id: string, scope: CommonConstruct, props: SfnDynamoDeleteItemProps, table: ITable, tableKey: {
|
|
101
|
+
[key: string]: DynamoAttributeValue;
|
|
102
|
+
}): DynamoDeleteItem;
|
|
104
103
|
/**
|
|
105
104
|
* @summary Method to send a message to SQS step
|
|
106
105
|
* @param id scoped id of the resource
|
|
@@ -108,7 +107,7 @@ export declare class SfnManager {
|
|
|
108
107
|
* @param props
|
|
109
108
|
* @param queue The queue to send the message to
|
|
110
109
|
*/
|
|
111
|
-
createSendSqsMessageStep(id: string, scope: CommonConstruct, props: SfnSqsSendMessageProps, queue:
|
|
110
|
+
createSendSqsMessageStep(id: string, scope: CommonConstruct, props: SfnSqsSendMessageProps, queue: IQueue): SqsSendMessage;
|
|
112
111
|
/**
|
|
113
112
|
* @summary Method to create a lambda invoke step
|
|
114
113
|
* @param id scoped id of the resource
|
|
@@ -116,7 +115,7 @@ export declare class SfnManager {
|
|
|
116
115
|
* @param props
|
|
117
116
|
* @param lambdaFunction
|
|
118
117
|
*/
|
|
119
|
-
createLambdaStep(id: string, scope: CommonConstruct, props: SfnLambdaInvokeProps, lambdaFunction:
|
|
118
|
+
createLambdaStep(id: string, scope: CommonConstruct, props: SfnLambdaInvokeProps, lambdaFunction: IFunction): LambdaInvoke;
|
|
120
119
|
/**
|
|
121
120
|
* @summary Method to create a lambda invoke step
|
|
122
121
|
* @param id scoped id of the resource
|
|
@@ -125,7 +124,7 @@ export declare class SfnManager {
|
|
|
125
124
|
* @param lambdaFunction
|
|
126
125
|
* @param skipExecution
|
|
127
126
|
*/
|
|
128
|
-
createSkippableLambdaStep(id: string, scope: CommonConstruct, props: SfnLambdaInvokeProps, lambdaFunction:
|
|
127
|
+
createSkippableLambdaStep(id: string, scope: CommonConstruct, props: SfnLambdaInvokeProps, lambdaFunction: IFunction, skipExecution?: boolean): Pass | LambdaInvoke;
|
|
129
128
|
/**
|
|
130
129
|
* @summary Method to create a API Gateway invoke step
|
|
131
130
|
* @param id scoped id of the resource
|
|
@@ -133,7 +132,7 @@ export declare class SfnManager {
|
|
|
133
132
|
* @param props
|
|
134
133
|
* @param api
|
|
135
134
|
*/
|
|
136
|
-
createApiStep(id: string, scope: CommonConstruct, props: SfnCallApiGatewayRestApiEndpointProps, api:
|
|
135
|
+
createApiStep(id: string, scope: CommonConstruct, props: SfnCallApiGatewayRestApiEndpointProps, api: IRestApi): CallApiGatewayRestApiEndpoint;
|
|
137
136
|
/**
|
|
138
137
|
* @summary Method to create a step function execution step
|
|
139
138
|
* @param id scoped id of the resource
|
|
@@ -141,14 +140,14 @@ export declare class SfnManager {
|
|
|
141
140
|
* @param props props for the step
|
|
142
141
|
* @param stateMachine the state machine to execute
|
|
143
142
|
*/
|
|
144
|
-
createSfnExecutionStep(id: string, scope: CommonConstruct, props: SfnStartExecutionProps, stateMachine:
|
|
143
|
+
createSfnExecutionStep(id: string, scope: CommonConstruct, props: SfnStartExecutionProps, stateMachine: IStateMachine): StepFunctionsStartExecution;
|
|
145
144
|
/**
|
|
146
145
|
* @summary Method to create a step function map state
|
|
147
146
|
* @param id scoped id of the resource
|
|
148
147
|
* @param scope scope in which this resource is defined
|
|
149
148
|
* @param props props for the map state
|
|
150
149
|
*/
|
|
151
|
-
createMapState(id: string, scope: CommonConstruct, props: SfnMapProps):
|
|
150
|
+
createMapState(id: string, scope: CommonConstruct, props: SfnMapProps): Map;
|
|
152
151
|
/**
|
|
153
152
|
* @summary Method to create a state machine
|
|
154
153
|
* @param id scoped id of the resource
|
|
@@ -158,5 +157,5 @@ export declare class SfnManager {
|
|
|
158
157
|
* @param logGroup
|
|
159
158
|
* @param role
|
|
160
159
|
*/
|
|
161
|
-
createStateMachine(id: string, scope: CommonConstruct, props: SfnStateMachineProps, definition:
|
|
160
|
+
createStateMachine(id: string, scope: CommonConstruct, props: SfnStateMachineProps, definition: IChainable, logGroup: ILogGroup, role?: IRole): StateMachine;
|
|
162
161
|
}
|