Struct aws_sdk_autoscaling::operation::start_instance_refresh::builders::StartInstanceRefreshFluentBuilder
source · pub struct StartInstanceRefreshFluentBuilder { /* private fields */ }Expand description
Fluent builder constructing a request to StartInstanceRefresh.
Starts an instance refresh. During an instance refresh, Amazon EC2 Auto Scaling performs a rolling update of instances in an Auto Scaling group. Instances are terminated first and then replaced, which temporarily reduces the capacity available within your Auto Scaling group.
This operation is part of the instance refresh feature in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group. This feature is helpful, for example, when you have a new AMI or a new user data script. You just need to create a new launch template that specifies the new AMI or user data script. Then start an instance refresh to immediately begin the process of updating instances in the group.
If successful, the request's response contains a unique ID that you can use to track the progress of the instance refresh. To query its status, call the DescribeInstanceRefreshes API. To describe the instance refreshes that have already run, call the DescribeInstanceRefreshes API. To cancel an instance refresh that is in progress, use the CancelInstanceRefresh API.
An instance refresh might fail for several reasons, such as EC2 launch failures, misconfigured health checks, or not ignoring or allowing the termination of instances that are in Standby state or protected from scale in. You can monitor for failed EC2 launches using the scaling activities. To find the scaling activities, call the DescribeScalingActivities API.
If you enable auto rollback, your Auto Scaling group will be rolled back automatically when the instance refresh fails. You can enable this feature before starting an instance refresh by specifying the AutoRollback property in the instance refresh preferences. Otherwise, to roll back an instance refresh before it finishes, use the RollbackInstanceRefresh API.
Implementations§
source§impl StartInstanceRefreshFluentBuilder
impl StartInstanceRefreshFluentBuilder
sourcepub fn as_input(&self) -> &StartInstanceRefreshInputBuilder
pub fn as_input(&self) -> &StartInstanceRefreshInputBuilder
Access the StartInstanceRefresh as a reference.
sourcepub async fn send(
self
) -> Result<StartInstanceRefreshOutput, SdkError<StartInstanceRefreshError, HttpResponse>>
pub async fn send( self ) -> Result<StartInstanceRefreshOutput, SdkError<StartInstanceRefreshError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<StartInstanceRefreshOutput, StartInstanceRefreshError, Self>
pub fn customize( self ) -> CustomizableOperation<StartInstanceRefreshOutput, StartInstanceRefreshError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn auto_scaling_group_name(self, input: impl Into<String>) -> Self
pub fn auto_scaling_group_name(self, input: impl Into<String>) -> Self
The name of the Auto Scaling group.
sourcepub fn set_auto_scaling_group_name(self, input: Option<String>) -> Self
pub fn set_auto_scaling_group_name(self, input: Option<String>) -> Self
The name of the Auto Scaling group.
sourcepub fn get_auto_scaling_group_name(&self) -> &Option<String>
pub fn get_auto_scaling_group_name(&self) -> &Option<String>
The name of the Auto Scaling group.
sourcepub fn strategy(self, input: RefreshStrategy) -> Self
pub fn strategy(self, input: RefreshStrategy) -> Self
The strategy to use for the instance refresh. The only valid value is Rolling.
sourcepub fn set_strategy(self, input: Option<RefreshStrategy>) -> Self
pub fn set_strategy(self, input: Option<RefreshStrategy>) -> Self
The strategy to use for the instance refresh. The only valid value is Rolling.
sourcepub fn get_strategy(&self) -> &Option<RefreshStrategy>
pub fn get_strategy(&self) -> &Option<RefreshStrategy>
The strategy to use for the instance refresh. The only valid value is Rolling.
sourcepub fn desired_configuration(self, input: DesiredConfiguration) -> Self
pub fn desired_configuration(self, input: DesiredConfiguration) -> Self
The desired configuration. For example, the desired configuration can specify a new launch template or a new version of the current launch template.
Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group to reflect the new desired configuration.
When you specify a new launch template or a new version of the current launch template for your desired configuration, consider enabling the SkipMatching property in preferences. If it's enabled, Amazon EC2 Auto Scaling skips replacing instances that already use the specified launch template and instance types. This can help you reduce the number of replacements that are required to apply updates.
sourcepub fn set_desired_configuration(
self,
input: Option<DesiredConfiguration>
) -> Self
pub fn set_desired_configuration( self, input: Option<DesiredConfiguration> ) -> Self
The desired configuration. For example, the desired configuration can specify a new launch template or a new version of the current launch template.
Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group to reflect the new desired configuration.
When you specify a new launch template or a new version of the current launch template for your desired configuration, consider enabling the SkipMatching property in preferences. If it's enabled, Amazon EC2 Auto Scaling skips replacing instances that already use the specified launch template and instance types. This can help you reduce the number of replacements that are required to apply updates.
sourcepub fn get_desired_configuration(&self) -> &Option<DesiredConfiguration>
pub fn get_desired_configuration(&self) -> &Option<DesiredConfiguration>
The desired configuration. For example, the desired configuration can specify a new launch template or a new version of the current launch template.
Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group to reflect the new desired configuration.
When you specify a new launch template or a new version of the current launch template for your desired configuration, consider enabling the SkipMatching property in preferences. If it's enabled, Amazon EC2 Auto Scaling skips replacing instances that already use the specified launch template and instance types. This can help you reduce the number of replacements that are required to apply updates.
sourcepub fn preferences(self, input: RefreshPreferences) -> Self
pub fn preferences(self, input: RefreshPreferences) -> Self
Sets your preferences for the instance refresh so that it performs as expected when you start it. Includes the instance warmup time, the minimum healthy percentage, and the behaviors that you want Amazon EC2 Auto Scaling to use if instances that are in Standby state or protected from scale in are found. You can also choose to enable additional features, such as the following:
-
Auto rollback
-
Checkpoints
-
CloudWatch alarms
-
Skip matching
sourcepub fn set_preferences(self, input: Option<RefreshPreferences>) -> Self
pub fn set_preferences(self, input: Option<RefreshPreferences>) -> Self
Sets your preferences for the instance refresh so that it performs as expected when you start it. Includes the instance warmup time, the minimum healthy percentage, and the behaviors that you want Amazon EC2 Auto Scaling to use if instances that are in Standby state or protected from scale in are found. You can also choose to enable additional features, such as the following:
-
Auto rollback
-
Checkpoints
-
CloudWatch alarms
-
Skip matching
sourcepub fn get_preferences(&self) -> &Option<RefreshPreferences>
pub fn get_preferences(&self) -> &Option<RefreshPreferences>
Sets your preferences for the instance refresh so that it performs as expected when you start it. Includes the instance warmup time, the minimum healthy percentage, and the behaviors that you want Amazon EC2 Auto Scaling to use if instances that are in Standby state or protected from scale in are found. You can also choose to enable additional features, such as the following:
-
Auto rollback
-
Checkpoints
-
CloudWatch alarms
-
Skip matching
Trait Implementations§
source§impl Clone for StartInstanceRefreshFluentBuilder
impl Clone for StartInstanceRefreshFluentBuilder
source§fn clone(&self) -> StartInstanceRefreshFluentBuilder
fn clone(&self) -> StartInstanceRefreshFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more