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",
        Dimensions = new [] { new Dimension {
            Name = "name",
            Value = value
        } },
        Region = "region",
        UnitFilter = Unit.SECONDS
    },
    RenderingProperties = new Dictionary<string, object> {
        { "renderingPropertiesKey", renderingProperties }
    }
};

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.

Properties

MathExpression

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

virtual IMetricExpressionConfig MathExpression { get; }
Property Value

IMetricExpressionConfig

Remarks

Default: - None

MetricStat

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

virtual IMetricStatConfig MetricStat { get; }
Property Value

IMetricStatConfig

Remarks

Default: - None

RenderingProperties

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

virtual IDictionary<string, object> RenderingProperties { get; }
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

Back to top Generated by DocFX