@Stability(value=Stable)
public static interface CfnCluster.AutoScalingPolicyProperty
extends software.amazon.jsii.JsiiSerializable
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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnCluster.AutoScalingPolicyProperty.Builder
A builder for
CfnCluster.AutoScalingPolicyProperty |
static class |
CfnCluster.AutoScalingPolicyProperty.Jsii$Proxy
An implementation for
CfnCluster.AutoScalingPolicyProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnCluster.AutoScalingPolicyProperty.Builder |
builder() |
Object |
getConstraints()
The upper and lower EC2 instance limits for an automatic scaling policy.
|
Object |
getRules()
The scale-in and scale-out rules that comprise the automatic scaling policy.
|
@Stability(value=Stable) @NotNull Object getConstraints()
Automatic scaling activity will not cause an instance group to grow above or below these limits.
@Stability(value=Stable) @NotNull Object getRules()
@Stability(value=Stable) static CfnCluster.AutoScalingPolicyProperty.Builder builder()
Copyright © 2022. All rights reserved.