Class MetricConfig
Properties of a rendered metric.
Inheritance
System.Object
MetricConfig
Implements
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.AWS.CloudWatch.dll
Syntax (csharp)
public class MetricConfig : Object, IMetricConfig
Syntax (vb)
Public Class MetricConfig
Inherits Object
Implements IMetricConfig
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudWatch;
using Amazon.CDK;
Metric metric;
var renderingProperties;
var value;
var metricConfig = new MetricConfig {
MathExpression = new MetricExpressionConfig {
Expression = "expression",
Period = 123,
UsingMetrics = new Dictionary<string, IMetric> {
{ "usingMetricsKey", metric }
},
// the properties below are optional
SearchAccount = "searchAccount",
SearchRegion = "searchRegion"
},
MetricStat = new MetricStatConfig {
MetricName = "metricName",
Namespace = "namespace",
Period = Duration.Minutes(30),
Statistic = "statistic",
// the properties below are optional
Account = "account",
Dimensions = new [] { new Dimension {
Name = "name",
Value = value
} },
Region = "region",
UnitFilter = Unit.SECONDS
},
RenderingProperties = new Dictionary<string, object> {
{ "renderingPropertiesKey", renderingProperties }
}
};
Synopsis
Constructors
MetricConfig() |
Properties
MathExpression | In case the metric is a math expression, the details of the math expression. |
MetricStat | In case the metric represents a query, the details of the query. |
RenderingProperties | Additional properties which will be rendered if the metric is used in a dashboard. |
Constructors
MetricConfig()
public MetricConfig()
Properties
MathExpression
In case the metric is a math expression, the details of the math expression.
public IMetricExpressionConfig MathExpression { get; set; }
Property Value
Remarks
Default: - None
MetricStat
In case the metric represents a query, the details of the query.
public IMetricStatConfig MetricStat { get; set; }
Property Value
Remarks
Default: - None
RenderingProperties
Additional properties which will be rendered if the metric is used in a dashboard.
public IDictionary<string, object> RenderingProperties { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Remarks
Examples are 'label' and 'color', but any key in here will be added to dashboard graphs.
Default: - None