pub struct SetInstanceProtection { /* private fields */ }
Expand description
Fluent builder constructing a request to SetInstanceProtection
.
Updates the instance protection settings of the specified instances. This operation cannot be called on instances in a warm pool.
For more information about preventing instances that are part of an Auto Scaling group from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
If you exceed your maximum limit of instance IDs, which is 50 per Auto Scaling group, the call fails.
Implementations
sourceimpl SetInstanceProtection
impl SetInstanceProtection
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<SetInstanceProtection, AwsResponseRetryClassifier>, SdkError<SetInstanceProtectionError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<SetInstanceProtection, AwsResponseRetryClassifier>, SdkError<SetInstanceProtectionError>>
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<SetInstanceProtectionOutput, SdkError<SetInstanceProtectionError>>
pub async fn send(
self
) -> Result<SetInstanceProtectionOutput, SdkError<SetInstanceProtectionError>>
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_ids(self, input: impl Into<String>) -> Self
pub fn instance_ids(self, input: impl Into<String>) -> Self
Appends an item to InstanceIds
.
To override the contents of this collection use set_instance_ids
.
One or more instance IDs. You can specify up to 50 instances.
sourcepub fn set_instance_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_instance_ids(self, input: Option<Vec<String>>) -> Self
One or more instance IDs. You can specify up to 50 instances.
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 protected_from_scale_in(self, input: bool) -> Self
pub fn protected_from_scale_in(self, input: bool) -> Self
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
sourcepub fn set_protected_from_scale_in(self, input: Option<bool>) -> Self
pub fn set_protected_from_scale_in(self, input: Option<bool>) -> Self
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
Trait Implementations
sourceimpl Clone for SetInstanceProtection
impl Clone for SetInstanceProtection
sourcefn clone(&self) -> SetInstanceProtection
fn clone(&self) -> SetInstanceProtection
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more