Class MetricStatConfig
Properties for a concrete metric.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.AWS.CloudWatch.dll
Syntax (csharp)
public class MetricStatConfig : Object, IMetricStatConfig
Syntax (vb)
Public Class MetricStatConfig
Inherits Object
Implements 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.AWS.CloudWatch;
using Amazon.CDK;
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
Constructors
MetricStatConfig() |
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. |
Constructors
MetricStatConfig()
public MetricStatConfig()
Properties
Account
Account which this metric comes from.
public string Account { get; set; }
Property Value
System.String
Remarks
Default: Deployment account.
Dimensions
The dimensions to apply to the alarm.
public IDimension[] Dimensions { get; set; }
Property Value
Remarks
Default: []
MetricName
Name of the metric.
public string MetricName { get; set; }
Property Value
System.String
Namespace
Namespace of the metric.
public string Namespace { get; set; }
Property Value
System.String
Period
Region
Region which this metric comes from.
public string Region { get; set; }
Property Value
System.String
Remarks
Default: Deployment region.
Statistic
Aggregation function to use (can be either simple or a percentile).
public string Statistic { get; set; }
Property Value
System.String
UnitFilter
Unit used to filter the metric stream.
public Nullable<Unit> UnitFilter { 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.
This field has been renamed from plain unit
to clearly communicate
its purpose.
Default: - Refer to all metric datums