SimpleScalingPolicyConfigurationProperty Struct
An automatic scaling configuration, which describes how the policy adds or removes instances, the cooldown period, and the number of EC2 instances that will be added each time the CloudWatch metric alarm condition is satisfied.
| Source | aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';
const simpleScalingPolicyConfigurationProperty: stepfunctions_tasks.EmrCreateCluster.SimpleScalingPolicyConfigurationProperty = {
scalingAdjustment: 123,
// the properties below are optional
adjustmentType: stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType.CHANGE_IN_CAPACITY,
coolDown: 123,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks
simple_scaling_policy_configuration_property = stepfunctions_tasks.EmrCreateCluster.SimpleScalingPolicyConfigurationProperty(
scaling_adjustment=123,
# the properties below are optional
adjustment_type=stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType.CHANGE_IN_CAPACITY,
cool_down=123
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.stepfunctions.tasks.*;
SimpleScalingPolicyConfigurationProperty simpleScalingPolicyConfigurationProperty = SimpleScalingPolicyConfigurationProperty.builder()
.scalingAdjustment(123)
// the properties below are optional
.adjustmentType(EmrCreateCluster.getScalingAdjustmentType().CHANGE_IN_CAPACITY)
.coolDown(123)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.StepFunctions.Tasks;
var simpleScalingPolicyConfigurationProperty = new SimpleScalingPolicyConfigurationProperty {
ScalingAdjustment = 123,
// the properties below are optional
AdjustmentType = EmrCreateCluster.ScalingAdjustmentType.CHANGE_IN_CAPACITY,
CoolDown = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
simpleScalingPolicyConfigurationProperty := &SimpleScalingPolicyConfigurationProperty{
ScalingAdjustment: jsii.Number(123),
// the properties below are optional
AdjustmentType: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType_CHANGE_IN_CAPACITY,
CoolDown: jsii.Number(123),
}
Properties
adjustmentTypeoptionalEmrCreateCluster.adjustment_typeoptionalScalingAdjustmentTypeadjustmentTypeoptionalScalingAdjustmentTypeAdjustmentTypeoptionalScalingAdjustmentTypeAdjustmentTypeoptionalScalingAdjustmentType = None #The way in which EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered.
coolDownoptionalnumbercool_downoptionalint | floatcoolDownoptionalNumberCoolDownoptionaldoubleCoolDownoptional*float64 = 0 #The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.
scalingAdjustmentnumberscaling_adjustmentint | floatscalingAdjustmentNumberScalingAdjustmentdoubleScalingAdjustment*float64 required #The amount by which to scale in or scale out, based on the specified AdjustmentType.
A positive value adds to the instance group's EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer.