Table of Contents

Class CfnScalingPolicy.MetricStatProperty

Namespace
Amazon.CDK.AWS.AutoScaling
Assembly
Amazon.CDK.AWS.AutoScaling.dll

MetricStat is a property of the AWS::AutoScaling::ScalingPolicy MetricDataQuery property type.

public class CfnScalingPolicy.MetricStatProperty : CfnScalingPolicy.IMetricStatProperty
Inheritance
CfnScalingPolicy.MetricStatProperty
Implements
Inherited Members

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"
             };

Remarks

This structure defines the CloudWatch metric to return, along with the statistic, period, and unit.

For more information about the CloudWatch terminology below, see Amazon CloudWatch concepts in the Amazon CloudWatch User Guide .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-metricstat.html

ExampleMetadata: fixture=_generated

Constructors

MetricStatProperty()

public MetricStatProperty()

Properties

Metric

The CloudWatch metric to return, including the metric name, namespace, and dimensions.

public object Metric { get; set; }

Property Value

object

Remarks

Stat

The statistic to return.

public string Stat { get; set; }

Property Value

string

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 .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-metricstat.html#cfn-autoscaling-scalingpolicy-metricstat-stat

Unit

The unit to use for the returned data points.

public string? Unit { get; set; }

Property Value

string

Remarks

For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-metricstat.html#cfn-autoscaling-scalingpolicy-metricstat-unit