Interface IMetricStatConfig
Properties for a concrete metric.
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IMetricStatConfig
Syntax (vb)
Public Interface IMetricStatConfig
Remarks
NOTE: unit
is no longer on this object since it is only used for Alarms
, and doesn't mean what one
would expect it to mean there anyway. It is most likely to be misused.
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;
var value;
var metricStatConfig = 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
};
Synopsis
Properties
Account | Account which this metric comes from. |
Dimensions | The dimensions to apply to the alarm. |
MetricName | Name of the metric. |
Namespace | Namespace of the metric. |
Period | How many seconds to aggregate over. |
Region | Region which this metric comes from. |
Statistic | Aggregation function to use (can be either simple or a percentile). |
UnitFilter | 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.
Dimensions
The dimensions to apply to the alarm.
virtual IDimension[] Dimensions { get; }
Property Value
Remarks
Default: []
MetricName
Name of the metric.
string MetricName { get; }
Property Value
System.String
Namespace
Namespace of the metric.
string Namespace { get; }
Property Value
System.String
Period
Region
Region which this metric comes from.
virtual string Region { get; }
Property Value
System.String
Remarks
Default: Deployment region.
Statistic
Aggregation function to use (can be either simple or a percentile).
string Statistic { get; }
Property Value
System.String
UnitFilter
Unit used to filter the metric stream.
virtual Nullable<Unit> UnitFilter { 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.
This field has been renamed from plain unit
to clearly communicate
its purpose.
Default: - Refer to all metric datums