Class CommonMetricOptions
Options shared by most methods accepting metric options.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.AWS.CloudWatch.dll
Syntax (csharp)
public class CommonMetricOptions : Object, ICommonMetricOptions
Syntax (vb)
Public Class CommonMetricOptions
Inherits Object
Implements ICommonMetricOptions
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;
var dimensions;
var commonMetricOptions = new CommonMetricOptions {
Account = "account",
Color = "color",
Dimensions = new Dictionary<string, object> {
{ "dimensionsKey", dimensions }
},
DimensionsMap = new Dictionary<string, string> {
{ "dimensionsMapKey", "dimensionsMap" }
},
Label = "label",
Period = Duration.Minutes(30),
Region = "region",
Statistic = "statistic",
Unit = Unit.SECONDS
};
Synopsis
Constructors
CommonMetricOptions() |
Properties
Account | Account which this metric comes from. |
Color | The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The |
Dimensions | (deprecated) Dimensions of the metric. |
DimensionsMap | Dimensions of the metric. |
Label | Label for this metric when added to a Graph in a Dashboard. |
Period | The period over which the specified statistic is applied. |
Region | Region which this metric comes from. |
Statistic | What function to use for aggregating. |
Unit | Unit used to filter the metric stream. |
Constructors
CommonMetricOptions()
public CommonMetricOptions()
Properties
Account
Account which this metric comes from.
public string Account { get; set; }
Property Value
System.String
Remarks
Default: - Deployment account.
Color
The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The Color
class has a set of standard colors that can be used here.
public string Color { get; set; }
Property Value
System.String
Remarks
Default: - Automatic color
Dimensions
(deprecated) Dimensions of the metric.
public IDictionary<string, object> Dimensions { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Remarks
Default: - No dimensions.
Stability: Deprecated
DimensionsMap
Dimensions of the metric.
public IDictionary<string, string> DimensionsMap { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - No dimensions.
Label
Label for this metric when added to a Graph in a Dashboard.
public string Label { get; set; }
Property Value
System.String
Remarks
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
Period
The period over which the specified statistic is applied.
public Duration Period { get; set; }
Property Value
Remarks
Default: Duration.minutes(5)
Region
Region which this metric comes from.
public string Region { get; set; }
Property Value
System.String
Remarks
Default: - Deployment region.
Statistic
What function to use for aggregating.
public string Statistic { get; set; }
Property Value
System.String
Remarks
Can be one of the following:
Default: Average
Unit
Unit used to filter the metric stream.
public Nullable<Unit> Unit { get; set; }
Property Value
System.Nullable<Unit>
Remarks
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