@gradientedge/cdk-utils 8.91.0 → 8.92.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/.eslintrc.json +40 -0
- package/app/api-destined-function/src/lib/lambda.ts +6 -6
- package/dist/app/api-destined-function/src/lib/lambda.d.ts +6 -6
- package/dist/app/api-destined-function/src/lib/lambda.js +6 -6
- package/dist/lib/lambda.d.ts +6 -6
- package/dist/lib/lambda.js +6 -6
- package/dist/lib/lambda.js.map +1 -1
- package/dist/src/lib/common/construct.d.ts +4 -7
- package/dist/src/lib/common/construct.js +4 -7
- package/dist/src/lib/common/stack.d.ts +9 -13
- package/dist/src/lib/common/stack.js +9 -13
- package/dist/src/lib/common/types.d.ts +0 -2
- package/dist/src/lib/construct/api-to-eventbridge-target/api.d.ts +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/api.js +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/event.d.ts +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/event.js +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +0 -27
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +41 -68
- package/dist/src/lib/construct/api-to-eventbridge-target/types.d.ts +13 -25
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.js +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +0 -37
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +44 -81
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/types.d.ts +1 -5
- package/dist/src/lib/construct/api-to-lambda-target/api.d.ts +0 -3
- package/dist/src/lib/construct/api-to-lambda-target/api.js +0 -3
- package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +0 -14
- package/dist/src/lib/construct/api-to-lambda-target/main.js +7 -21
- package/dist/src/lib/construct/api-to-lambda-target/types.d.ts +7 -13
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +0 -18
- package/dist/src/lib/construct/graphql-api-lambda/main.js +1 -19
- package/dist/src/lib/construct/graphql-api-lambda/types.d.ts +4 -8
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +0 -11
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +1 -12
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/types.d.ts +1 -3
- package/dist/src/lib/construct/lambda-with-iam-access/main.d.ts +0 -12
- package/dist/src/lib/construct/lambda-with-iam-access/main.js +2 -14
- package/dist/src/lib/construct/rest-api-lambda/main.d.ts +0 -18
- package/dist/src/lib/construct/rest-api-lambda/main.js +1 -19
- package/dist/src/lib/construct/rest-api-lambda/types.d.ts +6 -10
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +0 -11
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.js +3 -14
- package/dist/src/lib/construct/rest-api-lambda-with-cache/types.d.ts +1 -3
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +0 -25
- package/dist/src/lib/construct/site-with-ecs-backend/main.js +32 -52
- package/dist/src/lib/construct/site-with-ecs-backend/types.d.ts +10 -11
- package/dist/src/lib/construct/static-asset-deployment/main.d.ts +0 -8
- package/dist/src/lib/construct/static-asset-deployment/main.js +0 -8
- package/dist/src/lib/construct/static-asset-deployment/types.d.ts +1 -1
- package/dist/src/lib/construct/static-site/main.d.ts +0 -17
- package/dist/src/lib/construct/static-site/main.js +1 -18
- package/dist/src/lib/construct/static-site/types.d.ts +9 -11
- package/dist/src/lib/services/aws/api-gateway/main.d.ts +21 -25
- package/dist/src/lib/services/aws/api-gateway/main.js +42 -46
- package/dist/src/lib/services/aws/api-gateway/types.d.ts +0 -2
- package/dist/src/lib/services/aws/appconfig/constants.d.ts +0 -6
- package/dist/src/lib/services/aws/appconfig/constants.js +26 -32
- package/dist/src/lib/services/aws/appconfig/main.d.ts +16 -19
- package/dist/src/lib/services/aws/appconfig/main.js +19 -22
- package/dist/src/lib/services/aws/appconfig/types.d.ts +1 -3
- package/dist/src/lib/services/aws/certificate-manager/main.d.ts +5 -10
- package/dist/src/lib/services/aws/certificate-manager/main.js +5 -10
- package/dist/src/lib/services/aws/certificate-manager/types.d.ts +3 -5
- package/dist/src/lib/services/aws/cloudfront/main.d.ts +41 -47
- package/dist/src/lib/services/aws/cloudfront/main.js +56 -62
- package/dist/src/lib/services/aws/cloudfront/types.d.ts +1 -7
- package/dist/src/lib/services/aws/cloudtrail/main.d.ts +8 -12
- package/dist/src/lib/services/aws/cloudtrail/main.js +8 -12
- package/dist/src/lib/services/aws/cloudtrail/types.d.ts +0 -2
- package/dist/src/lib/services/aws/cloudwatch/logs.d.ts +11 -15
- package/dist/src/lib/services/aws/cloudwatch/logs.js +15 -19
- package/dist/src/lib/services/aws/cloudwatch/main.d.ts +80 -84
- package/dist/src/lib/services/aws/cloudwatch/main.js +116 -122
- package/dist/src/lib/services/aws/cloudwatch/types.d.ts +20 -42
- package/dist/src/lib/services/aws/codebuild/main.d.ts +0 -4
- package/dist/src/lib/services/aws/codebuild/main.js +3 -7
- package/dist/src/lib/services/aws/dynamodb/main.d.ts +3 -7
- package/dist/src/lib/services/aws/dynamodb/main.js +13 -17
- package/dist/src/lib/services/aws/dynamodb/types.d.ts +0 -2
- package/dist/src/lib/services/aws/elastic-container-registry/main.d.ts +3 -7
- package/dist/src/lib/services/aws/elastic-container-registry/main.js +3 -7
- package/dist/src/lib/services/aws/elastic-container-service/main.d.ts +19 -23
- package/dist/src/lib/services/aws/elastic-container-service/main.js +35 -39
- package/dist/src/lib/services/aws/elastic-container-service/types.d.ts +1 -9
- package/dist/src/lib/services/aws/elastic-file-system/main.d.ts +9 -13
- package/dist/src/lib/services/aws/elastic-file-system/main.js +14 -18
- package/dist/src/lib/services/aws/elastic-file-system/types.d.ts +1 -5
- package/dist/src/lib/services/aws/elastic-kubernetes-service/main.d.ts +5 -9
- package/dist/src/lib/services/aws/elastic-kubernetes-service/main.js +8 -12
- package/dist/src/lib/services/aws/elastic-kubernetes-service/types.d.ts +1 -3
- package/dist/src/lib/services/aws/elasticache/main.d.ts +14 -18
- package/dist/src/lib/services/aws/elasticache/main.js +35 -39
- package/dist/src/lib/services/aws/elasticache/types.d.ts +0 -4
- package/dist/src/lib/services/aws/eventbridge/main.d.ts +25 -29
- package/dist/src/lib/services/aws/eventbridge/main.js +34 -38
- package/dist/src/lib/services/aws/eventbridge/target.d.ts +6 -9
- package/dist/src/lib/services/aws/eventbridge/target.js +8 -10
- package/dist/src/lib/services/aws/eventbridge/types.d.ts +2 -10
- package/dist/src/lib/services/aws/evidently/main.d.ts +15 -19
- package/dist/src/lib/services/aws/evidently/main.js +19 -23
- package/dist/src/lib/services/aws/evidently/types.d.ts +0 -10
- package/dist/src/lib/services/aws/identity-access-management/main.d.ts +66 -70
- package/dist/src/lib/services/aws/identity-access-management/main.js +97 -101
- package/dist/src/lib/services/aws/key-management-service/main.d.ts +3 -7
- package/dist/src/lib/services/aws/key-management-service/main.js +6 -10
- package/dist/src/lib/services/aws/key-management-service/types.d.ts +0 -2
- package/dist/src/lib/services/aws/lambda/main.d.ts +42 -47
- package/dist/src/lib/services/aws/lambda/main.js +64 -69
- package/dist/src/lib/services/aws/lambda/types.d.ts +6 -16
- package/dist/src/lib/services/aws/route53/main.d.ts +17 -21
- package/dist/src/lib/services/aws/route53/main.js +19 -23
- package/dist/src/lib/services/aws/route53/types.d.ts +0 -2
- package/dist/src/lib/services/aws/secrets-manager/main.d.ts +6 -19
- package/dist/src/lib/services/aws/secrets-manager/main.js +6 -25
- package/dist/src/lib/services/aws/simple-notification-service/main.d.ts +8 -12
- package/dist/src/lib/services/aws/simple-notification-service/main.js +10 -14
- package/dist/src/lib/services/aws/simple-notification-service/types.d.ts +0 -2
- package/dist/src/lib/services/aws/simple-queue-service/main.d.ts +11 -15
- package/dist/src/lib/services/aws/simple-queue-service/main.js +19 -23
- package/dist/src/lib/services/aws/simple-queue-service/types.d.ts +4 -6
- package/dist/src/lib/services/aws/simple-storage-service/main.d.ts +24 -32
- package/dist/src/lib/services/aws/simple-storage-service/main.js +32 -40
- package/dist/src/lib/services/aws/simple-storage-service/types.d.ts +2 -8
- package/dist/src/lib/services/aws/step-function/main.d.ts +55 -59
- package/dist/src/lib/services/aws/step-function/main.js +91 -95
- package/dist/src/lib/services/aws/step-function/types.d.ts +0 -32
- package/dist/src/lib/services/aws/systems-manager/main.d.ts +10 -16
- package/dist/src/lib/services/aws/systems-manager/main.js +13 -19
- package/dist/src/lib/services/aws/systems-manager/types.d.ts +0 -2
- package/dist/src/lib/services/aws/virtual-private-cloud/main.d.ts +9 -12
- package/dist/src/lib/services/aws/virtual-private-cloud/main.js +10 -16
- package/dist/src/lib/services/aws/web-application-firewall/main.d.ts +6 -10
- package/dist/src/lib/services/aws/web-application-firewall/main.js +12 -16
- package/dist/src/lib/services/aws/web-application-firewall/types.d.ts +0 -4
- package/dist/src/lib/types/aws/index.d.ts +0 -2
- package/dist/src/lib/utils/aws/index.d.ts +6 -9
- package/dist/src/lib/utils/aws/index.js +7 -10
- package/dist/src/lib/utils/index.d.ts +6 -13
- package/dist/src/lib/utils/index.js +4 -12
- package/package.json +1 -1
- package/src/lib/common/construct.ts +4 -7
- package/src/lib/common/stack.ts +9 -13
- package/src/lib/common/types.ts +0 -2
- package/src/lib/construct/api-to-eventbridge-target/api.ts +0 -3
- package/src/lib/construct/api-to-eventbridge-target/event.ts +0 -3
- package/src/lib/construct/api-to-eventbridge-target/main.ts +41 -68
- package/src/lib/construct/api-to-eventbridge-target/types.ts +13 -25
- package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +0 -3
- package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +44 -81
- package/src/lib/construct/api-to-eventbridge-target-with-sns/types.ts +1 -5
- package/src/lib/construct/api-to-lambda-target/api.ts +0 -3
- package/src/lib/construct/api-to-lambda-target/main.ts +7 -21
- package/src/lib/construct/api-to-lambda-target/types.ts +7 -13
- package/src/lib/construct/graphql-api-lambda/main.ts +1 -19
- package/src/lib/construct/graphql-api-lambda/types.ts +4 -8
- package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +1 -12
- package/src/lib/construct/graphql-api-lambda-with-cache/types.ts +1 -3
- package/src/lib/construct/lambda-with-iam-access/main.ts +2 -14
- package/src/lib/construct/rest-api-lambda/main.ts +1 -19
- package/src/lib/construct/rest-api-lambda/types.ts +6 -10
- package/src/lib/construct/rest-api-lambda-with-cache/main.ts +3 -14
- package/src/lib/construct/rest-api-lambda-with-cache/types.ts +1 -3
- package/src/lib/construct/site-with-ecs-backend/main.ts +31 -52
- package/src/lib/construct/site-with-ecs-backend/types.ts +10 -11
- package/src/lib/construct/static-asset-deployment/main.ts +0 -8
- package/src/lib/construct/static-asset-deployment/types.ts +1 -1
- package/src/lib/construct/static-site/main.ts +1 -18
- package/src/lib/construct/static-site/types.ts +9 -11
- package/src/lib/services/aws/api-gateway/main.ts +43 -47
- package/src/lib/services/aws/api-gateway/types.ts +0 -2
- package/src/lib/services/aws/appconfig/constants.ts +26 -32
- package/src/lib/services/aws/appconfig/main.ts +19 -22
- package/src/lib/services/aws/appconfig/types.ts +1 -3
- package/src/lib/services/aws/certificate-manager/main.ts +5 -10
- package/src/lib/services/aws/certificate-manager/types.ts +3 -5
- package/src/lib/services/aws/cloudfront/main.ts +56 -62
- package/src/lib/services/aws/cloudfront/types.ts +1 -7
- package/src/lib/services/aws/cloudtrail/main.ts +8 -12
- package/src/lib/services/aws/cloudtrail/types.ts +0 -2
- package/src/lib/services/aws/cloudwatch/logs.ts +15 -19
- package/src/lib/services/aws/cloudwatch/main.ts +116 -122
- package/src/lib/services/aws/cloudwatch/types.ts +20 -42
- package/src/lib/services/aws/codebuild/main.ts +3 -7
- package/src/lib/services/aws/dynamodb/main.ts +13 -17
- package/src/lib/services/aws/dynamodb/types.ts +0 -2
- package/src/lib/services/aws/elastic-container-registry/main.ts +3 -7
- package/src/lib/services/aws/elastic-container-service/main.ts +35 -39
- package/src/lib/services/aws/elastic-container-service/types.ts +1 -9
- package/src/lib/services/aws/elastic-file-system/main.ts +14 -18
- package/src/lib/services/aws/elastic-file-system/types.ts +1 -5
- package/src/lib/services/aws/elastic-kubernetes-service/main.ts +8 -12
- package/src/lib/services/aws/elastic-kubernetes-service/types.ts +1 -3
- package/src/lib/services/aws/elasticache/main.ts +35 -39
- package/src/lib/services/aws/elasticache/types.ts +0 -4
- package/src/lib/services/aws/eventbridge/main.ts +34 -38
- package/src/lib/services/aws/eventbridge/target.ts +8 -11
- package/src/lib/services/aws/eventbridge/types.ts +2 -10
- package/src/lib/services/aws/evidently/main.ts +19 -23
- package/src/lib/services/aws/evidently/types.ts +0 -10
- package/src/lib/services/aws/identity-access-management/main.ts +97 -101
- package/src/lib/services/aws/key-management-service/main.ts +6 -10
- package/src/lib/services/aws/key-management-service/types.ts +0 -2
- package/src/lib/services/aws/lambda/main.ts +64 -69
- package/src/lib/services/aws/lambda/types.ts +6 -16
- package/src/lib/services/aws/route53/main.ts +19 -23
- package/src/lib/services/aws/route53/types.ts +0 -2
- package/src/lib/services/aws/secrets-manager/main.ts +6 -28
- package/src/lib/services/aws/simple-notification-service/main.ts +10 -14
- package/src/lib/services/aws/simple-notification-service/types.ts +0 -2
- package/src/lib/services/aws/simple-queue-service/main.ts +19 -23
- package/src/lib/services/aws/simple-queue-service/types.ts +4 -6
- package/src/lib/services/aws/simple-storage-service/main.ts +32 -40
- package/src/lib/services/aws/simple-storage-service/types.ts +2 -8
- package/src/lib/services/aws/step-function/main.ts +91 -95
- package/src/lib/services/aws/step-function/types.ts +0 -32
- package/src/lib/services/aws/systems-manager/main.ts +13 -19
- package/src/lib/services/aws/systems-manager/types.ts +0 -2
- package/src/lib/services/aws/virtual-private-cloud/main.ts +10 -16
- package/src/lib/services/aws/web-application-firewall/main.ts +12 -16
- package/src/lib/services/aws/web-application-firewall/types.ts +0 -4
- package/src/lib/types/aws/index.ts +0 -2
- package/src/lib/utils/aws/index.ts +7 -10
- package/src/lib/utils/index.ts +4 -12
|
@@ -28,8 +28,6 @@ const cdk = __importStar(require("aws-cdk-lib"));
|
|
|
28
28
|
const watch = __importStar(require("aws-cdk-lib/aws-cloudwatch"));
|
|
29
29
|
const utils = __importStar(require("../../../utils"));
|
|
30
30
|
/**
|
|
31
|
-
* @category cdk-utils.cloudwatch-manager
|
|
32
|
-
* @subcategory Construct
|
|
33
31
|
*/
|
|
34
32
|
var CloudWatchWidgetType;
|
|
35
33
|
(function (CloudWatchWidgetType) {
|
|
@@ -41,9 +39,6 @@ var CloudWatchWidgetType;
|
|
|
41
39
|
CloudWatchWidgetType["LogQuery"] = "LogQuery";
|
|
42
40
|
})(CloudWatchWidgetType || (CloudWatchWidgetType = {}));
|
|
43
41
|
/**
|
|
44
|
-
* @stability stable
|
|
45
|
-
* @category cdk-utils.cloudwatch-manager
|
|
46
|
-
* @subcategory Construct
|
|
47
42
|
* @classdesc Provides operations on AWS CloudWatch.
|
|
48
43
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
49
44
|
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
@@ -57,15 +52,14 @@ var CloudWatchWidgetType;
|
|
|
57
52
|
* this.cloudWatchManager.createAlarmForMetric('MyAlarm', this, metric)
|
|
58
53
|
* }
|
|
59
54
|
* }
|
|
60
|
-
*
|
|
61
55
|
* @see [CDK CloudWatch Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch-readme.html}
|
|
62
56
|
*/
|
|
63
57
|
class CloudWatchManager {
|
|
64
58
|
/**
|
|
65
59
|
* @summary Method to create a cloudwatch alarm for a given expression
|
|
66
|
-
* @param
|
|
67
|
-
* @param
|
|
68
|
-
* @param
|
|
60
|
+
* @param id scoped id of the resource
|
|
61
|
+
* @param scope scope in which this resource is defined
|
|
62
|
+
* @param props
|
|
69
63
|
*/
|
|
70
64
|
createAlarmForExpression(id, scope, props) {
|
|
71
65
|
if (!props)
|
|
@@ -78,17 +72,17 @@ class CloudWatchManager {
|
|
|
78
72
|
this.determineMetrics(scope, props.metricProps).map((metric, index) => (metrics[`m${index}`] = metric));
|
|
79
73
|
const expression = new watch.MathExpression({
|
|
80
74
|
expression: props.expression,
|
|
81
|
-
usingMetrics: metrics,
|
|
82
75
|
period: props.periodInSecs ? cdk.Duration.seconds(props.periodInSecs) : cdk.Duration.minutes(5),
|
|
76
|
+
usingMetrics: metrics,
|
|
83
77
|
});
|
|
84
78
|
const alarm = expression.createAlarm(scope, `${id}`, {
|
|
85
|
-
alarmName: props.alarmName,
|
|
86
79
|
alarmDescription: props.alarmDescription,
|
|
87
|
-
|
|
88
|
-
evaluationPeriods: props.evaluationPeriods,
|
|
80
|
+
alarmName: props.alarmName,
|
|
89
81
|
comparisonOperator: props.comparisonOperator,
|
|
90
|
-
treatMissingData: props.treatMissingData,
|
|
91
82
|
datapointsToAlarm: props.datapointsToAlarm,
|
|
83
|
+
evaluationPeriods: props.evaluationPeriods,
|
|
84
|
+
threshold: props.threshold,
|
|
85
|
+
treatMissingData: props.treatMissingData,
|
|
92
86
|
});
|
|
93
87
|
utils.createCfnOutput(`${id}-alarmArn`, scope, alarm.alarmArn);
|
|
94
88
|
utils.createCfnOutput(`${id}-alarmName`, scope, alarm.alarmName);
|
|
@@ -96,22 +90,22 @@ class CloudWatchManager {
|
|
|
96
90
|
}
|
|
97
91
|
/**
|
|
98
92
|
* @summary Method to create a cloudwatch alarm for a given metric
|
|
99
|
-
* @param
|
|
100
|
-
* @param
|
|
101
|
-
* @param
|
|
93
|
+
* @param id scoped id of the resource
|
|
94
|
+
* @param scope scope in which this resource is defined
|
|
95
|
+
* @param props
|
|
102
96
|
* @param metric
|
|
103
97
|
*/
|
|
104
98
|
createAlarmForMetric(id, scope, props, metric) {
|
|
105
99
|
if (!props)
|
|
106
100
|
throw `Alarm props undefined for ${id}`;
|
|
107
101
|
const alarm = metric.createAlarm(scope, `${id}`, {
|
|
108
|
-
alarmName: props.alarmName,
|
|
109
102
|
alarmDescription: props.alarmDescription,
|
|
110
|
-
|
|
111
|
-
evaluationPeriods: props.evaluationPeriods,
|
|
103
|
+
alarmName: props.alarmName,
|
|
112
104
|
comparisonOperator: props.comparisonOperator,
|
|
113
|
-
treatMissingData: props.treatMissingData,
|
|
114
105
|
datapointsToAlarm: props.datapointsToAlarm,
|
|
106
|
+
evaluationPeriods: props.evaluationPeriods,
|
|
107
|
+
threshold: props.threshold,
|
|
108
|
+
treatMissingData: props.treatMissingData,
|
|
115
109
|
});
|
|
116
110
|
utils.createCfnOutput(`${id}-alarmArn`, scope, alarm.alarmArn);
|
|
117
111
|
utils.createCfnOutput(`${id}-alarmName`, scope, alarm.alarmName);
|
|
@@ -119,9 +113,9 @@ class CloudWatchManager {
|
|
|
119
113
|
}
|
|
120
114
|
/**
|
|
121
115
|
* @summary Method to create a cloudwatch dashboard
|
|
122
|
-
* @param
|
|
123
|
-
* @param
|
|
124
|
-
* @param
|
|
116
|
+
* @param id scoped id of the resource
|
|
117
|
+
* @param scope scope in which this resource is defined
|
|
118
|
+
* @param props
|
|
125
119
|
* @param widgets
|
|
126
120
|
*/
|
|
127
121
|
createDashboard(id, scope, props, widgets) {
|
|
@@ -129,9 +123,9 @@ class CloudWatchManager {
|
|
|
129
123
|
throw `Dashboard props undefined for ${id}`;
|
|
130
124
|
const dashboard = new watch.Dashboard(scope, `${id}`, {
|
|
131
125
|
dashboardName: props.dashboardName,
|
|
126
|
+
end: CloudWatchManager.determineTimeRange(props.end),
|
|
132
127
|
periodOverride: props.periodOverride,
|
|
133
128
|
start: CloudWatchManager.determineTimeRange(props.start),
|
|
134
|
-
end: CloudWatchManager.determineTimeRange(props.end),
|
|
135
129
|
widgets: widgets,
|
|
136
130
|
});
|
|
137
131
|
utils.createCfnOutput(`${id}-dashboardName`, scope, props.dashboardName);
|
|
@@ -139,7 +133,7 @@ class CloudWatchManager {
|
|
|
139
133
|
}
|
|
140
134
|
/**
|
|
141
135
|
* @summary Method to create cloudwatch widgets
|
|
142
|
-
* @param
|
|
136
|
+
* @param scope scope in which this resource is defined
|
|
143
137
|
* @param props
|
|
144
138
|
*/
|
|
145
139
|
createWidgets(scope, props) {
|
|
@@ -151,8 +145,8 @@ class CloudWatchManager {
|
|
|
151
145
|
}
|
|
152
146
|
/**
|
|
153
147
|
* @summary Method to create a cloudwatch widget
|
|
154
|
-
* @param
|
|
155
|
-
* @param
|
|
148
|
+
* @param id scoped id of the resource
|
|
149
|
+
* @param scope scope in which this resource is defined
|
|
156
150
|
* @param props
|
|
157
151
|
*/
|
|
158
152
|
createWidget(id, scope, props) {
|
|
@@ -181,10 +175,10 @@ class CloudWatchManager {
|
|
|
181
175
|
}
|
|
182
176
|
/**
|
|
183
177
|
* @summary Method to create a cloudfront distribution widget
|
|
184
|
-
* @param
|
|
185
|
-
* @param
|
|
186
|
-
* @param
|
|
187
|
-
* @param
|
|
178
|
+
* @param id scoped id of the resource
|
|
179
|
+
* @param scope scope in which this resource is defined
|
|
180
|
+
* @param props
|
|
181
|
+
* @param distributionId the cloudfront distribution id
|
|
188
182
|
*/
|
|
189
183
|
createCloudfrontDistributionWidget(id, scope, props, distributionId) {
|
|
190
184
|
if (!props)
|
|
@@ -199,10 +193,10 @@ class CloudWatchManager {
|
|
|
199
193
|
}
|
|
200
194
|
/**
|
|
201
195
|
* @summary Method to create a step function widget
|
|
202
|
-
* @param
|
|
203
|
-
* @param
|
|
204
|
-
* @param
|
|
205
|
-
* @param
|
|
196
|
+
* @param id scoped id of the resource
|
|
197
|
+
* @param scope scope in which this resource is defined
|
|
198
|
+
* @param props
|
|
199
|
+
* @param stateMachineArn the step function arn
|
|
206
200
|
*/
|
|
207
201
|
createStateWidget(id, scope, props, stateMachineArn) {
|
|
208
202
|
if (!props)
|
|
@@ -217,11 +211,11 @@ class CloudWatchManager {
|
|
|
217
211
|
}
|
|
218
212
|
/**
|
|
219
213
|
* @summary Method to create an event widget
|
|
220
|
-
* @param
|
|
221
|
-
* @param
|
|
222
|
-
* @param
|
|
223
|
-
* @param
|
|
224
|
-
* @param
|
|
214
|
+
* @param id scoped id of the resource
|
|
215
|
+
* @param scope scope in which this resource is defined
|
|
216
|
+
* @param props
|
|
217
|
+
* @param eventBusName the event bus name
|
|
218
|
+
* @param ruleName the event rule name
|
|
225
219
|
*/
|
|
226
220
|
createEventWidget(id, scope, props, eventBusName, ruleName) {
|
|
227
221
|
if (!props)
|
|
@@ -239,10 +233,10 @@ class CloudWatchManager {
|
|
|
239
233
|
}
|
|
240
234
|
/**
|
|
241
235
|
* @summary Method to create an api gateway widget
|
|
242
|
-
* @param
|
|
243
|
-
* @param
|
|
244
|
-
* @param
|
|
245
|
-
* @param
|
|
236
|
+
* @param id scoped id of the resource
|
|
237
|
+
* @param scope scope in which this resource is defined
|
|
238
|
+
* @param props
|
|
239
|
+
* @param apiName the api name
|
|
246
240
|
*/
|
|
247
241
|
createApiGatewayWidget(id, scope, props, apiName) {
|
|
248
242
|
if (!props)
|
|
@@ -257,10 +251,10 @@ class CloudWatchManager {
|
|
|
257
251
|
}
|
|
258
252
|
/**
|
|
259
253
|
* @summary Method to create a lambda function widget
|
|
260
|
-
* @param
|
|
261
|
-
* @param
|
|
262
|
-
* @param
|
|
263
|
-
* @param
|
|
254
|
+
* @param id scoped id of the resource
|
|
255
|
+
* @param scope scope in which this resource is defined
|
|
256
|
+
* @param props
|
|
257
|
+
* @param functionName the lambda function name
|
|
264
258
|
*/
|
|
265
259
|
createLambdaWidget(id, scope, props, functionName) {
|
|
266
260
|
if (!props)
|
|
@@ -275,10 +269,10 @@ class CloudWatchManager {
|
|
|
275
269
|
}
|
|
276
270
|
/**
|
|
277
271
|
* @summary Method to create a custom widget
|
|
278
|
-
* @param
|
|
279
|
-
* @param
|
|
280
|
-
* @param
|
|
281
|
-
* @param
|
|
272
|
+
* @param id scoped id of the resource
|
|
273
|
+
* @param scope scope in which this resource is defined
|
|
274
|
+
* @param props
|
|
275
|
+
* @param service the service identifier
|
|
282
276
|
*/
|
|
283
277
|
createCustomWidget(id, scope, props, service) {
|
|
284
278
|
if (!props)
|
|
@@ -293,10 +287,10 @@ class CloudWatchManager {
|
|
|
293
287
|
}
|
|
294
288
|
/**
|
|
295
289
|
* @summary Method to create an ecs cluster widget
|
|
296
|
-
* @param
|
|
297
|
-
* @param
|
|
298
|
-
* @param
|
|
299
|
-
* @param
|
|
290
|
+
* @param id scoped id of the resource
|
|
291
|
+
* @param scope scope in which this resource is defined
|
|
292
|
+
* @param props
|
|
293
|
+
* @param clusterName the ecs cluster name
|
|
300
294
|
*/
|
|
301
295
|
createEcsClusterWidget(id, scope, props, clusterName) {
|
|
302
296
|
if (!props)
|
|
@@ -311,11 +305,11 @@ class CloudWatchManager {
|
|
|
311
305
|
}
|
|
312
306
|
/**
|
|
313
307
|
* @summary Method to create an ecs service widget
|
|
314
|
-
* @param
|
|
315
|
-
* @param
|
|
316
|
-
* @param
|
|
317
|
-
* @param
|
|
318
|
-
* @param
|
|
308
|
+
* @param id scoped id of the resource
|
|
309
|
+
* @param scope scope in which this resource is defined
|
|
310
|
+
* @param props
|
|
311
|
+
* @param clusterName the ecs cluster name
|
|
312
|
+
* @param serviceName the ecs service name
|
|
319
313
|
*/
|
|
320
314
|
createEcsServiceWidget(id, scope, props, clusterName, serviceName) {
|
|
321
315
|
if (!props)
|
|
@@ -333,10 +327,10 @@ class CloudWatchManager {
|
|
|
333
327
|
}
|
|
334
328
|
/**
|
|
335
329
|
* @summary Method to create an elb widget
|
|
336
|
-
* @param
|
|
337
|
-
* @param
|
|
338
|
-
* @param
|
|
339
|
-
* @param
|
|
330
|
+
* @param id scoped id of the resource
|
|
331
|
+
* @param scope scope in which this resource is defined
|
|
332
|
+
* @param props
|
|
333
|
+
* @param loadBalancer the loadbalancer reference
|
|
340
334
|
*/
|
|
341
335
|
createElbWidget(id, scope, props, loadBalancer) {
|
|
342
336
|
if (!props)
|
|
@@ -351,10 +345,10 @@ class CloudWatchManager {
|
|
|
351
345
|
}
|
|
352
346
|
/**
|
|
353
347
|
* @summary Method to create an elasticache widget
|
|
354
|
-
* @param
|
|
355
|
-
* @param
|
|
356
|
-
* @param
|
|
357
|
-
* @param
|
|
348
|
+
* @param id scoped id of the resource
|
|
349
|
+
* @param scope scope in which this resource is defined
|
|
350
|
+
* @param props
|
|
351
|
+
* @param cacheClusterId the elasticache cluster id
|
|
358
352
|
*/
|
|
359
353
|
createCacheWidget(id, scope, props, cacheClusterId) {
|
|
360
354
|
if (!props)
|
|
@@ -369,17 +363,17 @@ class CloudWatchManager {
|
|
|
369
363
|
}
|
|
370
364
|
/**
|
|
371
365
|
* @summary Method to create a cloudwatch text widget
|
|
372
|
-
* @param
|
|
373
|
-
* @param
|
|
374
|
-
* @param
|
|
366
|
+
* @param id scoped id of the resource
|
|
367
|
+
* @param scope scope in which this resource is defined
|
|
368
|
+
* @param props
|
|
375
369
|
*/
|
|
376
370
|
createTextWidget(id, scope, props) {
|
|
377
371
|
if (!props)
|
|
378
372
|
throw `Widget props undefined for ${id}`;
|
|
379
373
|
const widget = new watch.TextWidget({
|
|
374
|
+
height: props.height,
|
|
380
375
|
markdown: props.markdown,
|
|
381
376
|
width: props.width,
|
|
382
|
-
height: props.height,
|
|
383
377
|
});
|
|
384
378
|
if (props.positionX && props.positionY)
|
|
385
379
|
widget.position(props.positionX, props.positionY);
|
|
@@ -387,23 +381,23 @@ class CloudWatchManager {
|
|
|
387
381
|
}
|
|
388
382
|
/**
|
|
389
383
|
* @summary Method to create a cloudwatch numeric widget
|
|
390
|
-
* @param
|
|
391
|
-
* @param
|
|
392
|
-
* @param
|
|
384
|
+
* @param id scoped id of the resource
|
|
385
|
+
* @param scope scope in which this resource is defined
|
|
386
|
+
* @param props
|
|
393
387
|
* @param metrics
|
|
394
388
|
*/
|
|
395
389
|
createSingleValueWidget(id, scope, props, metrics) {
|
|
396
390
|
if (!props)
|
|
397
391
|
throw `Widget props undefined for ${id}`;
|
|
398
392
|
const widget = new watch.SingleValueWidget({
|
|
399
|
-
|
|
393
|
+
fullPrecision: props.fullPrecision,
|
|
394
|
+
height: props.height,
|
|
400
395
|
metrics: metrics,
|
|
396
|
+
region: props.region ?? scope.props.region,
|
|
401
397
|
setPeriodToTimeRange: props.setPeriodToTimeRange,
|
|
402
|
-
fullPrecision: props.fullPrecision,
|
|
403
398
|
sparkline: props.sparkline,
|
|
404
399
|
title: props.title,
|
|
405
400
|
width: props.width,
|
|
406
|
-
height: props.height,
|
|
407
401
|
});
|
|
408
402
|
if (props.positionX && props.positionY)
|
|
409
403
|
widget.position(props.positionX, props.positionY);
|
|
@@ -411,23 +405,23 @@ class CloudWatchManager {
|
|
|
411
405
|
}
|
|
412
406
|
/**
|
|
413
407
|
* @summary Method to create a cloudwatch guage widget
|
|
414
|
-
* @param
|
|
415
|
-
* @param
|
|
416
|
-
* @param
|
|
408
|
+
* @param id scoped id of the resource
|
|
409
|
+
* @param scope scope in which this resource is defined
|
|
410
|
+
* @param props
|
|
417
411
|
* @param metrics
|
|
418
412
|
*/
|
|
419
413
|
createGuageWidget(id, scope, props, metrics) {
|
|
420
414
|
if (!props)
|
|
421
415
|
throw `Widget props undefined for ${id}`;
|
|
422
416
|
const widget = new watch.GaugeWidget({
|
|
423
|
-
|
|
424
|
-
metrics: metrics,
|
|
417
|
+
height: props.height,
|
|
425
418
|
leftYAxis: props.leftYAxis,
|
|
426
|
-
|
|
419
|
+
metrics: metrics,
|
|
420
|
+
region: props.region ?? scope.props.region,
|
|
427
421
|
setPeriodToTimeRange: props.setPeriodToTimeRange,
|
|
422
|
+
statistic: props.statistic,
|
|
428
423
|
title: props.title,
|
|
429
424
|
width: props.width,
|
|
430
|
-
height: props.height,
|
|
431
425
|
});
|
|
432
426
|
if (props.positionX && props.positionY)
|
|
433
427
|
widget.position(props.positionX, props.positionY);
|
|
@@ -435,9 +429,9 @@ class CloudWatchManager {
|
|
|
435
429
|
}
|
|
436
430
|
/**
|
|
437
431
|
* @summary Method to create a cloudwatch graph widget
|
|
438
|
-
* @param
|
|
439
|
-
* @param
|
|
440
|
-
* @param
|
|
432
|
+
* @param id scoped id of the resource
|
|
433
|
+
* @param scope scope in which this resource is defined
|
|
434
|
+
* @param props
|
|
441
435
|
* @param leftYMetrics
|
|
442
436
|
* @param rightYMetrics
|
|
443
437
|
*/
|
|
@@ -445,20 +439,20 @@ class CloudWatchManager {
|
|
|
445
439
|
if (!props)
|
|
446
440
|
throw `Widget props undefined for ${id}`;
|
|
447
441
|
const widget = new watch.GraphWidget({
|
|
448
|
-
|
|
442
|
+
height: props.height,
|
|
449
443
|
left: leftYMetrics,
|
|
450
|
-
right: rightYMetrics,
|
|
451
444
|
leftAnnotations: props.leftAnnotations,
|
|
452
|
-
rightAnnotations: props.rightAnnotations,
|
|
453
|
-
stacked: props.stacked,
|
|
454
445
|
leftYAxis: props.leftYAxis,
|
|
455
|
-
rightYAxis: props.rightYAxis,
|
|
456
446
|
legendPosition: props.legendPosition,
|
|
457
447
|
liveData: props.liveData,
|
|
458
|
-
|
|
448
|
+
region: props.region ?? scope.props.region,
|
|
449
|
+
right: rightYMetrics,
|
|
450
|
+
rightAnnotations: props.rightAnnotations,
|
|
451
|
+
rightYAxis: props.rightYAxis,
|
|
452
|
+
stacked: props.stacked,
|
|
459
453
|
title: props.title,
|
|
454
|
+
view: props.view,
|
|
460
455
|
width: props.width,
|
|
461
|
-
height: props.height,
|
|
462
456
|
});
|
|
463
457
|
if (props.positionX && props.positionY)
|
|
464
458
|
widget.position(props.positionX, props.positionY);
|
|
@@ -466,19 +460,19 @@ class CloudWatchManager {
|
|
|
466
460
|
}
|
|
467
461
|
/**
|
|
468
462
|
* @summary Method to create a cloudwatch alarm status widget
|
|
469
|
-
* @param
|
|
470
|
-
* @param
|
|
471
|
-
* @param
|
|
472
|
-
* @param
|
|
463
|
+
* @param id scoped id of the resource
|
|
464
|
+
* @param scope scope in which this resource is defined
|
|
465
|
+
* @param props
|
|
466
|
+
* @param alarms
|
|
473
467
|
*/
|
|
474
468
|
createAlarmStatusWidget(id, scope, props, alarms) {
|
|
475
469
|
if (!props)
|
|
476
470
|
throw `Widget props undefined for ${id}`;
|
|
477
471
|
const widget = new watch.AlarmStatusWidget({
|
|
478
472
|
alarms: alarms,
|
|
473
|
+
height: props.height,
|
|
479
474
|
title: props.title,
|
|
480
475
|
width: props.width,
|
|
481
|
-
height: props.height,
|
|
482
476
|
});
|
|
483
477
|
if (props.positionX && props.positionY)
|
|
484
478
|
widget.position(props.positionX, props.positionY);
|
|
@@ -486,23 +480,23 @@ class CloudWatchManager {
|
|
|
486
480
|
}
|
|
487
481
|
/**
|
|
488
482
|
* @summary Method to create a cloudwatch log query widget
|
|
489
|
-
* @param
|
|
490
|
-
* @param
|
|
491
|
-
* @param
|
|
492
|
-
* @param
|
|
483
|
+
* @param id scoped id of the resource
|
|
484
|
+
* @param scope scope in which this resource is defined
|
|
485
|
+
* @param props
|
|
486
|
+
* @param logGroupNames
|
|
493
487
|
*/
|
|
494
488
|
createLogQueryWidget(id, scope, props, logGroupNames) {
|
|
495
489
|
if (!props)
|
|
496
490
|
throw `Widget props undefined for ${id}`;
|
|
497
491
|
const widget = new watch.LogQueryWidget({
|
|
498
|
-
|
|
492
|
+
height: props.height,
|
|
499
493
|
logGroupNames: logGroupNames,
|
|
500
|
-
queryString: props.queryString,
|
|
501
494
|
queryLines: props.queryLines,
|
|
502
|
-
|
|
495
|
+
queryString: props.queryString,
|
|
496
|
+
region: props.region ?? scope.props.region,
|
|
503
497
|
title: props.title,
|
|
498
|
+
view: props.view,
|
|
504
499
|
width: props.width,
|
|
505
|
-
height: props.height,
|
|
506
500
|
});
|
|
507
501
|
if (props.positionX && props.positionY)
|
|
508
502
|
widget.position(props.positionX, props.positionY);
|
|
@@ -510,8 +504,8 @@ class CloudWatchManager {
|
|
|
510
504
|
}
|
|
511
505
|
/**
|
|
512
506
|
* @summary Utility method to determine the metrics and dimensions
|
|
513
|
-
* @param
|
|
514
|
-
* @param
|
|
507
|
+
* @param scope scope in which this resource is defined
|
|
508
|
+
* @param metricProps
|
|
515
509
|
*/
|
|
516
510
|
determineMetrics(scope, metricProps) {
|
|
517
511
|
const metrics = [];
|
|
@@ -530,8 +524,8 @@ class CloudWatchManager {
|
|
|
530
524
|
metricDimensions = {
|
|
531
525
|
...metricProp.dimensionsMap,
|
|
532
526
|
...{
|
|
533
|
-
ServiceName: `${metricProp.serviceName}`,
|
|
534
527
|
ClusterName: `${metricProp.clusterName}`,
|
|
528
|
+
ServiceName: `${metricProp.serviceName}`,
|
|
535
529
|
},
|
|
536
530
|
};
|
|
537
531
|
}
|
|
@@ -571,8 +565,8 @@ class CloudWatchManager {
|
|
|
571
565
|
metricDimensions = {
|
|
572
566
|
...metricProp.dimensionsMap,
|
|
573
567
|
...{
|
|
574
|
-
Region: `Global`,
|
|
575
568
|
DistributionId: `${metricProp.distributionId}`,
|
|
569
|
+
Region: `Global`,
|
|
576
570
|
},
|
|
577
571
|
};
|
|
578
572
|
}
|
|
@@ -618,12 +612,12 @@ class CloudWatchManager {
|
|
|
618
612
|
};
|
|
619
613
|
}
|
|
620
614
|
const metric = new watch.Metric({
|
|
621
|
-
namespace: metricProp.stageSuffix ? `${metricProp.namespace}-${scope.props.stage}` : metricProp.namespace,
|
|
622
|
-
metricName: metricProp.stageSuffix ? `${metricProp.metricName}-${scope.props.stage}` : metricProp.metricName,
|
|
623
615
|
dimensionsMap: metricDimensions,
|
|
624
|
-
|
|
625
|
-
|
|
616
|
+
metricName: metricProp.stageSuffix ? `${metricProp.metricName}-${scope.props.stage}` : metricProp.metricName,
|
|
617
|
+
namespace: metricProp.stageSuffix ? `${metricProp.namespace}-${scope.props.stage}` : metricProp.namespace,
|
|
626
618
|
period: metricProp.periodInSecs ? cdk.Duration.seconds(metricProp.periodInSecs) : cdk.Duration.minutes(5),
|
|
619
|
+
region: metricProp.region,
|
|
620
|
+
statistic: metricProp.statistic,
|
|
627
621
|
});
|
|
628
622
|
metrics.push(metric);
|
|
629
623
|
});
|
|
@@ -632,7 +626,7 @@ class CloudWatchManager {
|
|
|
632
626
|
}
|
|
633
627
|
/**
|
|
634
628
|
* @summary Utility method to determine the time range
|
|
635
|
-
* @param
|
|
629
|
+
* @param range
|
|
636
630
|
*/
|
|
637
631
|
static determineTimeRange(range) {
|
|
638
632
|
const moment = require('moment');
|
|
@@ -647,9 +641,9 @@ class CloudWatchManager {
|
|
|
647
641
|
}
|
|
648
642
|
/**
|
|
649
643
|
* @summary Utility method to determine the configured alarms
|
|
650
|
-
* @param
|
|
651
|
-
* @param
|
|
652
|
-
* @param
|
|
644
|
+
* @param id scoped id of the resource
|
|
645
|
+
* @param scope scope in which this resource is defined
|
|
646
|
+
* @param alarmProps
|
|
653
647
|
*/
|
|
654
648
|
determineAlarms(id, scope, alarmProps) {
|
|
655
649
|
const alarms = [];
|
|
@@ -2,8 +2,6 @@ import * as watch from 'aws-cdk-lib/aws-cloudwatch';
|
|
|
2
2
|
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
3
3
|
import { TagProps } from '../../../types';
|
|
4
4
|
/**
|
|
5
|
-
* @category cdk-utils.cloudwatch-manager
|
|
6
|
-
* @subcategory Properties
|
|
7
5
|
*/
|
|
8
6
|
export interface AlarmProps extends watch.AlarmProps {
|
|
9
7
|
expression?: string;
|
|
@@ -11,100 +9,80 @@ export interface AlarmProps extends watch.AlarmProps {
|
|
|
11
9
|
periodInSecs?: number;
|
|
12
10
|
}
|
|
13
11
|
/**
|
|
14
|
-
* @category cdk-utils.cloudwatch-manager
|
|
15
|
-
* @subcategory Properties
|
|
16
12
|
*/
|
|
17
13
|
export interface DashboardProps extends watch.DashboardProps {
|
|
18
14
|
}
|
|
19
15
|
/**
|
|
20
|
-
* @category cdk-utils.cloudwatch-manager
|
|
21
|
-
* @subcategory Properties
|
|
22
16
|
*/
|
|
23
17
|
export interface MetricProps extends watch.MetricProps {
|
|
24
|
-
stageSuffix: boolean;
|
|
25
|
-
periodInSecs?: number;
|
|
26
|
-
functionName?: string;
|
|
27
|
-
dbClusterIdentifier?: string;
|
|
28
|
-
distributionId?: string;
|
|
29
|
-
loadBalancer?: string;
|
|
30
|
-
serviceName?: string;
|
|
31
|
-
clusterName?: string;
|
|
32
18
|
apiName?: string;
|
|
33
19
|
cacheClusterId?: string;
|
|
34
|
-
|
|
20
|
+
clusterName?: string;
|
|
21
|
+
dbClusterIdentifier?: string;
|
|
22
|
+
distributionId?: string;
|
|
35
23
|
eventBusName?: string;
|
|
24
|
+
functionName?: string;
|
|
25
|
+
loadBalancer?: string;
|
|
26
|
+
periodInSecs?: number;
|
|
36
27
|
ruleName?: string;
|
|
37
28
|
service?: string;
|
|
29
|
+
serviceName?: string;
|
|
30
|
+
stageSuffix: boolean;
|
|
31
|
+
stateMachineArn?: string;
|
|
38
32
|
}
|
|
39
33
|
/**
|
|
40
|
-
* @category cdk-utils.cloudwatch-manager
|
|
41
|
-
* @subcategory Properties
|
|
42
34
|
*/
|
|
43
35
|
export interface TextWidgetProps extends watch.TextWidgetProps {
|
|
44
|
-
type: string;
|
|
45
36
|
positionX: number;
|
|
46
37
|
positionY: number;
|
|
38
|
+
type: string;
|
|
47
39
|
}
|
|
48
40
|
/**
|
|
49
|
-
* @category cdk-utils.cloudwatch-manager
|
|
50
|
-
* @subcategory Properties
|
|
51
41
|
*/
|
|
52
42
|
export interface NumericWidgetProps extends watch.SingleValueWidgetProps {
|
|
53
|
-
|
|
43
|
+
metricProps: watch.MetricProps[];
|
|
54
44
|
positionX: number;
|
|
55
45
|
positionY: number;
|
|
56
|
-
|
|
46
|
+
type: string;
|
|
57
47
|
}
|
|
58
48
|
/**
|
|
59
|
-
* @category cdk-utils.cloudwatch-manager
|
|
60
|
-
* @subcategory Properties
|
|
61
49
|
*/
|
|
62
50
|
export interface GuageWidgetProps extends watch.GaugeWidgetProps {
|
|
63
|
-
|
|
51
|
+
metricProps: watch.MetricProps[];
|
|
64
52
|
positionX: number;
|
|
65
53
|
positionY: number;
|
|
66
|
-
|
|
54
|
+
type: string;
|
|
67
55
|
}
|
|
68
56
|
/**
|
|
69
|
-
* @category cdk-utils.cloudwatch-manager
|
|
70
|
-
* @subcategory Properties
|
|
71
57
|
*/
|
|
72
58
|
export interface GraphWidgetProps extends watch.GraphWidgetProps {
|
|
73
|
-
|
|
59
|
+
metricProps: MetricProps[];
|
|
74
60
|
positionX: number;
|
|
75
61
|
positionY: number;
|
|
76
|
-
|
|
62
|
+
type: string;
|
|
77
63
|
}
|
|
78
64
|
/**
|
|
79
|
-
* @category cdk-utils.cloudwatch-manager
|
|
80
|
-
* @subcategory Properties
|
|
81
65
|
*/
|
|
82
66
|
export interface AlarmStatusWidgetProps extends watch.AlarmStatusWidgetProps {
|
|
83
|
-
|
|
67
|
+
alarmProps: watch.AlarmProps[];
|
|
84
68
|
positionX: number;
|
|
85
69
|
positionY: number;
|
|
86
|
-
|
|
70
|
+
type: string;
|
|
87
71
|
}
|
|
88
72
|
/**
|
|
89
|
-
* @category cdk-utils.cloudwatch-manager
|
|
90
|
-
* @subcategory Properties
|
|
91
73
|
*/
|
|
92
74
|
export interface LogQueryWidgetProps extends watch.LogQueryWidgetProps {
|
|
93
|
-
type: string;
|
|
94
75
|
positionX: number;
|
|
95
76
|
positionY: number;
|
|
77
|
+
type: string;
|
|
96
78
|
}
|
|
97
79
|
/**
|
|
98
|
-
* @category cdk-utils.cloudwatch-manager
|
|
99
|
-
* @subcategory Properties
|
|
100
80
|
*/
|
|
101
81
|
export interface MetricFilterProps extends logs.MetricFilterProps {
|
|
102
|
-
periodInSecs: number;
|
|
103
82
|
options: watch.MetricOptions;
|
|
83
|
+
periodInSecs: number;
|
|
104
84
|
}
|
|
105
85
|
/**
|
|
106
|
-
* @category cdk-utils.cloudwatch-manager
|
|
107
|
-
* @subcategory Properties
|
|
108
86
|
*/
|
|
109
87
|
export interface LogProps extends logs.LogGroupProps {
|
|
110
88
|
tags?: TagProps[];
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import * as cdk from 'aws-cdk-lib';
|
|
2
2
|
import { CommonConstruct } from '../../../common';
|
|
3
3
|
/**
|
|
4
|
-
* @stability stable
|
|
5
|
-
* @category cdk-utils.codebuild-manager
|
|
6
|
-
* @subcategory Construct
|
|
7
4
|
* @classdesc Provides operations on AWS Code Build.
|
|
8
5
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
9
6
|
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
@@ -17,7 +14,6 @@ import { CommonConstruct } from '../../../common';
|
|
|
17
14
|
* this.codeBuildManager.createImageForCloudfrontInvalidation('MyInvalidation', this, './docker ')
|
|
18
15
|
* }
|
|
19
16
|
* }
|
|
20
|
-
*
|
|
21
17
|
* @see [CDK Codebuild Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild-readme.html}
|
|
22
18
|
*/
|
|
23
19
|
export declare class CodeBuildManager {
|