Interface CfnScalingPolicy.ICustomizedMetricSpecificationProperty
Contains customized metric specification information for a target tracking scaling policy for Amazon EC2 Auto Scaling.
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.AWS.AutoScaling.dll
Syntax (csharp)
public interface ICustomizedMetricSpecificationProperty
Syntax (vb)
Public Interface ICustomizedMetricSpecificationProperty
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
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"
};
Synopsis
Properties
| Dimensions | The dimensions of the metric. |
| MetricName | The name of the metric. |
| Namespace | The namespace of the metric. |
| Statistic | The statistic of the metric. |
| Unit | The unit of the metric. |
Properties
Dimensions
The dimensions of the metric.
virtual object Dimensions { get; }
Property Value
System.Object
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
System.String
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
System.String
Remarks
Statistic
The statistic of the metric.
string Statistic { get; }
Property Value
System.String
Remarks
Unit
The unit of the metric.
virtual string Unit { get; }
Property Value
System.String
Remarks
For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference .