@gradientedge/cdk-utils 8.90.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 +7 -12
- 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/index.d.ts +1 -0
- package/dist/src/lib/services/aws/web-application-firewall/index.js +1 -0
- 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 +5 -5
- 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 +7 -12
- 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/index.ts +1 -0
- 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
|
@@ -16,8 +16,6 @@ import {
|
|
|
16
16
|
} from './types'
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* @category cdk-utils.cloudwatch-manager
|
|
20
|
-
* @subcategory Construct
|
|
21
19
|
*/
|
|
22
20
|
enum CloudWatchWidgetType {
|
|
23
21
|
Text = 'Text',
|
|
@@ -29,9 +27,6 @@ enum CloudWatchWidgetType {
|
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
/**
|
|
32
|
-
* @stability stable
|
|
33
|
-
* @category cdk-utils.cloudwatch-manager
|
|
34
|
-
* @subcategory Construct
|
|
35
30
|
* @classdesc Provides operations on AWS CloudWatch.
|
|
36
31
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
37
32
|
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
@@ -45,15 +40,14 @@ enum CloudWatchWidgetType {
|
|
|
45
40
|
* this.cloudWatchManager.createAlarmForMetric('MyAlarm', this, metric)
|
|
46
41
|
* }
|
|
47
42
|
* }
|
|
48
|
-
*
|
|
49
43
|
* @see [CDK CloudWatch Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch-readme.html}
|
|
50
44
|
*/
|
|
51
45
|
export class CloudWatchManager {
|
|
52
46
|
/**
|
|
53
47
|
* @summary Method to create a cloudwatch alarm for a given expression
|
|
54
|
-
* @param
|
|
55
|
-
* @param
|
|
56
|
-
* @param
|
|
48
|
+
* @param id scoped id of the resource
|
|
49
|
+
* @param scope scope in which this resource is defined
|
|
50
|
+
* @param props
|
|
57
51
|
*/
|
|
58
52
|
public createAlarmForExpression(id: string, scope: CommonConstruct, props: AlarmProps) {
|
|
59
53
|
if (!props) throw `Alarm props undefined for ${id}`
|
|
@@ -67,18 +61,18 @@ export class CloudWatchManager {
|
|
|
67
61
|
)
|
|
68
62
|
const expression = new watch.MathExpression({
|
|
69
63
|
expression: props.expression,
|
|
70
|
-
usingMetrics: metrics,
|
|
71
64
|
period: props.periodInSecs ? cdk.Duration.seconds(props.periodInSecs) : cdk.Duration.minutes(5),
|
|
65
|
+
usingMetrics: metrics,
|
|
72
66
|
})
|
|
73
67
|
|
|
74
68
|
const alarm = expression.createAlarm(scope, `${id}`, {
|
|
75
|
-
alarmName: props.alarmName,
|
|
76
69
|
alarmDescription: props.alarmDescription,
|
|
77
|
-
|
|
78
|
-
evaluationPeriods: props.evaluationPeriods,
|
|
70
|
+
alarmName: props.alarmName,
|
|
79
71
|
comparisonOperator: props.comparisonOperator,
|
|
80
|
-
treatMissingData: props.treatMissingData,
|
|
81
72
|
datapointsToAlarm: props.datapointsToAlarm,
|
|
73
|
+
evaluationPeriods: props.evaluationPeriods,
|
|
74
|
+
threshold: props.threshold,
|
|
75
|
+
treatMissingData: props.treatMissingData,
|
|
82
76
|
})
|
|
83
77
|
|
|
84
78
|
utils.createCfnOutput(`${id}-alarmArn`, scope, alarm.alarmArn)
|
|
@@ -89,22 +83,22 @@ export class CloudWatchManager {
|
|
|
89
83
|
|
|
90
84
|
/**
|
|
91
85
|
* @summary Method to create a cloudwatch alarm for a given metric
|
|
92
|
-
* @param
|
|
93
|
-
* @param
|
|
94
|
-
* @param
|
|
86
|
+
* @param id scoped id of the resource
|
|
87
|
+
* @param scope scope in which this resource is defined
|
|
88
|
+
* @param props
|
|
95
89
|
* @param metric
|
|
96
90
|
*/
|
|
97
91
|
public createAlarmForMetric(id: string, scope: CommonConstruct, props: AlarmProps, metric: watch.Metric) {
|
|
98
92
|
if (!props) throw `Alarm props undefined for ${id}`
|
|
99
93
|
|
|
100
94
|
const alarm = metric.createAlarm(scope, `${id}`, {
|
|
101
|
-
alarmName: props.alarmName,
|
|
102
95
|
alarmDescription: props.alarmDescription,
|
|
103
|
-
|
|
104
|
-
evaluationPeriods: props.evaluationPeriods,
|
|
96
|
+
alarmName: props.alarmName,
|
|
105
97
|
comparisonOperator: props.comparisonOperator,
|
|
106
|
-
treatMissingData: props.treatMissingData,
|
|
107
98
|
datapointsToAlarm: props.datapointsToAlarm,
|
|
99
|
+
evaluationPeriods: props.evaluationPeriods,
|
|
100
|
+
threshold: props.threshold,
|
|
101
|
+
treatMissingData: props.treatMissingData,
|
|
108
102
|
})
|
|
109
103
|
|
|
110
104
|
utils.createCfnOutput(`${id}-alarmArn`, scope, alarm.alarmArn)
|
|
@@ -115,9 +109,9 @@ export class CloudWatchManager {
|
|
|
115
109
|
|
|
116
110
|
/**
|
|
117
111
|
* @summary Method to create a cloudwatch dashboard
|
|
118
|
-
* @param
|
|
119
|
-
* @param
|
|
120
|
-
* @param
|
|
112
|
+
* @param id scoped id of the resource
|
|
113
|
+
* @param scope scope in which this resource is defined
|
|
114
|
+
* @param props
|
|
121
115
|
* @param widgets
|
|
122
116
|
*/
|
|
123
117
|
public createDashboard(id: string, scope: CommonConstruct, props: DashboardProps, widgets?: watch.IWidget[][]) {
|
|
@@ -125,9 +119,9 @@ export class CloudWatchManager {
|
|
|
125
119
|
|
|
126
120
|
const dashboard = new watch.Dashboard(scope, `${id}`, {
|
|
127
121
|
dashboardName: props.dashboardName,
|
|
122
|
+
end: CloudWatchManager.determineTimeRange(props.end),
|
|
128
123
|
periodOverride: props.periodOverride,
|
|
129
124
|
start: CloudWatchManager.determineTimeRange(props.start),
|
|
130
|
-
end: CloudWatchManager.determineTimeRange(props.end),
|
|
131
125
|
widgets: widgets,
|
|
132
126
|
})
|
|
133
127
|
|
|
@@ -138,7 +132,7 @@ export class CloudWatchManager {
|
|
|
138
132
|
|
|
139
133
|
/**
|
|
140
134
|
* @summary Method to create cloudwatch widgets
|
|
141
|
-
* @param
|
|
135
|
+
* @param scope scope in which this resource is defined
|
|
142
136
|
* @param props
|
|
143
137
|
*/
|
|
144
138
|
public createWidgets(scope: CommonConstruct, props: any[]) {
|
|
@@ -152,8 +146,8 @@ export class CloudWatchManager {
|
|
|
152
146
|
|
|
153
147
|
/**
|
|
154
148
|
* @summary Method to create a cloudwatch widget
|
|
155
|
-
* @param
|
|
156
|
-
* @param
|
|
149
|
+
* @param id scoped id of the resource
|
|
150
|
+
* @param scope scope in which this resource is defined
|
|
157
151
|
* @param props
|
|
158
152
|
*/
|
|
159
153
|
public createWidget(id: string, scope: CommonConstruct, props: any) {
|
|
@@ -184,10 +178,10 @@ export class CloudWatchManager {
|
|
|
184
178
|
|
|
185
179
|
/**
|
|
186
180
|
* @summary Method to create a cloudfront distribution widget
|
|
187
|
-
* @param
|
|
188
|
-
* @param
|
|
189
|
-
* @param
|
|
190
|
-
* @param
|
|
181
|
+
* @param id scoped id of the resource
|
|
182
|
+
* @param scope scope in which this resource is defined
|
|
183
|
+
* @param props
|
|
184
|
+
* @param distributionId the cloudfront distribution id
|
|
191
185
|
*/
|
|
192
186
|
public createCloudfrontDistributionWidget(id: string, scope: CommonConstruct, props: any, distributionId: string) {
|
|
193
187
|
if (!props) throw `Widget props undefined for ${id}`
|
|
@@ -202,10 +196,10 @@ export class CloudWatchManager {
|
|
|
202
196
|
|
|
203
197
|
/**
|
|
204
198
|
* @summary Method to create a step function widget
|
|
205
|
-
* @param
|
|
206
|
-
* @param
|
|
207
|
-
* @param
|
|
208
|
-
* @param
|
|
199
|
+
* @param id scoped id of the resource
|
|
200
|
+
* @param scope scope in which this resource is defined
|
|
201
|
+
* @param props
|
|
202
|
+
* @param stateMachineArn the step function arn
|
|
209
203
|
*/
|
|
210
204
|
public createStateWidget(id: string, scope: CommonConstruct, props: any, stateMachineArn: string) {
|
|
211
205
|
if (!props) throw `Widget props undefined for ${id}`
|
|
@@ -220,11 +214,11 @@ export class CloudWatchManager {
|
|
|
220
214
|
|
|
221
215
|
/**
|
|
222
216
|
* @summary Method to create an event widget
|
|
223
|
-
* @param
|
|
224
|
-
* @param
|
|
225
|
-
* @param
|
|
226
|
-
* @param
|
|
227
|
-
* @param
|
|
217
|
+
* @param id scoped id of the resource
|
|
218
|
+
* @param scope scope in which this resource is defined
|
|
219
|
+
* @param props
|
|
220
|
+
* @param eventBusName the event bus name
|
|
221
|
+
* @param ruleName the event rule name
|
|
228
222
|
*/
|
|
229
223
|
public createEventWidget(id: string, scope: CommonConstruct, props: any, eventBusName: string, ruleName: string) {
|
|
230
224
|
if (!props) throw `Widget props undefined for ${id}`
|
|
@@ -242,10 +236,10 @@ export class CloudWatchManager {
|
|
|
242
236
|
|
|
243
237
|
/**
|
|
244
238
|
* @summary Method to create an api gateway widget
|
|
245
|
-
* @param
|
|
246
|
-
* @param
|
|
247
|
-
* @param
|
|
248
|
-
* @param
|
|
239
|
+
* @param id scoped id of the resource
|
|
240
|
+
* @param scope scope in which this resource is defined
|
|
241
|
+
* @param props
|
|
242
|
+
* @param apiName the api name
|
|
249
243
|
*/
|
|
250
244
|
public createApiGatewayWidget(id: string, scope: CommonConstruct, props: any, apiName: string) {
|
|
251
245
|
if (!props) throw `Widget props undefined for ${id}`
|
|
@@ -260,10 +254,10 @@ export class CloudWatchManager {
|
|
|
260
254
|
|
|
261
255
|
/**
|
|
262
256
|
* @summary Method to create a lambda function widget
|
|
263
|
-
* @param
|
|
264
|
-
* @param
|
|
265
|
-
* @param
|
|
266
|
-
* @param
|
|
257
|
+
* @param id scoped id of the resource
|
|
258
|
+
* @param scope scope in which this resource is defined
|
|
259
|
+
* @param props
|
|
260
|
+
* @param functionName the lambda function name
|
|
267
261
|
*/
|
|
268
262
|
public createLambdaWidget(id: string, scope: CommonConstruct, props: any, functionName: string) {
|
|
269
263
|
if (!props) throw `Widget props undefined for ${id}`
|
|
@@ -278,10 +272,10 @@ export class CloudWatchManager {
|
|
|
278
272
|
|
|
279
273
|
/**
|
|
280
274
|
* @summary Method to create a custom widget
|
|
281
|
-
* @param
|
|
282
|
-
* @param
|
|
283
|
-
* @param
|
|
284
|
-
* @param
|
|
275
|
+
* @param id scoped id of the resource
|
|
276
|
+
* @param scope scope in which this resource is defined
|
|
277
|
+
* @param props
|
|
278
|
+
* @param service the service identifier
|
|
285
279
|
*/
|
|
286
280
|
public createCustomWidget(id: string, scope: CommonConstruct, props: any, service: string) {
|
|
287
281
|
if (!props) throw `Widget props undefined for ${id}`
|
|
@@ -296,10 +290,10 @@ export class CloudWatchManager {
|
|
|
296
290
|
|
|
297
291
|
/**
|
|
298
292
|
* @summary Method to create an ecs cluster widget
|
|
299
|
-
* @param
|
|
300
|
-
* @param
|
|
301
|
-
* @param
|
|
302
|
-
* @param
|
|
293
|
+
* @param id scoped id of the resource
|
|
294
|
+
* @param scope scope in which this resource is defined
|
|
295
|
+
* @param props
|
|
296
|
+
* @param clusterName the ecs cluster name
|
|
303
297
|
*/
|
|
304
298
|
public createEcsClusterWidget(id: string, scope: CommonConstruct, props: any, clusterName: string) {
|
|
305
299
|
if (!props) throw `Widget props undefined for ${id}`
|
|
@@ -314,11 +308,11 @@ export class CloudWatchManager {
|
|
|
314
308
|
|
|
315
309
|
/**
|
|
316
310
|
* @summary Method to create an ecs service widget
|
|
317
|
-
* @param
|
|
318
|
-
* @param
|
|
319
|
-
* @param
|
|
320
|
-
* @param
|
|
321
|
-
* @param
|
|
311
|
+
* @param id scoped id of the resource
|
|
312
|
+
* @param scope scope in which this resource is defined
|
|
313
|
+
* @param props
|
|
314
|
+
* @param clusterName the ecs cluster name
|
|
315
|
+
* @param serviceName the ecs service name
|
|
322
316
|
*/
|
|
323
317
|
public createEcsServiceWidget(
|
|
324
318
|
id: string,
|
|
@@ -342,10 +336,10 @@ export class CloudWatchManager {
|
|
|
342
336
|
|
|
343
337
|
/**
|
|
344
338
|
* @summary Method to create an elb widget
|
|
345
|
-
* @param
|
|
346
|
-
* @param
|
|
347
|
-
* @param
|
|
348
|
-
* @param
|
|
339
|
+
* @param id scoped id of the resource
|
|
340
|
+
* @param scope scope in which this resource is defined
|
|
341
|
+
* @param props
|
|
342
|
+
* @param loadBalancer the loadbalancer reference
|
|
349
343
|
*/
|
|
350
344
|
public createElbWidget(id: string, scope: CommonConstruct, props: any, loadBalancer: string) {
|
|
351
345
|
if (!props) throw `Widget props undefined for ${id}`
|
|
@@ -360,10 +354,10 @@ export class CloudWatchManager {
|
|
|
360
354
|
|
|
361
355
|
/**
|
|
362
356
|
* @summary Method to create an elasticache widget
|
|
363
|
-
* @param
|
|
364
|
-
* @param
|
|
365
|
-
* @param
|
|
366
|
-
* @param
|
|
357
|
+
* @param id scoped id of the resource
|
|
358
|
+
* @param scope scope in which this resource is defined
|
|
359
|
+
* @param props
|
|
360
|
+
* @param cacheClusterId the elasticache cluster id
|
|
367
361
|
*/
|
|
368
362
|
public createCacheWidget(id: string, scope: CommonConstruct, props: any, cacheClusterId: string) {
|
|
369
363
|
if (!props) throw `Widget props undefined for ${id}`
|
|
@@ -378,16 +372,16 @@ export class CloudWatchManager {
|
|
|
378
372
|
|
|
379
373
|
/**
|
|
380
374
|
* @summary Method to create a cloudwatch text widget
|
|
381
|
-
* @param
|
|
382
|
-
* @param
|
|
383
|
-
* @param
|
|
375
|
+
* @param id scoped id of the resource
|
|
376
|
+
* @param scope scope in which this resource is defined
|
|
377
|
+
* @param props
|
|
384
378
|
*/
|
|
385
379
|
public createTextWidget(id: string, scope: CommonConstruct, props: TextWidgetProps) {
|
|
386
380
|
if (!props) throw `Widget props undefined for ${id}`
|
|
387
381
|
const widget = new watch.TextWidget({
|
|
382
|
+
height: props.height,
|
|
388
383
|
markdown: props.markdown,
|
|
389
384
|
width: props.width,
|
|
390
|
-
height: props.height,
|
|
391
385
|
})
|
|
392
386
|
|
|
393
387
|
if (props.positionX && props.positionY) widget.position(props.positionX, props.positionY)
|
|
@@ -397,22 +391,22 @@ export class CloudWatchManager {
|
|
|
397
391
|
|
|
398
392
|
/**
|
|
399
393
|
* @summary Method to create a cloudwatch numeric widget
|
|
400
|
-
* @param
|
|
401
|
-
* @param
|
|
402
|
-
* @param
|
|
394
|
+
* @param id scoped id of the resource
|
|
395
|
+
* @param scope scope in which this resource is defined
|
|
396
|
+
* @param props
|
|
403
397
|
* @param metrics
|
|
404
398
|
*/
|
|
405
399
|
public createSingleValueWidget(id: string, scope: CommonConstruct, props: NumericWidgetProps, metrics: IMetric[]) {
|
|
406
400
|
if (!props) throw `Widget props undefined for ${id}`
|
|
407
401
|
const widget = new watch.SingleValueWidget({
|
|
408
|
-
|
|
402
|
+
fullPrecision: props.fullPrecision,
|
|
403
|
+
height: props.height,
|
|
409
404
|
metrics: metrics,
|
|
405
|
+
region: props.region ?? scope.props.region,
|
|
410
406
|
setPeriodToTimeRange: props.setPeriodToTimeRange,
|
|
411
|
-
fullPrecision: props.fullPrecision,
|
|
412
407
|
sparkline: props.sparkline,
|
|
413
408
|
title: props.title,
|
|
414
409
|
width: props.width,
|
|
415
|
-
height: props.height,
|
|
416
410
|
})
|
|
417
411
|
|
|
418
412
|
if (props.positionX && props.positionY) widget.position(props.positionX, props.positionY)
|
|
@@ -422,22 +416,22 @@ export class CloudWatchManager {
|
|
|
422
416
|
|
|
423
417
|
/**
|
|
424
418
|
* @summary Method to create a cloudwatch guage widget
|
|
425
|
-
* @param
|
|
426
|
-
* @param
|
|
427
|
-
* @param
|
|
419
|
+
* @param id scoped id of the resource
|
|
420
|
+
* @param scope scope in which this resource is defined
|
|
421
|
+
* @param props
|
|
428
422
|
* @param metrics
|
|
429
423
|
*/
|
|
430
424
|
public createGuageWidget(id: string, scope: CommonConstruct, props: GuageWidgetProps, metrics: IMetric[]) {
|
|
431
425
|
if (!props) throw `Widget props undefined for ${id}`
|
|
432
426
|
const widget = new watch.GaugeWidget({
|
|
433
|
-
|
|
434
|
-
metrics: metrics,
|
|
427
|
+
height: props.height,
|
|
435
428
|
leftYAxis: props.leftYAxis,
|
|
436
|
-
|
|
429
|
+
metrics: metrics,
|
|
430
|
+
region: props.region ?? scope.props.region,
|
|
437
431
|
setPeriodToTimeRange: props.setPeriodToTimeRange,
|
|
432
|
+
statistic: props.statistic,
|
|
438
433
|
title: props.title,
|
|
439
434
|
width: props.width,
|
|
440
|
-
height: props.height,
|
|
441
435
|
})
|
|
442
436
|
|
|
443
437
|
if (props.positionX && props.positionY) widget.position(props.positionX, props.positionY)
|
|
@@ -447,9 +441,9 @@ export class CloudWatchManager {
|
|
|
447
441
|
|
|
448
442
|
/**
|
|
449
443
|
* @summary Method to create a cloudwatch graph widget
|
|
450
|
-
* @param
|
|
451
|
-
* @param
|
|
452
|
-
* @param
|
|
444
|
+
* @param id scoped id of the resource
|
|
445
|
+
* @param scope scope in which this resource is defined
|
|
446
|
+
* @param props
|
|
453
447
|
* @param leftYMetrics
|
|
454
448
|
* @param rightYMetrics
|
|
455
449
|
*/
|
|
@@ -462,20 +456,20 @@ export class CloudWatchManager {
|
|
|
462
456
|
) {
|
|
463
457
|
if (!props) throw `Widget props undefined for ${id}`
|
|
464
458
|
const widget = new watch.GraphWidget({
|
|
465
|
-
|
|
459
|
+
height: props.height,
|
|
466
460
|
left: leftYMetrics,
|
|
467
|
-
right: rightYMetrics,
|
|
468
461
|
leftAnnotations: props.leftAnnotations,
|
|
469
|
-
rightAnnotations: props.rightAnnotations,
|
|
470
|
-
stacked: props.stacked,
|
|
471
462
|
leftYAxis: props.leftYAxis,
|
|
472
|
-
rightYAxis: props.rightYAxis,
|
|
473
463
|
legendPosition: props.legendPosition,
|
|
474
464
|
liveData: props.liveData,
|
|
475
|
-
|
|
465
|
+
region: props.region ?? scope.props.region,
|
|
466
|
+
right: rightYMetrics,
|
|
467
|
+
rightAnnotations: props.rightAnnotations,
|
|
468
|
+
rightYAxis: props.rightYAxis,
|
|
469
|
+
stacked: props.stacked,
|
|
476
470
|
title: props.title,
|
|
471
|
+
view: props.view,
|
|
477
472
|
width: props.width,
|
|
478
|
-
height: props.height,
|
|
479
473
|
})
|
|
480
474
|
|
|
481
475
|
if (props.positionX && props.positionY) widget.position(props.positionX, props.positionY)
|
|
@@ -485,10 +479,10 @@ export class CloudWatchManager {
|
|
|
485
479
|
|
|
486
480
|
/**
|
|
487
481
|
* @summary Method to create a cloudwatch alarm status widget
|
|
488
|
-
* @param
|
|
489
|
-
* @param
|
|
490
|
-
* @param
|
|
491
|
-
* @param
|
|
482
|
+
* @param id scoped id of the resource
|
|
483
|
+
* @param scope scope in which this resource is defined
|
|
484
|
+
* @param props
|
|
485
|
+
* @param alarms
|
|
492
486
|
*/
|
|
493
487
|
public createAlarmStatusWidget(
|
|
494
488
|
id: string,
|
|
@@ -499,9 +493,9 @@ export class CloudWatchManager {
|
|
|
499
493
|
if (!props) throw `Widget props undefined for ${id}`
|
|
500
494
|
const widget = new watch.AlarmStatusWidget({
|
|
501
495
|
alarms: alarms,
|
|
496
|
+
height: props.height,
|
|
502
497
|
title: props.title,
|
|
503
498
|
width: props.width,
|
|
504
|
-
height: props.height,
|
|
505
499
|
})
|
|
506
500
|
|
|
507
501
|
if (props.positionX && props.positionY) widget.position(props.positionX, props.positionY)
|
|
@@ -511,22 +505,22 @@ export class CloudWatchManager {
|
|
|
511
505
|
|
|
512
506
|
/**
|
|
513
507
|
* @summary Method to create a cloudwatch log query widget
|
|
514
|
-
* @param
|
|
515
|
-
* @param
|
|
516
|
-
* @param
|
|
517
|
-
* @param
|
|
508
|
+
* @param id scoped id of the resource
|
|
509
|
+
* @param scope scope in which this resource is defined
|
|
510
|
+
* @param props
|
|
511
|
+
* @param logGroupNames
|
|
518
512
|
*/
|
|
519
513
|
public createLogQueryWidget(id: string, scope: CommonConstruct, props: LogQueryWidgetProps, logGroupNames: string[]) {
|
|
520
514
|
if (!props) throw `Widget props undefined for ${id}`
|
|
521
515
|
const widget = new watch.LogQueryWidget({
|
|
522
|
-
|
|
516
|
+
height: props.height,
|
|
523
517
|
logGroupNames: logGroupNames,
|
|
524
|
-
queryString: props.queryString,
|
|
525
518
|
queryLines: props.queryLines,
|
|
526
|
-
|
|
519
|
+
queryString: props.queryString,
|
|
520
|
+
region: props.region ?? scope.props.region,
|
|
527
521
|
title: props.title,
|
|
522
|
+
view: props.view,
|
|
528
523
|
width: props.width,
|
|
529
|
-
height: props.height,
|
|
530
524
|
})
|
|
531
525
|
|
|
532
526
|
if (props.positionX && props.positionY) widget.position(props.positionX, props.positionY)
|
|
@@ -536,8 +530,8 @@ export class CloudWatchManager {
|
|
|
536
530
|
|
|
537
531
|
/**
|
|
538
532
|
* @summary Utility method to determine the metrics and dimensions
|
|
539
|
-
* @param
|
|
540
|
-
* @param
|
|
533
|
+
* @param scope scope in which this resource is defined
|
|
534
|
+
* @param metricProps
|
|
541
535
|
*/
|
|
542
536
|
private determineMetrics(scope: CommonConstruct, metricProps: MetricProps[]) {
|
|
543
537
|
const metrics: watch.IMetric[] = []
|
|
@@ -556,8 +550,8 @@ export class CloudWatchManager {
|
|
|
556
550
|
metricDimensions = {
|
|
557
551
|
...metricProp.dimensionsMap,
|
|
558
552
|
...{
|
|
559
|
-
ServiceName: `${metricProp.serviceName}`,
|
|
560
553
|
ClusterName: `${metricProp.clusterName}`,
|
|
554
|
+
ServiceName: `${metricProp.serviceName}`,
|
|
561
555
|
},
|
|
562
556
|
}
|
|
563
557
|
}
|
|
@@ -597,8 +591,8 @@ export class CloudWatchManager {
|
|
|
597
591
|
metricDimensions = {
|
|
598
592
|
...metricProp.dimensionsMap,
|
|
599
593
|
...{
|
|
600
|
-
Region: `Global`,
|
|
601
594
|
DistributionId: `${metricProp.distributionId}`,
|
|
595
|
+
Region: `Global`,
|
|
602
596
|
},
|
|
603
597
|
}
|
|
604
598
|
}
|
|
@@ -645,12 +639,12 @@ export class CloudWatchManager {
|
|
|
645
639
|
}
|
|
646
640
|
}
|
|
647
641
|
const metric = new watch.Metric({
|
|
648
|
-
namespace: metricProp.stageSuffix ? `${metricProp.namespace}-${scope.props.stage}` : metricProp.namespace,
|
|
649
|
-
metricName: metricProp.stageSuffix ? `${metricProp.metricName}-${scope.props.stage}` : metricProp.metricName,
|
|
650
642
|
dimensionsMap: metricDimensions,
|
|
651
|
-
|
|
652
|
-
|
|
643
|
+
metricName: metricProp.stageSuffix ? `${metricProp.metricName}-${scope.props.stage}` : metricProp.metricName,
|
|
644
|
+
namespace: metricProp.stageSuffix ? `${metricProp.namespace}-${scope.props.stage}` : metricProp.namespace,
|
|
653
645
|
period: metricProp.periodInSecs ? cdk.Duration.seconds(metricProp.periodInSecs) : cdk.Duration.minutes(5),
|
|
646
|
+
region: metricProp.region,
|
|
647
|
+
statistic: metricProp.statistic,
|
|
654
648
|
})
|
|
655
649
|
metrics.push(metric)
|
|
656
650
|
})
|
|
@@ -661,7 +655,7 @@ export class CloudWatchManager {
|
|
|
661
655
|
|
|
662
656
|
/**
|
|
663
657
|
* @summary Utility method to determine the time range
|
|
664
|
-
* @param
|
|
658
|
+
* @param range
|
|
665
659
|
*/
|
|
666
660
|
private static determineTimeRange(range?: string) {
|
|
667
661
|
const moment = require('moment')
|
|
@@ -678,9 +672,9 @@ export class CloudWatchManager {
|
|
|
678
672
|
|
|
679
673
|
/**
|
|
680
674
|
* @summary Utility method to determine the configured alarms
|
|
681
|
-
* @param
|
|
682
|
-
* @param
|
|
683
|
-
* @param
|
|
675
|
+
* @param id scoped id of the resource
|
|
676
|
+
* @param scope scope in which this resource is defined
|
|
677
|
+
* @param alarmProps
|
|
684
678
|
*/
|
|
685
679
|
private determineAlarms(id: string, scope: CommonConstruct, alarmProps: watch.AlarmProps[]) {
|
|
686
680
|
const alarms: watch.IAlarm[] = []
|
|
@@ -3,8 +3,6 @@ import * as logs from 'aws-cdk-lib/aws-logs'
|
|
|
3
3
|
import { TagProps } from '../../../types'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* @category cdk-utils.cloudwatch-manager
|
|
7
|
-
* @subcategory Properties
|
|
8
6
|
*/
|
|
9
7
|
export interface AlarmProps extends watch.AlarmProps {
|
|
10
8
|
expression?: string
|
|
@@ -13,108 +11,88 @@ export interface AlarmProps extends watch.AlarmProps {
|
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
/**
|
|
16
|
-
* @category cdk-utils.cloudwatch-manager
|
|
17
|
-
* @subcategory Properties
|
|
18
14
|
*/
|
|
19
15
|
export interface DashboardProps extends watch.DashboardProps {}
|
|
20
16
|
|
|
21
17
|
/**
|
|
22
|
-
* @category cdk-utils.cloudwatch-manager
|
|
23
|
-
* @subcategory Properties
|
|
24
18
|
*/
|
|
25
19
|
export interface MetricProps extends watch.MetricProps {
|
|
26
|
-
stageSuffix: boolean
|
|
27
|
-
periodInSecs?: number
|
|
28
|
-
functionName?: string
|
|
29
|
-
dbClusterIdentifier?: string
|
|
30
|
-
distributionId?: string
|
|
31
|
-
loadBalancer?: string
|
|
32
|
-
serviceName?: string
|
|
33
|
-
clusterName?: string
|
|
34
20
|
apiName?: string
|
|
35
21
|
cacheClusterId?: string
|
|
36
|
-
|
|
22
|
+
clusterName?: string
|
|
23
|
+
dbClusterIdentifier?: string
|
|
24
|
+
distributionId?: string
|
|
37
25
|
eventBusName?: string
|
|
26
|
+
functionName?: string
|
|
27
|
+
loadBalancer?: string
|
|
28
|
+
periodInSecs?: number
|
|
38
29
|
ruleName?: string
|
|
39
30
|
service?: string
|
|
31
|
+
serviceName?: string
|
|
32
|
+
stageSuffix: boolean
|
|
33
|
+
stateMachineArn?: string
|
|
40
34
|
}
|
|
41
35
|
|
|
42
36
|
/**
|
|
43
|
-
* @category cdk-utils.cloudwatch-manager
|
|
44
|
-
* @subcategory Properties
|
|
45
37
|
*/
|
|
46
38
|
export interface TextWidgetProps extends watch.TextWidgetProps {
|
|
47
|
-
type: string
|
|
48
39
|
positionX: number
|
|
49
40
|
positionY: number
|
|
41
|
+
type: string
|
|
50
42
|
}
|
|
51
43
|
|
|
52
44
|
/**
|
|
53
|
-
* @category cdk-utils.cloudwatch-manager
|
|
54
|
-
* @subcategory Properties
|
|
55
45
|
*/
|
|
56
46
|
export interface NumericWidgetProps extends watch.SingleValueWidgetProps {
|
|
57
|
-
|
|
47
|
+
metricProps: watch.MetricProps[]
|
|
58
48
|
positionX: number
|
|
59
49
|
positionY: number
|
|
60
|
-
|
|
50
|
+
type: string
|
|
61
51
|
}
|
|
62
52
|
|
|
63
53
|
/**
|
|
64
|
-
* @category cdk-utils.cloudwatch-manager
|
|
65
|
-
* @subcategory Properties
|
|
66
54
|
*/
|
|
67
55
|
export interface GuageWidgetProps extends watch.GaugeWidgetProps {
|
|
68
|
-
|
|
56
|
+
metricProps: watch.MetricProps[]
|
|
69
57
|
positionX: number
|
|
70
58
|
positionY: number
|
|
71
|
-
|
|
59
|
+
type: string
|
|
72
60
|
}
|
|
73
61
|
|
|
74
62
|
/**
|
|
75
|
-
* @category cdk-utils.cloudwatch-manager
|
|
76
|
-
* @subcategory Properties
|
|
77
63
|
*/
|
|
78
64
|
export interface GraphWidgetProps extends watch.GraphWidgetProps {
|
|
79
|
-
|
|
65
|
+
metricProps: MetricProps[]
|
|
80
66
|
positionX: number
|
|
81
67
|
positionY: number
|
|
82
|
-
|
|
68
|
+
type: string
|
|
83
69
|
}
|
|
84
70
|
|
|
85
71
|
/**
|
|
86
|
-
* @category cdk-utils.cloudwatch-manager
|
|
87
|
-
* @subcategory Properties
|
|
88
72
|
*/
|
|
89
73
|
export interface AlarmStatusWidgetProps extends watch.AlarmStatusWidgetProps {
|
|
90
|
-
|
|
74
|
+
alarmProps: watch.AlarmProps[]
|
|
91
75
|
positionX: number
|
|
92
76
|
positionY: number
|
|
93
|
-
|
|
77
|
+
type: string
|
|
94
78
|
}
|
|
95
79
|
|
|
96
80
|
/**
|
|
97
|
-
* @category cdk-utils.cloudwatch-manager
|
|
98
|
-
* @subcategory Properties
|
|
99
81
|
*/
|
|
100
82
|
export interface LogQueryWidgetProps extends watch.LogQueryWidgetProps {
|
|
101
|
-
type: string
|
|
102
83
|
positionX: number
|
|
103
84
|
positionY: number
|
|
85
|
+
type: string
|
|
104
86
|
}
|
|
105
87
|
|
|
106
88
|
/**
|
|
107
|
-
* @category cdk-utils.cloudwatch-manager
|
|
108
|
-
* @subcategory Properties
|
|
109
89
|
*/
|
|
110
90
|
export interface MetricFilterProps extends logs.MetricFilterProps {
|
|
111
|
-
periodInSecs: number
|
|
112
91
|
options: watch.MetricOptions
|
|
92
|
+
periodInSecs: number
|
|
113
93
|
}
|
|
114
94
|
|
|
115
95
|
/**
|
|
116
|
-
* @category cdk-utils.cloudwatch-manager
|
|
117
|
-
* @subcategory Properties
|
|
118
96
|
*/
|
|
119
97
|
export interface LogProps extends logs.LogGroupProps {
|
|
120
98
|
tags?: TagProps[]
|