Interface CfnScalingPolicy.PredictiveScalingPolicyConfigurationProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnScalingPolicy.PredictiveScalingPolicyConfigurationProperty.Jsii$Proxy
- Enclosing class:
CfnScalingPolicy
Predictive scaling is supported on Amazon ECS services.
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.*;
PredictiveScalingPolicyConfigurationProperty predictiveScalingPolicyConfigurationProperty = PredictiveScalingPolicyConfigurationProperty.builder()
.metricSpecifications(List.of(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()))
// the properties below are optional
.maxCapacityBreachBehavior("maxCapacityBreachBehavior")
.maxCapacityBuffer(123)
.mode("mode")
.schedulingBufferTime(123)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classAn implementation forCfnScalingPolicy.PredictiveScalingPolicyConfigurationProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringDefines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity.default NumberThe size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity.This structure includes the metrics and target utilization to use for predictive scaling.default StringgetMode()The predictive scaling mode.default NumberThe amount of time, in seconds, that the start time can be advanced.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMetricSpecifications
This structure includes the metrics and target utilization to use for predictive scaling.This is an array, but we currently only support a single metric specification. That is, you can specify a target value and a single metric pair, or a target value and one scaling metric and one load metric.
Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnScalingPolicy.PredictiveScalingMetricSpecificationProperty>- See Also:
-
getMaxCapacityBreachBehavior
Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity.Defaults to
HonorMaxCapacityif not specified.- See Also:
-
getMaxCapacityBuffer
The size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity.The value is specified as a percentage relative to the forecast capacity. For example, if the buffer is 10, this means a 10 percent buffer, such that if the forecast capacity is 50, and the maximum capacity is 40, then the effective maximum capacity is 55.
Required if the
MaxCapacityBreachBehaviorproperty is set toIncreaseMaxCapacity, and cannot be used otherwise.- See Also:
-
getMode
The predictive scaling mode.Defaults to
ForecastOnlyif not specified.- See Also:
-
getSchedulingBufferTime
The amount of time, in seconds, that the start time can be advanced.The value must be less than the forecast interval duration of 3600 seconds (60 minutes). Defaults to 300 seconds if not specified.
- See Also:
-
builder
@Stability(Stable) static CfnScalingPolicy.PredictiveScalingPolicyConfigurationProperty.Builder builder()
-