Interface CfnScalingPolicy.ICustomizedMetricSpecificationProperty
- Namespace
- Amazon.CDK.AWS.AutoScaling
- Assembly
- Amazon.CDK.AWS.AutoScaling.dll
Contains customized metric specification information for a target tracking scaling policy for Amazon EC2 Auto Scaling.
public interface CfnScalingPolicy.ICustomizedMetricSpecificationProperty
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 customizedMetricSpecificationProperty = new CustomizedMetricSpecificationProperty {
MetricName = "metricName",
Namespace = "namespace",
Statistic = "statistic",
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Name = "name",
Value = "value"
} },
Unit = "unit"
};
Remarks
To create your customized metric specification:
For more information about CloudWatch, see Amazon CloudWatch Concepts .
CustomizedMetricSpecification
is a property of the AWS::AutoScaling::ScalingPolicy TargetTrackingConfiguration property type.
ExampleMetadata: fixture=_generated
Properties
Dimensions
The dimensions of the metric.
object? Dimensions { get; }
Property Value
Remarks
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
MetricName
The name of the metric.
string MetricName { get; }
Property Value
Remarks
To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics .
Namespace
The namespace of the metric.
string Namespace { get; }
Property Value
Remarks
Statistic
The statistic of the metric.
string Statistic { get; }
Property Value
Remarks
Unit
The unit of the metric.
string? Unit { get; }
Property Value
Remarks
For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference .