pub struct TerminateInstanceInAutoScalingGroup { /* private fields */ }Expand description
Fluent builder constructing a request to TerminateInstanceInAutoScalingGroup.
Terminates the specified instance and optionally adjusts the desired group size. This operation cannot be called on instances in a warm pool.
This call simply makes a termination request. The instance is not terminated immediately. When an instance is terminated, the instance status changes to terminated. You can't connect to or start an instance after you've terminated it.
If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are terminated.
By default, Amazon EC2 Auto Scaling balances instances across all Availability Zones. If you decrement the desired capacity, your Auto Scaling group can become unbalanced between Availability Zones. Amazon EC2 Auto Scaling tries to rebalance the group, and rebalancing might terminate instances in other zones. For more information, see Rebalancing activities in the Amazon EC2 Auto Scaling User Guide.
Implementations§
source§impl TerminateInstanceInAutoScalingGroup
impl TerminateInstanceInAutoScalingGroup
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<TerminateInstanceInAutoScalingGroup, AwsResponseRetryClassifier>, SdkError<TerminateInstanceInAutoScalingGroupError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<TerminateInstanceInAutoScalingGroup, AwsResponseRetryClassifier>, SdkError<TerminateInstanceInAutoScalingGroupError>>
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<TerminateInstanceInAutoScalingGroupOutput, SdkError<TerminateInstanceInAutoScalingGroupError>>
pub async fn send(
self
) -> Result<TerminateInstanceInAutoScalingGroupOutput, SdkError<TerminateInstanceInAutoScalingGroupError>>
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 instance_id(self, input: impl Into<String>) -> Self
pub fn instance_id(self, input: impl Into<String>) -> Self
The ID of the instance.
sourcepub fn set_instance_id(self, input: Option<String>) -> Self
pub fn set_instance_id(self, input: Option<String>) -> Self
The ID of the instance.
sourcepub fn should_decrement_desired_capacity(self, input: bool) -> Self
pub fn should_decrement_desired_capacity(self, input: bool) -> Self
Indicates whether terminating the instance also decrements the size of the Auto Scaling group.
sourcepub fn set_should_decrement_desired_capacity(self, input: Option<bool>) -> Self
pub fn set_should_decrement_desired_capacity(self, input: Option<bool>) -> Self
Indicates whether terminating the instance also decrements the size of the Auto Scaling group.
Trait Implementations§
source§impl Clone for TerminateInstanceInAutoScalingGroup
impl Clone for TerminateInstanceInAutoScalingGroup
source§fn clone(&self) -> TerminateInstanceInAutoScalingGroup
fn clone(&self) -> TerminateInstanceInAutoScalingGroup
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more