@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:51.301Z") @Stability(value=Stable) public interface MetricConfig extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudwatch.*;
import software.amazon.awscdk.core.*;
Metric metric;
Object renderingProperties;
Object value;
MetricConfig metricConfig = MetricConfig.builder()
.mathExpression(MetricExpressionConfig.builder()
.expression("expression")
.period(123)
.usingMetrics(Map.of(
"usingMetricsKey", metric))
// the properties below are optional
.searchAccount("searchAccount")
.searchRegion("searchRegion")
.build())
.metricStat(MetricStatConfig.builder()
.metricName("metricName")
.namespace("namespace")
.period(Duration.minutes(30))
.statistic("statistic")
// the properties below are optional
.account("account")
.dimensions(List.of(Dimension.builder()
.name("name")
.value(value)
.build()))
.region("region")
.unitFilter(Unit.SECONDS)
.build())
.renderingProperties(Map.of(
"renderingPropertiesKey", renderingProperties))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
MetricConfig.Builder
A builder for
MetricConfig |
static class |
MetricConfig.Jsii$Proxy
An implementation for
MetricConfig |
| Modifier and Type | Method and Description |
|---|---|
static MetricConfig.Builder |
builder() |
default MetricExpressionConfig |
getMathExpression()
In case the metric is a math expression, the details of the math expression.
|
default MetricStatConfig |
getMetricStat()
In case the metric represents a query, the details of the query.
|
default Map<String,Object> |
getRenderingProperties()
Additional properties which will be rendered if the metric is used in a dashboard.
|
@Stability(value=Stable) @Nullable default MetricExpressionConfig getMathExpression()
Default: - None
@Stability(value=Stable) @Nullable default MetricStatConfig getMetricStat()
Default: - None
@Stability(value=Stable) @Nullable default Map<String,Object> getRenderingProperties()
Examples are 'label' and 'color', but any key in here will be added to dashboard graphs.
Default: - None
@Stability(value=Stable) static MetricConfig.Builder builder()
MetricConfig.Builder of MetricConfigCopyright © 2023. All rights reserved.