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",
AccountOverride = "accountOverride",
Dimensions = new [] { new Dimension {
Name = "name",
Value = value
} },
Region = "region",
RegionOverride = "regionOverride",
UnitFilter = Unit.SECONDS
};
Synopsis
Properties
| Account | Account which this metric comes from. |
| AccountOverride | Account set directly on the metric, not inherited from the attached stack. |
| 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. |
| RegionOverride | Region set directly on the metric, not inherited from the attached stack. |
| 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.
string? Account { get; }
Property Value
Remarks
Default: Deployment account.
AccountOverride
Account set directly on the metric, not inherited from the attached stack.
string? AccountOverride { get; }
Property Value
Remarks
Default: No override.
Dimensions
The dimensions to apply to the alarm.
IDimension[]? Dimensions { get; }
Property Value
Remarks
Default: []
MetricName
Name of the metric.
string MetricName { get; }
Property Value
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
Namespace
Namespace of the metric.
string Namespace { get; }
Property Value
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
Period
How many seconds to aggregate over.
Duration Period { get; }
Property Value
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
Region
Region which this metric comes from.
string? Region { get; }
Property Value
Remarks
Default: Deployment region.
RegionOverride
Region set directly on the metric, not inherited from the attached stack.
string? RegionOverride { get; }
Property Value
Remarks
Default: No override.
Statistic
Aggregation function to use (can be either simple or a percentile).
string Statistic { get; }
Property Value
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
UnitFilter
Unit used to filter the metric stream.
Unit? UnitFilter { get; }
Property Value
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