pub struct StartInstanceRefresh { /* private fields */ }Expand description
Fluent builder constructing a request to StartInstanceRefresh.
Starts a new instance refresh operation. An instance refresh performs a rolling replacement of all or some instances in an Auto Scaling group. Each instance is 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 the call succeeds, it creates a new instance refresh request with a unique ID that you can use to track its progress. 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 operation in progress, use the CancelInstanceRefresh API.
Implementations§
source§impl StartInstanceRefresh
impl StartInstanceRefresh
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<StartInstanceRefresh, AwsResponseRetryClassifier>, SdkError<StartInstanceRefreshError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<StartInstanceRefresh, AwsResponseRetryClassifier>, SdkError<StartInstanceRefreshError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<StartInstanceRefreshOutput, SdkError<StartInstanceRefreshError>>
pub async fn send(
self
) -> Result<StartInstanceRefreshOutput, SdkError<StartInstanceRefreshError>>
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 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 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.
A rolling update helps you update your instances gradually. A rolling update can fail due to failed health checks or if instances are on standby or are protected from scale in. If the rolling update process fails, any instances that are replaced are not rolled back to their previous configuration.
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.
A rolling update helps you update your instances gradually. A rolling update can fail due to failed health checks or if instances are on standby or are protected from scale in. If the rolling update process fails, any instances that are replaced are not rolled back to their previous configuration.
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 version. 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 version. 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
Set of preferences associated with the instance refresh request. If not provided, the default values are used.
sourcepub fn set_preferences(self, input: Option<RefreshPreferences>) -> Self
pub fn set_preferences(self, input: Option<RefreshPreferences>) -> Self
Set of preferences associated with the instance refresh request. If not provided, the default values are used.
Trait Implementations§
source§impl Clone for StartInstanceRefresh
impl Clone for StartInstanceRefresh
source§fn clone(&self) -> StartInstanceRefresh
fn clone(&self) -> StartInstanceRefresh
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more