Interface CfnCluster.ScalingRuleProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnCluster.ScalingRuleProperty.Jsii$Proxy
Enclosing class:
CfnCluster

@Stability(Stable) public static interface CfnCluster.ScalingRuleProperty extends software.amazon.jsii.JsiiSerializable
ScalingRule is a subproperty of the AutoScalingPolicy property type.

ScalingRule defines the scale-in or scale-out rules for scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments. The automatic scaling policy for an instance group can comprise one or more automatic scaling rules.

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.*;
 ScalingRuleProperty scalingRuleProperty = 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();
 
  • Method Details

    • getAction

      @Stability(Stable) @NotNull Object getAction()
      The conditions that trigger an automatic scaling activity.
    • getName

      @Stability(Stable) @NotNull String getName()
      The name used to identify an automatic scaling rule.

      Rule names must be unique within a scaling policy.

    • getTrigger

      @Stability(Stable) @NotNull Object getTrigger()
      The CloudWatch alarm definition that determines when automatic scaling activity is triggered.
    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      A friendly, more verbose description of the automatic scaling rule.
    • builder

      @Stability(Stable) static CfnCluster.ScalingRuleProperty.Builder builder()
      Returns:
      a CfnCluster.ScalingRuleProperty.Builder of CfnCluster.ScalingRuleProperty