Table of Contents

Class CfnScalingPolicy.MetricProperty

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

Represents a specific metric.

public class CfnScalingPolicy.MetricProperty : CfnScalingPolicy.IMetricProperty
Inheritance
CfnScalingPolicy.MetricProperty
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 metricProperty = new MetricProperty {
                 MetricName = "metricName",
                 Namespace = "namespace",

                 // the properties below are optional
                 Dimensions = new [] { new MetricDimensionProperty {
                     Name = "name",
                     Value = "value"
                 } }
             };

Remarks

Constructors

MetricProperty()

public MetricProperty()

Properties

Dimensions

The dimensions for the metric.

public object? Dimensions { get; set; }

Property Value

object

Remarks

For the list of available dimensions, see the AWS documentation available from the table in AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .

Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.

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

MetricName

The name of the metric.

public string MetricName { get; set; }

Property Value

string

Remarks

Namespace

The namespace of the metric.

public string Namespace { get; set; }

Property Value

string

Remarks