@Generated(value="software.amazon.awssdk:codegen") public final class RefreshPreferences extends Object implements SdkPojo, Serializable, ToCopyableBuilder<RefreshPreferences.Builder,RefreshPreferences>
Describes the preferences for an instance refresh.
| Modifier and Type | Class and Description |
|---|---|
static interface |
RefreshPreferences.Builder |
| Modifier and Type | Method and Description |
|---|---|
AlarmSpecification |
alarmSpecification()
(Optional) The CloudWatch alarm specification.
|
Boolean |
autoRollback()
(Optional) Indicates whether to roll back the Auto Scaling group to its previous configuration if the instance
refresh fails or a CloudWatch alarm threshold is met.
|
static RefreshPreferences.Builder |
builder() |
Integer |
checkpointDelay()
(Optional) The amount of time, in seconds, to wait after a checkpoint before continuing.
|
List<Integer> |
checkpointPercentages()
(Optional) Threshold values for each checkpoint in ascending order.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasCheckpointPercentages()
For responses, this returns true if the service returned a value for the CheckpointPercentages property.
|
int |
hashCode() |
Integer |
instanceWarmup()
A time period, in seconds, during which an instance refresh waits before moving on to replacing the next instance
after a new instance enters the
InService state. |
Integer |
minHealthyPercentage()
The amount of capacity in the Auto Scaling group that must pass your group's health checks to allow the operation
to continue.
|
ScaleInProtectedInstances |
scaleInProtectedInstances()
Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances protected from scale in are found.
|
String |
scaleInProtectedInstancesAsString()
Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances protected from scale in are found.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends RefreshPreferences.Builder> |
serializableBuilderClass() |
Boolean |
skipMatching()
(Optional) Indicates whether skip matching is enabled.
|
StandbyInstances |
standbyInstances()
Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances in
Standby state are
found. |
String |
standbyInstancesAsString()
Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances in
Standby state are
found. |
RefreshPreferences.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final Integer minHealthyPercentage()
The amount of capacity in the Auto Scaling group that must pass your group's health checks to allow the operation
to continue. The value is expressed as a percentage of the desired capacity of the Auto Scaling group (rounded up
to the nearest integer). The default is 90.
Setting the minimum healthy percentage to 100 percent limits the rate of replacement to one instance at a time. In contrast, setting it to 0 percent has the effect of replacing all instances at the same time.
90.
Setting the minimum healthy percentage to 100 percent limits the rate of replacement to one instance at a time. In contrast, setting it to 0 percent has the effect of replacing all instances at the same time.
public final Integer instanceWarmup()
A time period, in seconds, during which an instance refresh waits before moving on to replacing the next instance
after a new instance enters the InService state.
This property is not required for normal usage. Instead, use the DefaultInstanceWarmup property of
the Auto Scaling group. The InstanceWarmup and DefaultInstanceWarmup properties work
the same way. Only specify this property if you must override the DefaultInstanceWarmup property.
If you do not specify this property, the instance warmup by default is the value of the
DefaultInstanceWarmup property, if defined (which is recommended in all cases), or the
HealthCheckGracePeriod property otherwise.
InService state.
This property is not required for normal usage. Instead, use the DefaultInstanceWarmup
property of the Auto Scaling group. The InstanceWarmup and
DefaultInstanceWarmup properties work the same way. Only specify this property if you must
override the DefaultInstanceWarmup property.
If you do not specify this property, the instance warmup by default is the value of the
DefaultInstanceWarmup property, if defined (which is recommended in all cases), or the
HealthCheckGracePeriod property otherwise.
public final boolean hasCheckpointPercentages()
isEmpty() method on the
property). This is useful because the SDK will never return a null collection or map, but you may need to
differentiate between the service returning nothing (or null) and the service returning an empty collection or
map. For requests, this returns true if a value for the property was specified in the request builder, and false
if a value was not specified.public final List<Integer> checkpointPercentages()
(Optional) Threshold values for each checkpoint in ascending order. Each number must be unique. To replace all
instances in the Auto Scaling group, the last number in the array must be 100.
For usage examples, see Adding checkpoints to an instance refresh in the Amazon EC2 Auto Scaling User Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasCheckpointPercentages() method.
100
.
For usage examples, see Adding checkpoints to an instance refresh in the Amazon EC2 Auto Scaling User Guide.
public final Integer checkpointDelay()
(Optional) The amount of time, in seconds, to wait after a checkpoint before continuing. This property is
optional, but if you specify a value for it, you must also specify a value for CheckpointPercentages
. If you specify a value for CheckpointPercentages and not for CheckpointDelay, the
CheckpointDelay defaults to 3600 (1 hour).
CheckpointPercentages. If you specify a value for CheckpointPercentages and not
for CheckpointDelay, the CheckpointDelay defaults to 3600 (1
hour).public final Boolean skipMatching()
(Optional) Indicates whether skip matching is enabled. If enabled (true), then Amazon EC2 Auto
Scaling skips replacing instances that match the desired configuration. If no desired configuration is specified,
then it skips replacing instances that have the same launch template and instance types that the Auto Scaling
group was using before the start of the instance refresh. The default is false.
For more information, see Use an instance refresh with skip matching in the Amazon EC2 Auto Scaling User Guide.
true), then Amazon EC2
Auto Scaling skips replacing instances that match the desired configuration. If no desired configuration
is specified, then it skips replacing instances that have the same launch template and instance types
that the Auto Scaling group was using before the start of the instance refresh. The default is
false.
For more information, see Use an instance refresh with skip matching in the Amazon EC2 Auto Scaling User Guide.
public final Boolean autoRollback()
(Optional) Indicates whether to roll back the Auto Scaling group to its previous configuration if the instance
refresh fails or a CloudWatch alarm threshold is met. The default is false.
A rollback is not supported in the following situations:
There is no desired configuration specified for the instance refresh.
The Auto Scaling group has a launch template that uses an Amazon Web Services Systems Manager parameter instead
of an AMI ID for the ImageId property.
The Auto Scaling group uses the launch template's $Latest or $Default version.
For more information, see Undo changes with a rollback in the Amazon EC2 Auto Scaling User Guide.
false.
A rollback is not supported in the following situations:
There is no desired configuration specified for the instance refresh.
The Auto Scaling group has a launch template that uses an Amazon Web Services Systems Manager parameter
instead of an AMI ID for the ImageId property.
The Auto Scaling group uses the launch template's $Latest or $Default version.
For more information, see Undo changes with a rollback in the Amazon EC2 Auto Scaling User Guide.
public final ScaleInProtectedInstances scaleInProtectedInstances()
Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances protected from scale in are found.
The following lists the valid values:
Amazon EC2 Auto Scaling replaces instances that are protected from scale in.
Amazon EC2 Auto Scaling ignores instances that are protected from scale in and continues to replace instances that are not protected.
Amazon EC2 Auto Scaling waits one hour for you to remove scale-in protection. Otherwise, the instance refresh will fail.
If the service returns an enum value that is not available in the current SDK version,
scaleInProtectedInstances will return ScaleInProtectedInstances.UNKNOWN_TO_SDK_VERSION. The raw
value returned by the service is available from scaleInProtectedInstancesAsString().
The following lists the valid values:
Amazon EC2 Auto Scaling replaces instances that are protected from scale in.
Amazon EC2 Auto Scaling ignores instances that are protected from scale in and continues to replace instances that are not protected.
Amazon EC2 Auto Scaling waits one hour for you to remove scale-in protection. Otherwise, the instance refresh will fail.
ScaleInProtectedInstancespublic final String scaleInProtectedInstancesAsString()
Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances protected from scale in are found.
The following lists the valid values:
Amazon EC2 Auto Scaling replaces instances that are protected from scale in.
Amazon EC2 Auto Scaling ignores instances that are protected from scale in and continues to replace instances that are not protected.
Amazon EC2 Auto Scaling waits one hour for you to remove scale-in protection. Otherwise, the instance refresh will fail.
If the service returns an enum value that is not available in the current SDK version,
scaleInProtectedInstances will return ScaleInProtectedInstances.UNKNOWN_TO_SDK_VERSION. The raw
value returned by the service is available from scaleInProtectedInstancesAsString().
The following lists the valid values:
Amazon EC2 Auto Scaling replaces instances that are protected from scale in.
Amazon EC2 Auto Scaling ignores instances that are protected from scale in and continues to replace instances that are not protected.
Amazon EC2 Auto Scaling waits one hour for you to remove scale-in protection. Otherwise, the instance refresh will fail.
ScaleInProtectedInstancespublic final StandbyInstances standbyInstances()
Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances in Standby state are
found.
The following lists the valid values:
Amazon EC2 Auto Scaling terminates instances that are in Standby.
Amazon EC2 Auto Scaling ignores instances that are in Standby and continues to replace instances
that are in the InService state.
Amazon EC2 Auto Scaling waits one hour for you to return the instances to service. Otherwise, the instance refresh will fail.
If the service returns an enum value that is not available in the current SDK version, standbyInstances
will return StandbyInstances.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available
from standbyInstancesAsString().
Standby
state are found.
The following lists the valid values:
Amazon EC2 Auto Scaling terminates instances that are in Standby.
Amazon EC2 Auto Scaling ignores instances that are in Standby and continues to replace
instances that are in the InService state.
Amazon EC2 Auto Scaling waits one hour for you to return the instances to service. Otherwise, the instance refresh will fail.
StandbyInstancespublic final String standbyInstancesAsString()
Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances in Standby state are
found.
The following lists the valid values:
Amazon EC2 Auto Scaling terminates instances that are in Standby.
Amazon EC2 Auto Scaling ignores instances that are in Standby and continues to replace instances
that are in the InService state.
Amazon EC2 Auto Scaling waits one hour for you to return the instances to service. Otherwise, the instance refresh will fail.
If the service returns an enum value that is not available in the current SDK version, standbyInstances
will return StandbyInstances.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available
from standbyInstancesAsString().
Standby
state are found.
The following lists the valid values:
Amazon EC2 Auto Scaling terminates instances that are in Standby.
Amazon EC2 Auto Scaling ignores instances that are in Standby and continues to replace
instances that are in the InService state.
Amazon EC2 Auto Scaling waits one hour for you to return the instances to service. Otherwise, the instance refresh will fail.
StandbyInstancespublic final AlarmSpecification alarmSpecification()
(Optional) The CloudWatch alarm specification. CloudWatch alarms can be used to identify any issues and fail the operation if an alarm threshold is met.
public RefreshPreferences.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<RefreshPreferences.Builder,RefreshPreferences>public static RefreshPreferences.Builder builder()
public static Class<? extends RefreshPreferences.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.