Interface CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty.Jsii$Proxy
- Enclosing class:
CfnScalingPolicy
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.
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.applicationautoscaling.*;
PredictiveScalingMetricSpecificationProperty predictiveScalingMetricSpecificationProperty = PredictiveScalingMetricSpecificationProperty.builder()
.targetValue(123)
// the properties below are optional
.customizedCapacityMetricSpecification(PredictiveScalingCustomizedCapacityMetricProperty.builder()
.metricDataQueries(List.of(PredictiveScalingMetricDataQueryProperty.builder()
.expression("expression")
.id("id")
.label("label")
.metricStat(PredictiveScalingMetricStatProperty.builder()
.metric(PredictiveScalingMetricProperty.builder()
.dimensions(List.of(PredictiveScalingMetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.metricName("metricName")
.namespace("namespace")
.build())
.stat("stat")
.unit("unit")
.build())
.returnData(false)
.build()))
.build())
.customizedLoadMetricSpecification(PredictiveScalingCustomizedLoadMetricProperty.builder()
.metricDataQueries(List.of(PredictiveScalingMetricDataQueryProperty.builder()
.expression("expression")
.id("id")
.label("label")
.metricStat(PredictiveScalingMetricStatProperty.builder()
.metric(PredictiveScalingMetricProperty.builder()
.dimensions(List.of(PredictiveScalingMetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.metricName("metricName")
.namespace("namespace")
.build())
.stat("stat")
.unit("unit")
.build())
.returnData(false)
.build()))
.build())
.customizedScalingMetricSpecification(PredictiveScalingCustomizedScalingMetricProperty.builder()
.metricDataQueries(List.of(PredictiveScalingMetricDataQueryProperty.builder()
.expression("expression")
.id("id")
.label("label")
.metricStat(PredictiveScalingMetricStatProperty.builder()
.metric(PredictiveScalingMetricProperty.builder()
.dimensions(List.of(PredictiveScalingMetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.metricName("metricName")
.namespace("namespace")
.build())
.stat("stat")
.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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classAn implementation forCfnScalingPolicy.PredictiveScalingMetricSpecificationProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default ObjectThe customized capacity metric specification.default ObjectThe customized load metric specification.default ObjectThe customized scaling metric specification.default ObjectThe predefined load metric specification.default ObjectThe predefined metric pair specification that determines the appropriate scaling metric and load metric to use.default ObjectThe predefined scaling metric specification.Specifies the target utilization.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getTargetValue
Specifies the target utilization.- See Also:
-
getCustomizedCapacityMetricSpecification
The customized capacity metric specification.Returns union: either
IResolvableorCfnScalingPolicy.PredictiveScalingCustomizedCapacityMetricProperty- See Also:
-
getCustomizedLoadMetricSpecification
The customized load metric specification.Returns union: either
IResolvableorCfnScalingPolicy.PredictiveScalingCustomizedLoadMetricProperty- See Also:
-
getCustomizedScalingMetricSpecification
The customized scaling metric specification.Returns union: either
IResolvableorCfnScalingPolicy.PredictiveScalingCustomizedScalingMetricProperty- See Also:
-
getPredefinedLoadMetricSpecification
The predefined load metric specification.Returns union: either
IResolvableorCfnScalingPolicy.PredictiveScalingPredefinedLoadMetricProperty- See Also:
-
getPredefinedMetricPairSpecification
The predefined metric pair specification that determines the appropriate scaling metric and load metric to use.Returns union: either
IResolvableorCfnScalingPolicy.PredictiveScalingPredefinedMetricPairProperty- See Also:
-
getPredefinedScalingMetricSpecification
The predefined scaling metric specification.Returns union: either
IResolvableorCfnScalingPolicy.PredictiveScalingPredefinedScalingMetricProperty- See Also:
-
builder
@Stability(Stable) static CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty.Builder builder()
-