Interface CommonMetricOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
MetricOptions
,MetricProps
,OperationsMetricOptions
,SystemErrorsForOperationsMetricOptions
- All Known Implementing Classes:
CommonMetricOptions.Jsii$Proxy
,MetricOptions.Jsii$Proxy
,MetricProps.Jsii$Proxy
,OperationsMetricOptions.Jsii$Proxy
,SystemErrorsForOperationsMetricOptions.Jsii$Proxy
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.*; import software.amazon.awscdk.services.cloudwatch.*; CommonMetricOptions commonMetricOptions = CommonMetricOptions.builder() .account("account") .color("color") .dimensionsMap(Map.of( "dimensionsMapKey", "dimensionsMap")) .label("label") .period(Duration.minutes(30)) .region("region") .statistic("statistic") .unit(Unit.SECONDS) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCommonMetricOptions
static final class
An implementation forCommonMetricOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic CommonMetricOptions.Builder
builder()
default String
Account which this metric comes from.default String
getColor()
The hex color code, prefixed with '#' (e.g.Dimensions of the metric.default String
getLabel()
Label for this metric when added to a Graph in a Dashboard.default Duration
The period over which the specified statistic is applied.default String
Region which this metric comes from.default String
What function to use for aggregating.default Unit
getUnit()
Unit used to filter the metric stream.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAccount
Account which this metric comes from.Default: - Deployment account.
-
getColor
The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. TheColor
class has a set of standard colors that can be used here.Default: - Automatic color
-
getDimensionsMap
Dimensions of the metric.Default: - No dimensions.
-
getLabel
Label for this metric when added to a Graph in a Dashboard.You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:
[max: ${MAX}] MyMetric
As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend.
Default: - No label
-
getPeriod
The period over which the specified statistic is applied.Default: Duration.minutes(5)
-
getRegion
Region which this metric comes from.Default: - Deployment region.
-
getStatistic
What function to use for aggregating.Use the
aws_cloudwatch.Stats
helper class to construct valid input strings.Can be one of the following:
- "Minimum" | "min"
- "Maximum" | "max"
- "Average" | "avg"
- "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
-
getUnit
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.
The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases.
CloudWatch does not honor this property for graphs.
Default: - All metric datums in the given metric stream
-
builder
- Returns:
- a
CommonMetricOptions.Builder
ofCommonMetricOptions
-