@Generated(value="software.amazon.awssdk:codegen") public final class AutoScalingThresholds extends Object implements SdkPojo, Serializable, ToCopyableBuilder<AutoScalingThresholds.Builder,AutoScalingThresholds>
Describes a load-based auto scaling upscaling or downscaling threshold configuration, which specifies when AWS OpsWorks Stacks starts or stops load-based instances.
Modifier and Type | Class and Description |
---|---|
static interface |
AutoScalingThresholds.Builder |
Modifier and Type | Method and Description |
---|---|
List<String> |
alarms()
Custom Cloudwatch auto scaling alarms, to be used as thresholds.
|
static AutoScalingThresholds.Builder |
builder() |
Double |
cpuThreshold()
The CPU utilization threshold, as a percent of the available CPU.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj)
Indicates whether some other object is "equal to" this one by SDK fields.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasAlarms()
Returns true if the Alarms property was specified by the sender (it may be empty), or false if the sender did not
specify the value (it will be empty).
|
int |
hashCode() |
Integer |
ignoreMetricsTime()
The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks Stacks should ignore metrics and
suppress additional scaling events.
|
Integer |
instanceCount()
The number of instances to add or remove when the load exceeds a threshold.
|
Double |
loadThreshold()
The load threshold.
|
Double |
memoryThreshold()
The memory utilization threshold, as a percent of the available memory.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends AutoScalingThresholds.Builder> |
serializableBuilderClass() |
Integer |
thresholdsWaitTime()
The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
|
AutoScalingThresholds.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString()
Returns a string representation of this object.
|
copy
public final Integer instanceCount()
The number of instances to add or remove when the load exceeds a threshold.
public final Integer thresholdsWaitTime()
The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
public final Integer ignoreMetricsTime()
The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks Stacks should ignore metrics and
suppress additional scaling events. For example, AWS OpsWorks Stacks adds new instances following an upscaling
event but the instances won't start reducing the load until they have been booted and configured. There is no
point in raising additional scaling events during that operation, which typically takes several minutes.
IgnoreMetricsTime
allows you to direct AWS OpsWorks Stacks to suppress scaling events long enough to
get the new instances online.
IgnoreMetricsTime
allows you to direct AWS OpsWorks Stacks
to suppress scaling events long enough to get the new instances online.public final Double cpuThreshold()
The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
public final Double memoryThreshold()
The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
public final Double loadThreshold()
The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).
public final boolean hasAlarms()
public final List<String> alarms()
Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms
. You can
either have AWS OpsWorks Stacks update the role for you when you first use this feature or you can edit the role
manually. For more information, see Allowing AWS
OpsWorks Stacks to Act on Your Behalf.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasAlarms()
to see if a value was sent in this field.
To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms
.
You can either have AWS OpsWorks Stacks update the role for you when you first use this feature or you
can edit the role manually. For more information, see Allowing
AWS OpsWorks Stacks to Act on Your Behalf.
public AutoScalingThresholds.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<AutoScalingThresholds.Builder,AutoScalingThresholds>
public static AutoScalingThresholds.Builder builder()
public static Class<? extends AutoScalingThresholds.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
SdkPojo
SdkPojo
class,
and is generated based on a service model.
If an SdkPojo
class does not have any inherited fields, equalsBySdkFields
and equals
are essentially the same.
equalsBySdkFields
in interface SdkPojo
obj
- the object to be compared withpublic final String toString()
Copyright © 2021 Amazon Web Services, Inc. All Rights Reserved.