Interface ICommonMetricOptions
Options shared by most methods accepting metric options.
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.AWS.CloudWatch.dll
Syntax (csharp)
public interface ICommonMetricOptions
Syntax (vb)
Public Interface 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
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. |
Properties
Account
Account which this metric comes from.
virtual string Account { get; }
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.
virtual string Color { get; }
Property Value
System.String
Remarks
Default: - Automatic color
Dimensions
(deprecated) Dimensions of the metric.
virtual IDictionary<string, object> Dimensions { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Remarks
Default: - No dimensions.
Stability: Deprecated
DimensionsMap
Dimensions of the metric.
virtual IDictionary<string, string> DimensionsMap { get; }
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.
virtual string Label { get; }
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.
virtual Duration Period { get; }
Property Value
Remarks
Default: Duration.minutes(5)
Region
Region which this metric comes from.
virtual string Region { get; }
Property Value
System.String
Remarks
Default: - Deployment region.
Statistic
What function to use for aggregating.
virtual string Statistic { get; }
Property Value
System.String
Remarks
Can be one of the following:
Default: Average
Unit
Unit used to filter the metric stream.
virtual Nullable<Unit> Unit { get; }
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