Interface CfnInstanceGroupConfig.IAutoScalingPolicyProperty
AutoScalingPolicy
defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric.
Namespace: Amazon.CDK.AWS.EMR
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IAutoScalingPolicyProperty
Syntax (vb)
Public Interface IAutoScalingPolicyProperty
Remarks
For more information, see Using Automatic Scaling in Amazon EMR in the Amazon EMR Management Guide .
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EMR;
var autoScalingPolicyProperty = new AutoScalingPolicyProperty {
Constraints = new ScalingConstraintsProperty {
MaxCapacity = 123,
MinCapacity = 123
},
Rules = new [] { new ScalingRuleProperty {
Action = new ScalingActionProperty {
SimpleScalingPolicyConfiguration = new SimpleScalingPolicyConfigurationProperty {
ScalingAdjustment = 123,
// the properties below are optional
AdjustmentType = "adjustmentType",
CoolDown = 123
},
// the properties below are optional
Market = "market"
},
Name = "name",
Trigger = new ScalingTriggerProperty {
CloudWatchAlarmDefinition = new CloudWatchAlarmDefinitionProperty {
ComparisonOperator = "comparisonOperator",
MetricName = "metricName",
Period = 123,
Threshold = 123,
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Key = "key",
Value = "value"
} },
EvaluationPeriods = 123,
Namespace = "namespace",
Statistic = "statistic",
Unit = "unit"
}
},
// the properties below are optional
Description = "description"
} }
};
Synopsis
Properties
Constraints | The upper and lower Amazon EC2 instance limits for an automatic scaling policy. |
Rules | The scale-in and scale-out rules that comprise the automatic scaling policy. |
Properties
Constraints
The upper and lower Amazon EC2 instance limits for an automatic scaling policy.
object Constraints { get; }
Property Value
System.
Remarks
Automatic scaling activity will not cause an instance group to grow above or below these limits.
Rules
The scale-in and scale-out rules that comprise the automatic scaling policy.
object Rules { get; }
Property Value
System.