Class SimpleScalingPolicyConfiguration
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<SimpleScalingPolicyConfiguration.Builder,SimpleScalingPolicyConfiguration>
An automatic scaling configuration, which describes how the policy adds or removes instances, the cooldown period, and the number of Amazon EC2 instances that will be added each time the CloudWatch metric alarm condition is satisfied.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal AdjustmentTypeThe way in which Amazon EC2 instances are added (ifScalingAdjustmentis a positive number) or terminated (ifScalingAdjustmentis a negative number) each time the scaling activity is triggered.final StringThe way in which Amazon EC2 instances are added (ifScalingAdjustmentis a positive number) or terminated (ifScalingAdjustmentis a negative number) each time the scaling activity is triggered.builder()final IntegercoolDown()The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final IntegerThe amount by which to scale in or scale out, based on the specifiedAdjustmentType.static Class<? extends SimpleScalingPolicyConfiguration.Builder> Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
adjustmentType
The way in which Amazon EC2 instances are added (if
ScalingAdjustmentis a positive number) or terminated (ifScalingAdjustmentis a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITYis the default.CHANGE_IN_CAPACITYindicates that the Amazon EC2 instance count increments or decrements byScalingAdjustment, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITYindicates the instance count increments or decrements by the percentage specified byScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity.EXACT_CAPACITYindicates the scaling activity results in an instance group with the number of Amazon EC2 instances specified byScalingAdjustment, which should be expressed as a positive integer.If the service returns an enum value that is not available in the current SDK version,
adjustmentTypewill returnAdjustmentType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromadjustmentTypeAsString().- Returns:
- The way in which Amazon EC2 instances are added (if
ScalingAdjustmentis a positive number) or terminated (ifScalingAdjustmentis a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITYis the default.CHANGE_IN_CAPACITYindicates that the Amazon EC2 instance count increments or decrements byScalingAdjustment, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITYindicates the instance count increments or decrements by the percentage specified byScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity.EXACT_CAPACITYindicates the scaling activity results in an instance group with the number of Amazon EC2 instances specified byScalingAdjustment, which should be expressed as a positive integer. - See Also:
-
adjustmentTypeAsString
The way in which Amazon EC2 instances are added (if
ScalingAdjustmentis a positive number) or terminated (ifScalingAdjustmentis a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITYis the default.CHANGE_IN_CAPACITYindicates that the Amazon EC2 instance count increments or decrements byScalingAdjustment, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITYindicates the instance count increments or decrements by the percentage specified byScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity.EXACT_CAPACITYindicates the scaling activity results in an instance group with the number of Amazon EC2 instances specified byScalingAdjustment, which should be expressed as a positive integer.If the service returns an enum value that is not available in the current SDK version,
adjustmentTypewill returnAdjustmentType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromadjustmentTypeAsString().- Returns:
- The way in which Amazon EC2 instances are added (if
ScalingAdjustmentis a positive number) or terminated (ifScalingAdjustmentis a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITYis the default.CHANGE_IN_CAPACITYindicates that the Amazon EC2 instance count increments or decrements byScalingAdjustment, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITYindicates the instance count increments or decrements by the percentage specified byScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity.EXACT_CAPACITYindicates the scaling activity results in an instance group with the number of Amazon EC2 instances specified byScalingAdjustment, which should be expressed as a positive integer. - See Also:
-
scalingAdjustment
The amount by which to scale in or scale out, based on the specified
AdjustmentType. A positive value adds to the instance group's Amazon EC2 instance count while a negative number removes instances. IfAdjustmentTypeis set toEXACT_CAPACITY, the number should only be a positive integer. IfAdjustmentTypeis set toPERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.- Returns:
- The amount by which to scale in or scale out, based on the specified
AdjustmentType. A positive value adds to the instance group's Amazon EC2 instance count while a negative number removes instances. IfAdjustmentTypeis set toEXACT_CAPACITY, the number should only be a positive integer. IfAdjustmentTypeis set toPERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.
-
coolDown
The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.
- Returns:
- The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<SimpleScalingPolicyConfiguration.Builder,SimpleScalingPolicyConfiguration> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-