diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/metric-types.ts b/packages/@aws-cdk/aws-cloudwatch/lib/metric-types.ts index e44ce2bb7c66e..f77b95f57430b 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/metric-types.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/metric-types.ts @@ -37,7 +37,6 @@ export interface IMetric { * Metric dimension * * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-dimension.html - * */ export interface Dimension { /** @@ -53,6 +52,8 @@ export interface Dimension { /** * Statistic to use over the aggregation period + * + * @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html */ export enum Statistic { /** @@ -78,7 +79,382 @@ export enum Statistic { * The highest value observed during the specified period. * You can use this value to determine high volumes of activity for your application. */ - MAXIMUM = 'Maximum' + 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%)', } /** @@ -218,7 +594,7 @@ export enum Unit { /** * None */ - NONE = 'None' + NONE = 'None', } /** diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/metric.ts b/packages/@aws-cdk/aws-cloudwatch/lib/metric.ts index 5d7955dc686cb..06ecae7ca8edc 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/metric.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/metric.ts @@ -32,6 +32,11 @@ export interface CommonMetricOptions { * - "Sum" | "sum" * - "SampleCount | "n" * - "pNN.NN" + * - "tmNN.NN" | "tm(NN.NN%:NN.NN%)" + * - "iqm" + * - "wmNN.NN" | "wm(NN.NN%:NN.NN%)" + * - "tcNN.NN" | "tc(NN.NN%:NN.NN%)" + * - "tsNN.NN" | "ts(NN.NN%:NN.NN%)" * * @default Average */