Interface CfnScalingPolicy.MetricProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnScalingPolicy.MetricProperty.Jsii$Proxy
- Enclosing class:
CfnScalingPolicy
@Stability(Stable)
public static interface CfnScalingPolicy.MetricProperty
extends software.amazon.jsii.JsiiSerializable
Represents a specific metric.
Metric
is a property of the AWS::AutoScaling::ScalingPolicy MetricStat property type.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.autoscaling.*; MetricProperty metricProperty = MetricProperty.builder() .metricName("metricName") .namespace("namespace") // the properties below are optional .dimensions(List.of(MetricDimensionProperty.builder() .name("name") .value("value") .build())) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnScalingPolicy.MetricProperty
static final class
An implementation forCfnScalingPolicy.MetricProperty
-
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMetricName
The name of the metric.- See Also:
-
getNamespace
The namespace of the metric.For more information, see the table in AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .
- See Also:
-
getDimensions
The dimensions for the metric.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.
- See Also:
-
builder
-