public static interface CfnScalingPolicy.MetricProperty
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();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnScalingPolicy.MetricProperty.Builder
A builder for
CfnScalingPolicy.MetricProperty |
static class |
CfnScalingPolicy.MetricProperty.Jsii$Proxy
An implementation for
CfnScalingPolicy.MetricProperty |
Modifier and Type | Method and Description |
---|---|
static CfnScalingPolicy.MetricProperty.Builder |
builder() |
default java.lang.Object |
getDimensions()
The dimensions for the metric.
|
java.lang.String |
getMetricName()
The name of the metric.
|
java.lang.String |
getNamespace()
The namespace of the metric.
|
java.lang.String getMetricName()
java.lang.String getNamespace()
For more information, see the table in AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .
default java.lang.Object getDimensions()
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.
static CfnScalingPolicy.MetricProperty.Builder builder()