Class EmrCreateCluster.ScalingRuleProperty
A scale-in or scale-out rule that defines scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ScalingRuleProperty : Object, EmrCreateCluster.IScalingRuleProperty
Syntax (vb)
Public Class ScalingRuleProperty
Inherits Object
Implements EmrCreateCluster.IScalingRuleProperty
Remarks
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_ScalingRule.html
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;
using Amazon.CDK.AWS.StepFunctions.Tasks;
var scalingRuleProperty = new ScalingRuleProperty {
Action = new ScalingActionProperty {
SimpleScalingPolicyConfiguration = new SimpleScalingPolicyConfigurationProperty {
ScalingAdjustment = 123,
// the properties below are optional
AdjustmentType = EmrCreateCluster.ScalingAdjustmentType.CHANGE_IN_CAPACITY,
CoolDown = 123
},
// the properties below are optional
Market = EmrCreateCluster.InstanceMarket.ON_DEMAND
},
Name = "name",
Trigger = new ScalingTriggerProperty {
CloudWatchAlarmDefinition = new CloudWatchAlarmDefinitionProperty {
ComparisonOperator = EmrCreateCluster.CloudWatchAlarmComparisonOperator.GREATER_THAN_OR_EQUAL,
MetricName = "metricName",
Period = Duration.Minutes(30),
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Key = "key",
Value = "value"
} },
EvaluationPeriods = 123,
Namespace = "namespace",
Statistic = EmrCreateCluster.CloudWatchAlarmStatistic.SAMPLE_COUNT,
Threshold = 123,
Unit = EmrCreateCluster.CloudWatchAlarmUnit.NONE
}
},
// the properties below are optional
Description = "description"
};
Synopsis
Constructors
ScalingRuleProperty() |
Properties
Action | The conditions that trigger an automatic scaling activity. |
Description | A friendly, more verbose description of the automatic scaling rule. |
Name | The name used to identify an automatic scaling rule. |
Trigger | The CloudWatch alarm definition that determines when automatic scaling activity is triggered. |
Constructors
ScalingRuleProperty()
public ScalingRuleProperty()
Properties
Action
The conditions that trigger an automatic scaling activity.
public EmrCreateCluster.IScalingActionProperty Action { get; set; }
Property Value
EmrCreateCluster.IScalingActionProperty
Description
A friendly, more verbose description of the automatic scaling rule.
public string Description { get; set; }
Property Value
System.String
Remarks
Default: - None
Name
The name used to identify an automatic scaling rule.
public string Name { get; set; }
Property Value
System.String
Remarks
Rule names must be unique within a scaling policy.
Trigger
The CloudWatch alarm definition that determines when automatic scaling activity is triggered.
public EmrCreateCluster.IScalingTriggerProperty Trigger { get; set; }
Property Value
EmrCreateCluster.IScalingTriggerProperty