@Stability(value=Stable)
public static interface CfnScalingPolicy.MetricProperty
extends software.amazon.jsii.JsiiSerializable
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 Object |
getDimensions()
The dimensions for the metric.
|
String |
getMetricName()
The name of the metric.
|
String |
getNamespace()
The namespace of the metric.
|
@Stability(value=Stable) @NotNull String getMetricName()
@Stability(value=Stable) @NotNull String getNamespace()
For more information, see the table in AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .
@Stability(value=Stable) @Nullable default 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.
@Stability(value=Stable) static CfnScalingPolicy.MetricProperty.Builder builder()
Copyright © 2022. All rights reserved.