Class CfnScalingPolicy.MetricProperty
Represents a specific metric.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.AWS.AutoScaling.dll
Syntax (csharp)
public class MetricProperty : Object, CfnScalingPolicy.IMetricProperty
Syntax (vb)
Public Class MetricProperty
Inherits Object
Implements CfnScalingPolicy.IMetricProperty
Remarks
Metric
is a property of the AWS::AutoScaling::ScalingPolicy MetricStat property type.
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 metricProperty = new MetricProperty {
MetricName = "metricName",
Namespace = "namespace",
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Name = "name",
Value = "value"
} }
};
Synopsis
Constructors
MetricProperty() |
Properties
Dimensions | The dimensions for the metric. |
MetricName | The name of the metric. |
Namespace | The namespace of the metric. |
Constructors
MetricProperty()
public MetricProperty()
Properties
Dimensions
The dimensions for the metric.
public object Dimensions { get; set; }
Property Value
System.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.
MetricName
The name of the metric.
public string MetricName { get; set; }
Property Value
System.String
Remarks
Namespace
The namespace of the metric.
public string Namespace { get; set; }
Property Value
System.String
Remarks
For more information, see the table in AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .