Struct aws_sdk_autoscaling::types::RefreshPreferences
source · #[non_exhaustive]pub struct RefreshPreferences {
pub min_healthy_percentage: Option<i32>,
pub instance_warmup: Option<i32>,
pub checkpoint_percentages: Option<Vec<i32>>,
pub checkpoint_delay: Option<i32>,
pub skip_matching: Option<bool>,
pub auto_rollback: Option<bool>,
pub scale_in_protected_instances: Option<ScaleInProtectedInstances>,
pub standby_instances: Option<StandbyInstances>,
pub alarm_specification: Option<AlarmSpecification>,
}Expand description
Describes the preferences for an instance refresh.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.min_healthy_percentage: Option<i32>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.
instance_warmup: Option<i32>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.
checkpoint_percentages: Option<Vec<i32>>(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.
checkpoint_delay: Option<i32>(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).
skip_matching: Option<bool>(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.
auto_rollback: Option<bool>(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
ImageIdproperty. -
The Auto Scaling group uses the launch template's
$Latestor$Defaultversion.
For more information, see Undo changes with a rollback in the Amazon EC2 Auto Scaling User Guide.
scale_in_protected_instances: Option<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:
- Refresh
-
Amazon EC2 Auto Scaling replaces instances that are protected from scale in.
- Ignore
-
Amazon EC2 Auto Scaling ignores instances that are protected from scale in and continues to replace instances that are not protected.
- Wait (default)
-
Amazon EC2 Auto Scaling waits one hour for you to remove scale-in protection. Otherwise, the instance refresh will fail.
standby_instances: Option<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:
- Terminate
-
Amazon EC2 Auto Scaling terminates instances that are in
Standby. - Ignore
-
Amazon EC2 Auto Scaling ignores instances that are in
Standbyand continues to replace instances that are in theInServicestate. - Wait (default)
-
Amazon EC2 Auto Scaling waits one hour for you to return the instances to service. Otherwise, the instance refresh will fail.
alarm_specification: Option<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.
Implementations§
source§impl RefreshPreferences
impl RefreshPreferences
sourcepub fn min_healthy_percentage(&self) -> Option<i32>
pub fn min_healthy_percentage(&self) -> Option<i32>
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.
sourcepub fn instance_warmup(&self) -> Option<i32>
pub fn instance_warmup(&self) -> Option<i32>
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.
sourcepub fn checkpoint_percentages(&self) -> &[i32]
pub fn checkpoint_percentages(&self) -> &[i32]
(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.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .checkpoint_percentages.is_none().
sourcepub fn checkpoint_delay(&self) -> Option<i32>
pub fn checkpoint_delay(&self) -> Option<i32>
(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).
sourcepub fn skip_matching(&self) -> Option<bool>
pub fn skip_matching(&self) -> Option<bool>
(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.
sourcepub fn auto_rollback(&self) -> Option<bool>
pub fn auto_rollback(&self) -> Option<bool>
(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
ImageIdproperty. -
The Auto Scaling group uses the launch template's
$Latestor$Defaultversion.
For more information, see Undo changes with a rollback in the Amazon EC2 Auto Scaling User Guide.
sourcepub fn scale_in_protected_instances(&self) -> Option<&ScaleInProtectedInstances>
pub fn scale_in_protected_instances(&self) -> Option<&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:
- Refresh
-
Amazon EC2 Auto Scaling replaces instances that are protected from scale in.
- Ignore
-
Amazon EC2 Auto Scaling ignores instances that are protected from scale in and continues to replace instances that are not protected.
- Wait (default)
-
Amazon EC2 Auto Scaling waits one hour for you to remove scale-in protection. Otherwise, the instance refresh will fail.
sourcepub fn standby_instances(&self) -> Option<&StandbyInstances>
pub fn standby_instances(&self) -> Option<&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:
- Terminate
-
Amazon EC2 Auto Scaling terminates instances that are in
Standby. - Ignore
-
Amazon EC2 Auto Scaling ignores instances that are in
Standbyand continues to replace instances that are in theInServicestate. - Wait (default)
-
Amazon EC2 Auto Scaling waits one hour for you to return the instances to service. Otherwise, the instance refresh will fail.
sourcepub fn alarm_specification(&self) -> Option<&AlarmSpecification>
pub fn alarm_specification(&self) -> Option<&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.
source§impl RefreshPreferences
impl RefreshPreferences
sourcepub fn builder() -> RefreshPreferencesBuilder
pub fn builder() -> RefreshPreferencesBuilder
Creates a new builder-style object to manufacture RefreshPreferences.
Trait Implementations§
source§impl Clone for RefreshPreferences
impl Clone for RefreshPreferences
source§fn clone(&self) -> RefreshPreferences
fn clone(&self) -> RefreshPreferences
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for RefreshPreferences
impl Debug for RefreshPreferences
source§impl PartialEq for RefreshPreferences
impl PartialEq for RefreshPreferences
source§fn eq(&self, other: &RefreshPreferences) -> bool
fn eq(&self, other: &RefreshPreferences) -> bool
self and other values to be equal, and is used
by ==.