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 AdjustmentType
The way in which Amazon EC2 instances are added (ifScalingAdjustment
is a positive number) or terminated (ifScalingAdjustment
is a negative number) each time the scaling activity is triggered.final String
The way in which Amazon EC2 instances are added (ifScalingAdjustment
is a positive number) or terminated (ifScalingAdjustment
is a negative number) each time the scaling activity is triggered.builder()
final Integer
coolDown()
The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.final boolean
final boolean
equalsBySdkFields
(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 int
hashCode()
final Integer
The 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 String
toString()
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
ScalingAdjustment
is a positive number) or terminated (ifScalingAdjustment
is a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITY
is the default.CHANGE_IN_CAPACITY
indicates that the Amazon EC2 instance count increments or decrements byScalingAdjustment
, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITY
indicates 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_CAPACITY
indicates 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,
adjustmentType
will 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
ScalingAdjustment
is a positive number) or terminated (ifScalingAdjustment
is a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITY
is the default.CHANGE_IN_CAPACITY
indicates that the Amazon EC2 instance count increments or decrements byScalingAdjustment
, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITY
indicates 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_CAPACITY
indicates 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
ScalingAdjustment
is a positive number) or terminated (ifScalingAdjustment
is a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITY
is the default.CHANGE_IN_CAPACITY
indicates that the Amazon EC2 instance count increments or decrements byScalingAdjustment
, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITY
indicates 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_CAPACITY
indicates 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,
adjustmentType
will 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
ScalingAdjustment
is a positive number) or terminated (ifScalingAdjustment
is a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITY
is the default.CHANGE_IN_CAPACITY
indicates that the Amazon EC2 instance count increments or decrements byScalingAdjustment
, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITY
indicates 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_CAPACITY
indicates 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. IfAdjustmentType
is set toEXACT_CAPACITY
, the number should only be a positive integer. IfAdjustmentType
is 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. IfAdjustmentType
is set toEXACT_CAPACITY
, the number should only be a positive integer. IfAdjustmentType
is 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:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<SimpleScalingPolicyConfiguration.Builder,
SimpleScalingPolicyConfiguration> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in 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
-