Show / Hide Table of Contents

Interface IMetricConfig

Properties of a rendered metric.

Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IMetricConfig
Syntax (vb)
Public Interface 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;
            using Amazon.CDK.AWS.CloudWatch;

            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",
                    AccountOverride = "accountOverride",
                    Dimensions = new [] { new Dimension {
                        Name = "name",
                        Value = value
                    } },
                    Region = "region",
                    RegionOverride = "regionOverride",
                    UnitFilter = Unit.SECONDS
                },
                RenderingProperties = new Dictionary<string, object> {
                    { "renderingPropertiesKey", renderingProperties }
                },
                SearchExpression = new MetricExpressionConfig {
                    Expression = "expression",
                    Period = 123,
                    UsingMetrics = new Dictionary<string, IMetric> {
                        { "usingMetricsKey", metric }
                    },

                    // the properties below are optional
                    SearchAccount = "searchAccount",
                    SearchRegion = "searchRegion"
                }
            };

Synopsis

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.

SearchExpression

In case the metric is a search expression, the details of the search expression.

Properties

MathExpression

In case the metric is a math expression, the details of the math expression.

IMetricExpressionConfig? MathExpression { get; }
Property Value

IMetricExpressionConfig

Remarks

Default: - None

MetricStat

In case the metric represents a query, the details of the query.

IMetricStatConfig? MetricStat { get; }
Property Value

IMetricStatConfig

Remarks

Default: - None

RenderingProperties

Additional properties which will be rendered if the metric is used in a dashboard.

IDictionary<string, object>? RenderingProperties { get; }
Property Value

IDictionary<string, object>

Remarks

Examples are 'label' and 'color', but any key in here will be added to dashboard graphs.

Default: - None

SearchExpression

In case the metric is a search expression, the details of the search expression.

IMetricExpressionConfig? SearchExpression { get; }
Property Value

IMetricExpressionConfig

Remarks

Default: - None

Back to top Generated by DocFX