Interface CfnCluster.AutoScalingPolicyProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnCluster.AutoScalingPolicyProperty.Jsii$Proxy
- Enclosing class:
- CfnCluster
@Stability(Stable)
public static interface CfnCluster.AutoScalingPolicyProperty
extends software.amazon.jsii.JsiiSerializable
AutoScalingPolicy is a subproperty of InstanceGroupConfig .
AutoScalingPolicy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. For more information, see Using Automatic Scaling in Amazon EMR in the Amazon EMR Management 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.emr.*;
AutoScalingPolicyProperty autoScalingPolicyProperty = AutoScalingPolicyProperty.builder()
.constraints(ScalingConstraintsProperty.builder()
.maxCapacity(123)
.minCapacity(123)
.build())
.rules(List.of(ScalingRuleProperty.builder()
.action(ScalingActionProperty.builder()
.simpleScalingPolicyConfiguration(SimpleScalingPolicyConfigurationProperty.builder()
.scalingAdjustment(123)
// the properties below are optional
.adjustmentType("adjustmentType")
.coolDown(123)
.build())
// the properties below are optional
.market("market")
.build())
.name("name")
.trigger(ScalingTriggerProperty.builder()
.cloudWatchAlarmDefinition(CloudWatchAlarmDefinitionProperty.builder()
.comparisonOperator("comparisonOperator")
.metricName("metricName")
.period(123)
.threshold(123)
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.key("key")
.value("value")
.build()))
.evaluationPeriods(123)
.namespace("namespace")
.statistic("statistic")
.unit("unit")
.build())
.build())
// the properties below are optional
.description("description")
.build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnCluster.AutoScalingPolicyPropertystatic final classAn implementation forCfnCluster.AutoScalingPolicyProperty -
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getConstraints
The upper and lower Amazon EC2 instance limits for an automatic scaling policy.Automatic scaling activity will not cause an instance group to grow above or below these limits.
-
getRules
The scale-in and scale-out rules that comprise the automatic scaling policy. -
builder
-