Interface CfnScalingPolicyPropsMixin.TargetTrackingConfigurationProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnScalingPolicyPropsMixin.TargetTrackingConfigurationProperty.Jsii$Proxy
- Enclosing class:
CfnScalingPolicyPropsMixin
TargetTrackingConfiguration is a property of the AWS::AutoScaling::ScalingPolicy resource that specifies a target tracking scaling policy configuration for Amazon EC2 Auto Scaling.
For more information about scaling policies, see Dynamic 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.cfnpropertymixins.services.autoscaling.*;
TargetTrackingConfigurationProperty targetTrackingConfigurationProperty = TargetTrackingConfigurationProperty.builder()
.customizedMetricSpecification(CustomizedMetricSpecificationProperty.builder()
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.metricName("metricName")
.metrics(List.of(TargetTrackingMetricDataQueryProperty.builder()
.expression("expression")
.id("id")
.label("label")
.metricStat(TargetTrackingMetricStatProperty.builder()
.metric(MetricProperty.builder()
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.metricName("metricName")
.namespace("namespace")
.build())
.period(123)
.stat("stat")
.unit("unit")
.build())
.period(123)
.returnData(false)
.build()))
.namespace("namespace")
.period(123)
.statistic("statistic")
.unit("unit")
.build())
.disableScaleIn(false)
.predefinedMetricSpecification(PredefinedMetricSpecificationProperty.builder()
.predefinedMetricType("predefinedMetricType")
.resourceLabel("resourceLabel")
.build())
.targetValue(123)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classAn implementation forCfnScalingPolicyPropsMixin.TargetTrackingConfigurationProperty -
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCustomizedMetricSpecification
A customized metric.You must specify either a predefined metric or a customized metric.
Returns union: either
IResolvableorCfnScalingPolicyPropsMixin.CustomizedMetricSpecificationProperty- See Also:
-
getDisableScaleIn
Indicates whether scaling in by the target tracking scaling policy is disabled.If scaling in is disabled, the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target tracking scaling policy can remove instances from the Auto Scaling group. The default is
false.Returns union: either
BooleanorIResolvable- See Also:
-
getPredefinedMetricSpecification
A predefined metric.You must specify either a predefined metric or a customized metric.
Returns union: either
IResolvableorCfnScalingPolicyPropsMixin.PredefinedMetricSpecificationProperty- See Also:
-
getTargetValue
The target value for the metric.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.
- See Also:
-
builder
@Stability(Stable) static CfnScalingPolicyPropsMixin.TargetTrackingConfigurationProperty.Builder builder()
-