Interface CfnScalingPolicy.IMetricStatProperty
MetricStat
is a property of the AWS::AutoScaling::ScalingPolicy MetricDataQuery property type.
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IMetricStatProperty
Syntax (vb)
Public Interface IMetricStatProperty
Remarks
This structure defines the CloudWatch metric to return, along with the statistic and unit.
For more information about the CloudWatch terminology below, see Amazon CloudWatch concepts in the Amazon CloudWatch User Guide .
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.AutoScaling;
var metricStatProperty = new MetricStatProperty {
Metric = new MetricProperty {
MetricName = "metricName",
Namespace = "namespace",
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Name = "name",
Value = "value"
} }
},
Stat = "stat",
// the properties below are optional
Unit = "unit"
};
Synopsis
Properties
Metric | The CloudWatch metric to return, including the metric name, namespace, and dimensions. |
Stat | The statistic to return. |
Unit | The unit to use for the returned data points. |
Properties
Metric
The CloudWatch metric to return, including the metric name, namespace, and dimensions.
object Metric { get; }
Property Value
System.
Remarks
To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics .
Stat
The statistic to return.
string Stat { get; }
Property Value
System.
Remarks
It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide .
The most commonly used metrics for predictive scaling are Average
and Sum
.
Unit
The unit to use for the returned data points.
virtual string Unit { get; }
Property Value
System.
Remarks
For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference .