@Stability(value=Stable)
public static interface CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty
extends software.amazon.jsii.JsiiSerializable
For more information, see Predictive scaling in the Amazon EC2 Auto Scaling User Guide .
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.*;
PredictiveScalingMetricSpecificationProperty predictiveScalingMetricSpecificationProperty = PredictiveScalingMetricSpecificationProperty.builder()
.targetValue(123)
// the properties below are optional
.customizedCapacityMetricSpecification(PredictiveScalingCustomizedCapacityMetricProperty.builder()
.metricDataQueries(List.of(MetricDataQueryProperty.builder()
.id("id")
// the properties below are optional
.expression("expression")
.label("label")
.metricStat(MetricStatProperty.builder()
.metric(MetricProperty.builder()
.metricName("metricName")
.namespace("namespace")
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.stat("stat")
// the properties below are optional
.unit("unit")
.build())
.returnData(false)
.build()))
.build())
.customizedLoadMetricSpecification(PredictiveScalingCustomizedLoadMetricProperty.builder()
.metricDataQueries(List.of(MetricDataQueryProperty.builder()
.id("id")
// the properties below are optional
.expression("expression")
.label("label")
.metricStat(MetricStatProperty.builder()
.metric(MetricProperty.builder()
.metricName("metricName")
.namespace("namespace")
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.stat("stat")
// the properties below are optional
.unit("unit")
.build())
.returnData(false)
.build()))
.build())
.customizedScalingMetricSpecification(PredictiveScalingCustomizedScalingMetricProperty.builder()
.metricDataQueries(List.of(MetricDataQueryProperty.builder()
.id("id")
// the properties below are optional
.expression("expression")
.label("label")
.metricStat(MetricStatProperty.builder()
.metric(MetricProperty.builder()
.metricName("metricName")
.namespace("namespace")
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.stat("stat")
// the properties below are optional
.unit("unit")
.build())
.returnData(false)
.build()))
.build())
.predefinedLoadMetricSpecification(PredictiveScalingPredefinedLoadMetricProperty.builder()
.predefinedMetricType("predefinedMetricType")
// the properties below are optional
.resourceLabel("resourceLabel")
.build())
.predefinedMetricPairSpecification(PredictiveScalingPredefinedMetricPairProperty.builder()
.predefinedMetricType("predefinedMetricType")
// the properties below are optional
.resourceLabel("resourceLabel")
.build())
.predefinedScalingMetricSpecification(PredictiveScalingPredefinedScalingMetricProperty.builder()
.predefinedMetricType("predefinedMetricType")
// the properties below are optional
.resourceLabel("resourceLabel")
.build())
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty.Builder
|
static class |
CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty.Jsii$Proxy
An implementation for
CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty.Builder |
builder() |
default Object |
getCustomizedCapacityMetricSpecification()
The customized capacity metric specification.
|
default Object |
getCustomizedLoadMetricSpecification()
The customized load metric specification.
|
default Object |
getCustomizedScalingMetricSpecification()
The customized scaling metric specification.
|
default Object |
getPredefinedLoadMetricSpecification()
The load metric specification.
|
default Object |
getPredefinedMetricPairSpecification()
The metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling metric and load metric to use.
|
default Object |
getPredefinedScalingMetricSpecification()
The scaling metric specification.
|
Number |
getTargetValue()
Specifies the target utilization.
|
@Stability(value=Stable) @NotNull Number getTargetValue()
Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.
@Stability(value=Stable) @Nullable default Object getCustomizedCapacityMetricSpecification()
@Stability(value=Stable) @Nullable default Object getCustomizedLoadMetricSpecification()
@Stability(value=Stable) @Nullable default Object getCustomizedScalingMetricSpecification()
@Stability(value=Stable) @Nullable default Object getPredefinedLoadMetricSpecification()
If you specify PredefinedMetricPairSpecification , don't specify this property.
@Stability(value=Stable) @Nullable default Object getPredefinedMetricPairSpecification()
With predictive scaling, you must specify either a metric pair, or a load metric and a scaling metric individually. Specifying a metric pair instead of individual metrics provides a simpler way to configure metrics for a scaling policy. You choose the metric pair, and the policy automatically knows the correct sum and average statistics to use for the load metric and the scaling metric.
@Stability(value=Stable) @Nullable default Object getPredefinedScalingMetricSpecification()
If you specify PredefinedMetricPairSpecification , don't specify this property.
@Stability(value=Stable) static CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty.Builder builder()
Copyright © 2022. All rights reserved.