-
Notifications
You must be signed in to change notification settings - Fork 3.7k
/
metric-types.ts
856 lines (775 loc) · 29.3 KB
/
metric-types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
import { Duration } from '@aws-cdk/core';
/**
* Interface for metrics
*/
export interface IMetric {
/**
* Any warnings related to this metric
*
* Should be attached to the consuming construct.
*
* @default - None
*/
readonly warnings?: string[];
/**
* Inspect the details of the metric object
*/
toMetricConfig(): MetricConfig;
/**
* Turn this metric object into an alarm configuration
*
* @deprecated Use `toMetricConfig()` instead.
*/
toAlarmConfig(): MetricAlarmConfig;
/**
* Turn this metric object into a graph configuration
*
* @deprecated Use `toMetricConfig()` instead.
*/
toGraphConfig(): MetricGraphConfig;
}
/**
* Metric dimension
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-dimension.html
*/
export interface Dimension {
/**
* Name of the dimension
*/
readonly name: string;
/**
* Value of the dimension
*/
readonly value: any;
}
/**
* Statistic to use over the aggregation period
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html
*/
export enum Statistic {
/**
* The count (number) of data points used for the statistical calculation.
*/
SAMPLE_COUNT = 'SampleCount',
/**
* The value of Sum / SampleCount during the specified period.
*/
AVERAGE = 'Average',
/**
* All values submitted for the matching metric added together.
* This statistic can be useful for determining the total volume of a metric.
*/
SUM = 'Sum',
/**
* The lowest value observed during the specified period.
* You can use this value to determine low volumes of activity for your application.
*/
MINIMUM = 'Minimum',
/**
* The highest value observed during the specified period.
* You can use this value to determine high volumes of activity for your application.
*/
MAXIMUM = 'Maximum',
/**
* Percentile (p) indicates the relative standing of a value in a dataset.
* Percentiles help you get a better understanding of the distribution of your metric data.
*
* p10 is the 10th percentile and means that 10% of the data within the period is lower than this value and 90% of the data is higher than this value.
*/
P10 = 'p10',
/**
* Percentile (p) indicates the relative standing of a value in a dataset.
* Percentiles help you get a better understanding of the distribution of your metric data.
*
* p50 is the 50th percentile and means that 50% of the data within the period is lower than this value and 50% of the data is higher than this value.
*/
P50 = 'p50',
/**
* Percentile (p) indicates the relative standing of a value in a dataset.
* Percentiles help you get a better understanding of the distribution of your metric data.
*
* p90 is the 90th percentile and means that 90% of the data within the period is lower than this value and 10% of the data is higher than this value.
*/
P90 = 'p90',
/**
* Percentile (p) indicates the relative standing of a value in a dataset.
* Percentiles help you get a better understanding of the distribution of your metric data.
*
* p95 is the 95th percentile and means that 95% of the data within the period is lower than this value and 5% of the data is higher than this value.
*/
P95 = 'p95',
/**
* Percentile (p) indicates the relative standing of a value in a dataset.
* Percentiles help you get a better understanding of the distribution of your metric data.
*
* p99 is the 99th percentile and means that 99% of the data within the period is lower than this value and 1% of the data is higher than this value.
*/
P99 = 'p99',
/**
* Percentile (p) indicates the relative standing of a value in a dataset.
* Percentiles help you get a better understanding of the distribution of your metric data.
*
* p99.9 is the 99.9th percentile and means that 99.9% of the data within the period is lower than this value and 0.1% of the data is higher than this value.
*/
P99_9 = 'p99.9',
/**
* Percentile (p) indicates the relative standing of a value in a dataset.
* Percentiles help you get a better understanding of the distribution of your metric data.
*
* p99.99 is the 99.99th percentile and means that 99.9% of the data within the period is lower than this value and 0.01% of the data is higher than this value.
*/
P99_99 = 'p99.99',
/**
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries. Values outside of the boundaries are ignored when the mean is calculated.
* You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers can be absolute values or percentages.
*
* tm10 calculates the average after removing the 90% of data points with the highest values.
*/
TM10 = 'tm10',
/**
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries. Values outside of the boundaries are ignored when the mean is calculated.
* You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers can be absolute values or percentages.
*
* tm50 calculates the average after removing the 50% of data points with the highest values.
*/
TM50 = 'tm50',
/**
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries. Values outside of the boundaries are ignored when the mean is calculated.
* You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers can be absolute values or percentages.
*
* tm90 calculates the average after removing the 10% of data points with the highest values.
*/
TM90 = 'tm90',
/**
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries. Values outside of the boundaries are ignored when the mean is calculated.
* You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers can be absolute values or percentages.
*
* tm95 calculates the average after removing the 5% of data points with the highest values.
*/
TM95 = 'tm95',
/**
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries. Values outside of the boundaries are ignored when the mean is calculated.
* You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers can be absolute values or percentages.
*
* tm99 calculates the average after removing the 1% of data points with the highest values.
*/
TM99 = 'tm99',
/**
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries. Values outside of the boundaries are ignored when the mean is calculated.
* You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers can be absolute values or percentages.
*
* tm99.9 calculates the average after removing the 0.1% of data points with the highest values.
*/
TM99_9 = 'tm99.9',
/**
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries. Values outside of the boundaries are ignored when the mean is calculated.
* You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers can be absolute values or percentages.
*
* tm99 calculates the average after removing the 0.01% of data points with the highest values.
*/
TM99_99 = 'tm99.99',
/**
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries. Values outside of the boundaries are ignored when the mean is calculated.
* You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers can be absolute values or percentages.
*
* TM(1%:99%) calculates the average after removing the 1% lowest data points and the 1% highest data points.
*/
TM_1P_99P = 'TM(1%:99%)',
/**
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries. Values outside of the boundaries are ignored when the mean is calculated.
* You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers can be absolute values or percentages.
*
* TM(2%:98%) calculates the average after removing the 2% lowest data points and the 2% highest data points.
*/
TM_2P_98P = 'TM(2%:98%)',
/**
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries. Values outside of the boundaries are ignored when the mean is calculated.
* You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers can be absolute values or percentages.
*
* TM(5%:95%) calculates the average after removing the 5% lowest data points and the 5% highest data points.
*/
TM_5P_95P = 'TM(5%:95%)',
/**
* Trimmed mean (TM) is the mean of all values that are between two specified boundaries. Values outside of the boundaries are ignored when the mean is calculated.
* You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places. The numbers can be absolute values or percentages.
*
* TM(10%:90%) calculates the average after removing the 10% lowest data points and the 10% highest data points.
*/
TM_10P_90P = 'TM(10%:90%)',
/**
* Interquartile mean (IQM) is the trimmed mean of the interquartile range, or the middle 50% of values. It is equivalent to TM(25%:75%).
*/
IQM = 'IQM',
/**
* Winsorized mean (WM) is similar to trimmed mean. However, with winsorized mean, the values that are outside the boundary are not ignored,
* but instead are considered to be equal to the value at the edge of the appropriate boundary.
* After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
*
* wm10 calculates the average while treating the 90% of the highest values to be equal to the value at the 10th percentile.
*/
WM10 = 'wm10',
/**
* Winsorized mean (WM) is similar to trimmed mean. However, with winsorized mean, the values that are outside the boundary are not ignored,
* but instead are considered to be equal to the value at the edge of the appropriate boundary.
* After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
*
* wm50 calculates the average while treating the 50% of the highest values to be equal to the value at the 50th percentile.
*/
WM50 = 'wm50',
/**
* Winsorized mean (WM) is similar to trimmed mean. However, with winsorized mean, the values that are outside the boundary are not ignored,
* but instead are considered to be equal to the value at the edge of the appropriate boundary.
* After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
*
* wm90 calculates the average while treating the 10% of the highest values to be equal to the value at the 90th percentile.
*/
WM90 = 'wm90',
/**
* Winsorized mean (WM) is similar to trimmed mean. However, with winsorized mean, the values that are outside the boundary are not ignored,
* but instead are considered to be equal to the value at the edge of the appropriate boundary.
* After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
*
* wm95 calculates the average while treating the 5% of the highest values to be equal to the value at the 95th percentile.
*/
WM95 = 'wm95',
/**
* Winsorized mean (WM) is similar to trimmed mean. However, with winsorized mean, the values that are outside the boundary are not ignored,
* but instead are considered to be equal to the value at the edge of the appropriate boundary.
* After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
*
* wm99 calculates the average while treating the 1% of the highest values to be equal to the value at the 99th percentile.
*/
WM99 = 'wm99',
/**
* Winsorized mean (WM) is similar to trimmed mean. However, with winsorized mean, the values that are outside the boundary are not ignored,
* but instead are considered to be equal to the value at the edge of the appropriate boundary.
* After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
*
* wm99.9 calculates the average while treating the 0.1% of the highest values to be equal to the value at the 99.9th percentile.
*/
WM99_9 = 'wm99.9',
/**
* Winsorized mean (WM) is similar to trimmed mean. However, with winsorized mean, the values that are outside the boundary are not ignored,
* but instead are considered to be equal to the value at the edge of the appropriate boundary.
* After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
*
* wm99.99 calculates the average while treating the 0.01% of the highest values to be equal to the value at the 99.99th percentile.
*/
WM99_99 = 'wm99.99',
/**
* Winsorized mean (WM) is similar to trimmed mean. However, with winsorized mean, the values that are outside the boundary are not ignored,
* but instead are considered to be equal to the value at the edge of the appropriate boundary.
* After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
*
* WM(1%:99%) calculates the average while treating the highest 1% of data points to be the value of the 99% boundary,
* and treating the lowest 1% of data points to be the value of the 1% boundary.
*/
WM_1P_99P = 'WM(1%:99%)',
/**
* Winsorized mean (WM) is similar to trimmed mean. However, with winsorized mean, the values that are outside the boundary are not ignored,
* but instead are considered to be equal to the value at the edge of the appropriate boundary.
* After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
*
* WM(2%:98%) calculates the average while treating the highest 2% of data points to be the value of the 98% boundary,
* and treating the lowest 2% of data points to be the value of the 2% boundary.
*/
WM_2P_98P = 'WM(2%:98%)',
/**
* Winsorized mean (WM) is similar to trimmed mean. However, with winsorized mean, the values that are outside the boundary are not ignored,
* but instead are considered to be equal to the value at the edge of the appropriate boundary.
* After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
*
* WM(5%:95%) calculates the average while treating the highest 5% of data points to be the value of the 95% boundary,
* and treating the lowest 5% of data points to be the value of the 5% boundary.
*/
WM_5P_95P = 'WM(5%:95%)',
/**
* Winsorized mean (WM) is similar to trimmed mean. However, with winsorized mean, the values that are outside the boundary are not ignored,
* but instead are considered to be equal to the value at the edge of the appropriate boundary.
* After this normalization, the average is calculated. You define the boundaries as one or two numbers between 0 and 100, up to 10 decimal places.
*
* WM(10%:90%) calculates the average while treating the highest 10% of data points to be the value of the 90% boundary,
* and treating the lowest 10% of data points to be the value of the 10% boundary.
*/
WM_10P_90P = 'WM(10%:90%)',
/**
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
*
* tc10 returns the number of data points not including any data points that fall in the highest 90% of the values.
*/
TC10 = 'tc10',
/**
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
*
* tc50 returns the number of data points not including any data points that fall in the highest 50% of the values.
*/
TC50 = 'tc50',
/**
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
*
* tc90 returns the number of data points not including any data points that fall in the highest 10% of the values.
*/
TC90 = 'tc90',
/**
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
*
* tc95 returns the number of data points not including any data points that fall in the highest 5% of the values.
*/
TC95 = 'tc95',
/**
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
*
* tc99 returns the number of data points not including any data points that fall in the highest 1% of the values.
*/
TC99 = 'tc99',
/**
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
*
* tc99.9 returns the number of data points not including any data points that fall in the highest 0.1% of the values.
*/
TC99_9 = 'tc99.9',
/**
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
*
* tc99.99 returns the number of data points not including any data points that fall in the highest 0.01% of the values.
*/
TC99_99 = 'tc99.99',
/**
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
*
* TC(1%:99%) returns the number of data points not including any data points that fall in the lowest 1% of the values and the highest 99% of the values.
*/
TC_1P_99P = 'TC(1%:99%)',
/**
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
*
* TC(2%:98%) returns the number of data points not including any data points that fall in the lowest 2% of the values and the highest 98% of the values.
*/
TC_2P_98P = 'TC(2%:98%)',
/**
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
*
* TC(5%:95%) returns the number of data points not including any data points that fall in the lowest 5% of the values and the highest 95% of the values.
*/
TC_5P_95P = 'TC(5%:95%)',
/**
* Trimmed count (TC) is the number of data points in the chosen range for a trimmed mean statistic.
*
* TC(10%:90%) returns the number of data points not including any data points that fall in the lowest 10% of the values and the highest 90% of the values.
*/
TC_10P_90P = 'TC(10%:90%)',
/**
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
*
* ts10 returns the sum of the data points not including any data points that fall in the highest 90% of the values.
*/
TS10 = 'ts10',
/**
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
*
* ts50 returns the sum of the data points not including any data points that fall in the highest 50% of the values.
*/
TS50 = 'ts50',
/**
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
*
* ts90 returns the sum of the data points not including any data points that fall in the highest 10% of the values.
*/
TS90 = 'ts90',
/**
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
*
* ts95 returns the sum of the data points not including any data points that fall in the highest 5% of the values.
*/
TS95 = 'ts95',
/**
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
*
* ts99 returns the sum of the data points not including any data points that fall in the highest 1% of the values.
*/
TS99 = 'ts99',
/**
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
*
* ts99.9 returns the sum of the data points not including any data points that fall in the highest 0.1% of the values.
*/
TS99_9 = 'ts99.9',
/**
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
*
* ts99.99 returns the sum of the data points not including any data points that fall in the highest 0.01% of the values.
*/
TS99_99 = 'ts99.99',
/**
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
*
* TS(1%:99%) returns the sum of the data points not including any data points that fall in the lowest 1% of the values and the highest 99% of the values.
*/
TS_1P_99P = 'TS(1%:99%)',
/**
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
*
* TS(2%:98%) returns the sum of the data points not including any data points that fall in the lowest 2% of the values and the highest 98% of the values.
*/
TS_2P_98P = 'TS(2%:98%)',
/**
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
*
* TS(5%:95%) returns the sum of the data points not including any data points that fall in the lowest 5% of the values and the highest 95% of the values.
*/
TS_5P_95P = 'TS(5%:95%)',
/**
* Trimmed sum (TS) is the sum of the values of data points in a chosen range for a trimmed mean statistic.
* It is equivalent to `(Trimmed Mean) * (Trimmed count)`.
*
* TS(10%:90%) returns the sum of the data points not including any data points that fall in the lowest 10% of the values and the highest 90% of the values.
*/
TS_10P_90P = 'TS(10%:90%)',
}
/**
* Unit for metric
*/
export enum Unit {
/**
* Seconds
*/
SECONDS = 'Seconds',
/**
* Microseconds
*/
MICROSECONDS = 'Microseconds',
/**
* Milliseconds
*/
MILLISECONDS = 'Milliseconds',
/**
* Bytes
*/
BYTES = 'Bytes',
/**
* Kilobytes
*/
KILOBYTES = 'Kilobytes',
/**
* Megabytes
*/
MEGABYTES = 'Megabytes',
/**
* Gigabytes
*/
GIGABYTES = 'Gigabytes',
/**
* Terabytes
*/
TERABYTES = 'Terabytes',
/**
* Bits
*/
BITS = 'Bits',
/**
* Kilobits
*/
KILOBITS = 'Kilobits',
/**
* Megabits
*/
MEGABITS = 'Megabits',
/**
* Gigabits
*/
GIGABITS = 'Gigabits',
/**
* Terabits
*/
TERABITS = 'Terabits',
/**
* Percent
*/
PERCENT = 'Percent',
/**
* Count
*/
COUNT = 'Count',
/**
* Bytes/second (B/s)
*/
BYTES_PER_SECOND = 'Bytes/Second',
/**
* Kilobytes/second (kB/s)
*/
KILOBYTES_PER_SECOND = 'Kilobytes/Second',
/**
* Megabytes/second (MB/s)
*/
MEGABYTES_PER_SECOND = 'Megabytes/Second',
/**
* Gigabytes/second (GB/s)
*/
GIGABYTES_PER_SECOND = 'Gigabytes/Second',
/**
* Terabytes/second (TB/s)
*/
TERABYTES_PER_SECOND = 'Terabytes/Second',
/**
* Bits/second (b/s)
*/
BITS_PER_SECOND = 'Bits/Second',
/**
* Kilobits/second (kb/s)
*/
KILOBITS_PER_SECOND = 'Kilobits/Second',
/**
* Megabits/second (Mb/s)
*/
MEGABITS_PER_SECOND = 'Megabits/Second',
/**
* Gigabits/second (Gb/s)
*/
GIGABITS_PER_SECOND = 'Gigabits/Second',
/**
* Terabits/second (Tb/s)
*/
TERABITS_PER_SECOND = 'Terabits/Second',
/**
* Count/second
*/
COUNT_PER_SECOND = 'Count/Second',
/**
* None
*/
NONE = 'None',
}
/**
* Properties of a rendered metric
*/
export interface MetricConfig {
/**
* In case the metric represents a query, the details of the query
*
* @default - None
*/
readonly metricStat?: MetricStatConfig;
/**
* In case the metric is a math expression, the details of the math expression
*
* @default - None
*/
readonly mathExpression?: MetricExpressionConfig;
/**
* Additional properties which will be rendered if the metric is used in a dashboard
*
* Examples are 'label' and 'color', but any key in here will be
* added to dashboard graphs.
*
* @default - None
*/
readonly renderingProperties?: Record<string, unknown>;
}
/**
* Properties for a concrete metric
*
* NOTE: `unit` is no longer on this object since it is only used for `Alarms`, and doesn't mean what one
* would expect it to mean there anyway. It is most likely to be misused.
*/
export interface MetricStatConfig {
/**
* The dimensions to apply to the alarm
*
* @default []
*/
readonly dimensions?: Dimension[];
/**
* Namespace of the metric
*/
readonly namespace: string;
/**
* Name of the metric
*/
readonly metricName: string;
/**
* How many seconds to aggregate over
*/
readonly period: Duration;
/**
* Aggregation function to use (can be either simple or a percentile)
*/
readonly statistic: string;
/**
* Unit used to filter the metric stream
*
* Only refer to datums emitted to the metric stream with the given unit and
* ignore all others. Only useful when datums are being emitted to the same
* metric stream under different units.
*
* This field has been renamed from plain `unit` to clearly communicate
* its purpose.
*
* @default - Refer to all metric datums
*/
readonly unitFilter?: Unit;
/**
* Region which this metric comes from.
*
* @default Deployment region.
*/
readonly region?: string;
/**
* Account which this metric comes from.
*
* @default Deployment account.
*/
readonly account?: string;
}
/**
* Properties for a concrete metric
*/
export interface MetricExpressionConfig {
/**
* Math expression for the metric.
*/
readonly expression: string;
/**
* Metrics used in the math expression
*/
readonly usingMetrics: Record<string, IMetric>;
/**
* How many seconds to aggregate over
*/
readonly period: number;
/**
* Account to evaluate search expressions within.
*
* @default - Deployment account.
*/
readonly searchAccount?: string;
/**
* Region to evaluate search expressions within.
*
* @default - Deployment region.
*/
readonly searchRegion?: string;
}
/**
* Properties used to construct the Metric identifying part of an Alarm
*
* @deprecated Replaced by MetricConfig
*/
export interface MetricAlarmConfig {
/**
* The dimensions to apply to the alarm
*/
readonly dimensions?: Dimension[];
/**
* Namespace of the metric
*/
readonly namespace: string;
/**
* Name of the metric
*/
readonly metricName: string;
/**
* How many seconds to aggregate over
*/
readonly period: number;
/**
* Simple aggregation function to use
*/
readonly statistic?: Statistic;
/**
* Percentile aggregation function to use
*/
readonly extendedStatistic?: string;
/**
* The unit of the alarm
*/
readonly unit?: Unit;
}
/**
* Properties used to construct the Metric identifying part of a Graph
*
* @deprecated Replaced by MetricConfig
*/
export interface MetricGraphConfig {
/**
* The dimensions to apply to the alarm
*/
readonly dimensions?: Dimension[];
/**
* Namespace of the metric
*/
readonly namespace: string;
/**
* Name of the metric
*/
readonly metricName: string;
/**
* Rendering properties override yAxis parameter of the widget object
*/
readonly renderingProperties: MetricRenderingProperties;
/**
* How many seconds to aggregate over
*
* @deprecated Use `period` in `renderingProperties`
*/
readonly period: number;
/**
* Label for the metric
*
* @deprecated Use `label` in `renderingProperties`
*/
readonly label?: string;
/**
* Color for the graph line
*
* @deprecated Use `color` in `renderingProperties`
*/
readonly color?: string;
/**
* Aggregation function to use (can be either simple or a percentile)
*
* @deprecated Use `stat` in `renderingProperties`
*/
readonly statistic?: string;
/**
* The unit of the alarm
*
* @deprecated not used in dashboard widgets
*/
readonly unit?: Unit;
}
/**
* Custom rendering properties that override the default rendering properties specified in the yAxis parameter of the widget object.
*
* @deprecated Replaced by MetricConfig.
*/
export interface MetricRenderingProperties {
/**
* How many seconds to aggregate over
*/
readonly period: number;
/**
* Label for the metric
*/
readonly label?: string;
/**
* The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph.
* The `Color` class has a set of standard colors that can be used here.
*/
readonly color?: string;
/**
* Aggregation function to use (can be either simple or a percentile)
*/
readonly stat?: string;
}